diff --git a/UPGRADE.md b/UPGRADE.md index abe6159e..b7532ba0 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -171,6 +171,28 @@ Browser tests that assert widths switch at 640/1024/1280 now switch at 600/840/1200; tests that read `role="alert"` on an alert, `aria-pressed` on the time picker's period buttons or `data-theme-option` need the new hooks above. +Every component hook is prefixed `data-md-`: `data-toolbar-place` is `data-md-toolbar-place`, +`data-account-menu` is `data-md-account-menu`, `data-field-copy` is `data-md-field-copy`. The +attributes on `` keep their names (`data-theme`, `data-contrast`, `data-scheme`, +`data-motion`, `data-rail`). A component's inner parts also carry its name: + +| 1.x | 2.0.0 | +|---|---| +| `data-app-shell`, `-bar`, `-actions`, `-banner` | `data-md-scaffold`, `-bar`, `-actions`, `-banner` | +| `data-theme-option="dark"` | `input[name="material-theme"][value="dark"]` | +| `data-scheme-option="teal"` | `data-md-scheme-picker-option="teal"` | +| `data-account-theme` | `data-md-account-menu-theme` | +| `data-section-picker` | `data-md-section-nav-picker` | +| `data-material-carousel`, `-item`, `-content`, `-label`, `-surface` | `data-md-carousel`, `-item`, `-content`, `-label`, `-surface` | +| `data-sheet` (drawer) | `data-md-drawer-sheet` | +| `data-drag-handle` (bottom sheet) | `data-md-bottom-sheet-handle` | +| `data-check`, `data-mixed` (checkbox) | `data-md-checkbox-check`, `data-md-checkbox-mixed` | +| `data-on`, `data-off`, `data-handle` (toggle) | `data-md-switch-on`, `data-md-switch-off`, `data-md-switch-handle` | +| `data-handle`, `data-thumb`, `data-tick`, `data-stop`, `data-segment`, `data-track-icon` (slider) | `data-md-slider-handle`, `-thumb`, `-tick`, `-stop`, `-segment`, `-icon` | + +Rename the negative assertions too: `->not->toContain('data-app-bar')` passes against 2.0.0 +whatever the page renders. + ### 9. For AI agents `php artisan boost:update --discover` picks up the new `material-3` guideline and the