Two gaps found rewriting the Boost skill for 2.0's plain CSS, each
closed the way M3 describes it.
`<x-loading size="96">`: M3 gives the loading indicator a responsive
size, 48dp by default and flexible from 24 to 240dp ("never exceed that
range"), with the container and the active shape in a fixed ratio. The
size had no prop, so an application wrote a width and height of its own;
`size` now takes a whole number of px in that range, written as
`--md-loading-size`, and the SVG keeps the 48:38 ratio as it scales. A
value outside the range is ignored, as `<x-icon>` and `<x-shape>` ignore
theirs, and an application's own width and height still win.
`--md-navigation-rail-value`: M3 Expressive's rail has two values,
collapsed and expanded (Compose's WideNavigationRailValue), and content
in a rail follows it. Without a hook an application copied the rail's
seven conditions — mode, `data-rail`, `data-rail-auto`, open, and the
window band — out of navigation-rail.css. The rail now publishes the
answer from the same branches that narrow it: `expanded` by default,
`collapsed` wherever it is drawn collapsed, so a style query in the
application's CSS switches at the first paint and at the same moment
as the rail's own items. A rail open over a scrim reads `expanded`, and
outside a rail the property is unset. A JS attribute would have missed
the first paint; a width container query would have lagged the collapse
animation.
Style queries on a custom property need Firefox 151, so the browser
floor moves from Firefox 147 to 151 (README, the CI note, UPGRADE's new
2.1.0 section); Chrome 125 and Safari 18.4 are unchanged.
Browser tests pin both in Chrome, Firefox and Safari: the indicator's
drawn box at 96 and 32px, and the rail's value — with a style query
acting on it — at the first paint for fixed modes, across the window
classes and the menu button for an adaptive rail, and open and closed
for a modal one. NavigationRailTest pins the value in each of the five
collapsed branches.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
120 lines
3.2 KiB
YAML
120 lines
3.2 KiB
YAML
name: tests
|
|
|
|
# Run by Gitea's act_runner. Nothing here needs a service container or a database.
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Setup PHP
|
|
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
|
|
with:
|
|
php-version: '8.5'
|
|
tools: composer:v2
|
|
coverage: none
|
|
|
|
- name: Install dependencies
|
|
run: composer install --no-interaction --no-progress --prefer-dist
|
|
|
|
- name: Check formatting
|
|
run: vendor/bin/pint --test
|
|
|
|
feature:
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
php: ['8.4', '8.5']
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Setup PHP
|
|
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
|
|
with:
|
|
php-version: ${{ matrix.php }}
|
|
tools: composer:v2
|
|
coverage: none
|
|
|
|
# material:scheme's tests run the bundled colour script through Node.
|
|
- name: Setup Node
|
|
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
|
|
with:
|
|
node-version: '22'
|
|
|
|
- name: Install dependencies
|
|
run: composer install --no-interaction --no-progress --prefer-dist
|
|
|
|
- name: Run feature tests
|
|
run: vendor/bin/pest --testsuite=Feature
|
|
|
|
# One job per engine: the floor is Chrome 125, Firefox 151 and Safari 18.4, and the
|
|
# components lean on platform features (dialog, popover, anchor positioning) that
|
|
# differ between them. Pest calls the engines chrome, firefox and safari; Playwright
|
|
# installs them as chromium, firefox and webkit.
|
|
browser:
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- browser: chrome
|
|
playwright: chromium
|
|
- browser: firefox
|
|
playwright: firefox
|
|
- browser: safari
|
|
playwright: webkit
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Setup PHP
|
|
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
|
|
with:
|
|
php-version: '8.5'
|
|
tools: composer:v2
|
|
coverage: none
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
|
|
with:
|
|
node-version: '22'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
composer install --no-interaction --no-progress --prefer-dist
|
|
npm ci
|
|
|
|
- name: Build the Workbench assets
|
|
run: npm run build
|
|
|
|
- name: Install the browser
|
|
run: npx playwright install --with-deps ${{ matrix.playwright }}
|
|
|
|
- name: Run browser tests
|
|
run: vendor/bin/pest --testsuite=Browser --browser ${{ matrix.browser }}
|
|
env:
|
|
BROWSER_TIMEOUT: 15000
|