[Bug 42902] New: Dark-mode regression guards for the staff interface
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42902 Bug ID: 42902 Summary: Dark-mode regression guards for the staff interface Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Staff interface Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@openfifth.co.uk QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com Target Milestone: --- This patch adds automated guard rails so the dark-mode work does not regress and future contributions do not re-introduce hardcoded colours in areas that have been migrated to the Koha colour tokens. This is the capstone of the dark-mode series and should be applied once the component migrations are in place (bugs 42898, 42899, 42900, 42901). Cypress (t/cypress/integration/Theme_spec.ts): Confirms the correct theme is applied before the page is interactive (no flash of the wrong theme). Round-trips Light / Dark / Auto through the switcher and a reload and checks the resolved theme on the page each time. Reads the actual computed surface/text colours and asserts they differ between light and dark, i.e. the theme really flips. Drives the header switcher UI and checks the active state follows. Loads several representative pages in each mode. Stylelint (.stylelintrc.json): A "no hardcoded hex colour" rule scoped to the migrated staff SCSS, emitted as a warning (it does not fail the build) pointing reviewers at the colour tokens. Files not yet migrated, and the files that intentionally hold the colour values, are excluded; as more areas are migrated their entries are removed and the rule starts guarding them. The OPAC is out of scope. Depends on: bug 42898, bug 42899, bug 42900, bug 42901 Test plan: 1) Apply the patch (after bugs 42898, 42899, 42900, 42901). 2) Cypress: run t/cypress/integration/Theme_spec.ts against a built instance. All assertions should pass. 3) Stylelint warns on a new hex literal: echo '.foo { color: #BADA55; }' \ > koha-tmpl/intranet-tmpl/prog/css/src/_demo.scss npx stylelint koha-tmpl/intranet-tmpl/prog/css/src/_demo.scss Expect a warning pointing at the colour tokens. Remove _demo.scss afterwards. 4) Stylelint stays quiet on an already-migrated file: npx stylelint koha-tmpl/intranet-tmpl/prog/css/src/_root.scss Expect no hex-colour warnings. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42902 --- Comment #1 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 200856 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200856&action=edit Bug 42902: Add dark-mode regression guards -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42902 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |42901 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42901 [Bug 42901] Dark mode for Vue components in the staff interface -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42902 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |martin.renvoize@openfifth.c |ity.org |o.uk Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42902 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |42900 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42900 [Bug 42900] Dark mode for tables and status rows -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42902 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |42899 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42899 [Bug 42899] Dark mode for core staff interface chrome -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42902 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |39495 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39495 [Bug 39495] [OMNIBUS] Staff Interface Theming -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42902 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #200856|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42902 --- Comment #2 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 200864 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200864&action=edit Bug 42898: Dark-mode foundation and theme switcher -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42902 --- Comment #3 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 200865 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200865&action=edit Bug 42902: Add dark-mode regression guards Adds automated guard rails so the dark-mode work does not regress and future contributions do not re-introduce hardcoded colours in areas that have been migrated to the Koha colour tokens. This is the capstone of the dark-mode series (bugs 42898, 42899, 42900, 42901) and should be applied once the component migrations are in place. Cypress (t/cypress/integration/Theme_spec.ts): * Confirms the correct theme is applied before the page is interactive (no flash of the wrong theme). * Round-trips Light / Dark / Auto through the switcher and a reload and checks the resolved theme on the page each time. * Reads the actual computed surface/text colours and asserts they differ between light and dark, i.e. the theme really flips. * Drives the header switcher UI and checks the active state follows. * Loads several representative pages in each mode. Stylelint (.stylelintrc.json): * A "no hardcoded hex colour" rule scoped to the migrated staff SCSS, emitted as a warning (it does not fail the build) pointing reviewers at the colour tokens. Files not yet migrated, and the files that intentionally hold the colour values, are excluded; as more areas are migrated their entries are removed and the rule starts guarding them. The OPAC is out of scope. Test plan: 1) Apply the patch (after bugs 42898, 42899, 42900, 42901). 2) Cypress: run t/cypress/integration/Theme_spec.ts against a built instance. All assertions should pass. 3) Stylelint warns on a new hex literal: echo '.foo { color: #BADA55; }' \ > koha-tmpl/intranet-tmpl/prog/css/src/_demo.scss npx stylelint koha-tmpl/intranet-tmpl/prog/css/src/_demo.scss Expect a warning pointing at the colour tokens. Remove _demo.scss afterwards. 4) Stylelint stays quiet on an already-migrated file: npx stylelint koha-tmpl/intranet-tmpl/prog/css/src/_root.scss Expect no hex-colour warnings. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42902 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #200865|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42902 --- Comment #4 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 200870 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200870&action=edit Bug 42902: Add dark-mode regression guards Adds automated guard rails so the dark-mode work does not regress and future contributions do not re-introduce hardcoded colours in areas that have been migrated to the Koha colour tokens. This is the capstone of the dark-mode series (bugs 42898, 42899, 42900, 42901) and should be applied once the component migrations are in place. Cypress (t/cypress/integration/Theme_spec.ts): * Confirms the correct theme is applied before the page is interactive (no flash of the wrong theme). * Round-trips Light / Dark / Auto through the switcher and a reload and checks the resolved theme on the page each time. * Reads the actual computed surface/text colours and asserts they differ between light and dark, i.e. the theme really flips. * Drives the header switcher UI and checks the active state follows. * Loads several representative pages in each mode. Stylelint (.stylelintrc.json): * A "no hardcoded hex colour" rule scoped to the migrated staff SCSS, emitted as a warning (it does not fail the build) pointing reviewers at the colour tokens. Files not yet migrated, and the files that intentionally hold the colour values, are excluded; as more areas are migrated their entries are removed and the rule starts guarding them. The OPAC is out of scope. Test plan: 1) Apply the patch (after bugs 42898, 42899, 42900, 42901). 2) Cypress: run t/cypress/integration/Theme_spec.ts against a built instance. All assertions should pass. 3) Stylelint warns on a new hex literal: echo '.foo { color: #BADA55; }' \ > koha-tmpl/intranet-tmpl/prog/css/src/_demo.scss npx stylelint koha-tmpl/intranet-tmpl/prog/css/src/_demo.scss Expect a warning pointing at the colour tokens. Remove _demo.scss afterwards. 4) Stylelint stays quiet on an already-migrated file: npx stylelint koha-tmpl/intranet-tmpl/prog/css/src/_root.scss Expect no hex-colour warnings. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42902 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #200864|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org