mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
32ced3053d
* fix(ui): scope the Control UI cursor convention to app-like display modes
The app-chrome cursor convention from #103357/#103411 was applied
unconditionally, so an ordinary browser tab lost the pointer hand on
buttons, menus, tabs, rails, selects and accordion summaries — the only
hover affordance a page owns. The convention is correct for the installed
window the manifest declares ("display": "standalone"), not for every
window the same bundle is served into.
base.css now owns one policy token, --cursor-action, selected by display
mode: pointer by default, the desktop arrow under standalone, minimal-ui
and window-controls-overlay. A low-specificity rule maps generic
actionable controls onto that token, restoring the affordance on the
surfaces #103411 stripped bare, while every component rule that owns a
semantic cursor (not-allowed, disabled, grab, resize, zoom-in, text,
wait) keeps winning without !important.
The 92 cursor: pointer declarations that had drifted back into ui/src
since July now consume the token instead of hardcoding the hand, so they
stop contradicting the policy in an installed window. Real hyperlinks
keep the pointer in every mode. The pre-boot mount fallback repeats the
policy locally because it must render when the bundle fails to load.
Closes #121242
* test(ui): run the cursor policy browser test in the node-driven project
ui/vitest.config.ts routes Playwright-from-Node .browser.test.ts files to the
unit-node project; without registering the new cursor policy test there, the
in-browser chromium project tried to import it and failed on node:fs/playwright.
* fix(ui): keep the desktop arrow in the native app hosts
The macOS dashboard embeds the Control UI in a plain web view, which
reports `display-mode: browser`, so the display-mode-only policy would
have handed it the browser-tab pointer. It already announces itself with
`openclaw-native-macos`/`-nav`/`-web-chrome` on `<html>`, the same markers
`ui/src/styles/layout.css` matches on, so the policy reads those too.
34 lines
1.5 KiB
JavaScript
34 lines
1.5 KiB
JavaScript
// Control UI CSS hygiene: plain stylesheets plus css`` templates in Lit
|
|
// components (postcss-lit). Error-class rules only — oxfmt owns formatting.
|
|
export default {
|
|
extends: "stylelint-config-recommended",
|
|
rules: {
|
|
// Cascade-order advice, not an error class; 400+ intentional hits in the
|
|
// existing token/override cascade make it pure noise here.
|
|
"no-descending-specificity": null,
|
|
// 17 pre-existing duplicates; merging them reorders the cascade and needs
|
|
// per-site visual proof. Tighten in a follow-up, keep new code honest via
|
|
// review until then.
|
|
"no-duplicate-selectors": null,
|
|
// stylelint 17.14.1 knows display-mode as fullscreen | standalone |
|
|
// minimal-ui | browser | picture-in-picture (lib/reference/mediaFeatures.mjs),
|
|
// predating window-controls-overlay. Allow that one value only, so typos in
|
|
// the rest still fail.
|
|
"media-feature-name-value-no-unknown": [
|
|
true,
|
|
{ ignoreMediaFeatureNameValues: { "display-mode": ["window-controls-overlay"] } },
|
|
],
|
|
// `clip` survives only inside the standard sr-only fallback pattern.
|
|
"property-no-deprecated": [true, { ignoreProperties: ["clip"] }],
|
|
// `word-break: break-word` is deprecated but swapping it for overflow-wrap
|
|
// changes min-content sizing in flex/grid text containers.
|
|
"declaration-property-value-keyword-no-deprecated": [true, { ignoreKeywords: ["break-word"] }],
|
|
},
|
|
overrides: [
|
|
{
|
|
files: ["**/*.ts"],
|
|
customSyntax: "postcss-lit",
|
|
},
|
|
],
|
|
};
|