Summary: | Run automated Stylelint fixes on staff CSS | ||
---|---|---|---|
Product: | Koha | Reporter: | Owen Leonard <oleonard> |
Component: | Templates | Assignee: | Owen Leonard <oleonard> |
Status: | CLOSED FIXED | QA Contact: | Martin Renvoize (ashimema) <martin.renvoize> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | fridolin.somers, martin.renvoize, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
23.11.00
|
|
Circulation function: | |||
Attachments: |
Bug 34392: Run automated Stylelint fixes on staff CSS
Bug 34392: Run automated Stylelint fixes on staff CSS Bug 34392: Run automated Stylelint fixes on staff CSS Bug 34392: Run automated Stylelint fixes on staff CSS Bug 34392: Run automated Stylelint fixes on staff CSS Bug 34392: Run automated Stylelint fixes on staff CSS Bug 34392: Run automated Stylelint fixes on staff CSS |
Description
Owen Leonard
2023-07-25 18:27:21 UTC
Created attachment 153926 [details] [review] Bug 34392: Run automated Stylelint fixes on staff CSS This patch corrects errors raised by the new stylelint configuration in staff-global.scss. Many of the fixes were made automatically by using the "--fix" option: npx stylelint koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss --fix Some examples of errors found: - Expected single space after ":" - Expected single space after "(" - Expected single space before ")" - Expected empty line before comment - Expected no more than 1 empty line - Expected a trailing semicolon Manual fixes include replacing named colors with hex codes, combining duplicate selectors, removing empty blocks, etc. Some warnings remain: "Unexpected !important" requires more than a quick fix, if we should choose to address them. To test, apply the patch and rebuild the staff interface CSS: https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client The changes affect CSS all around the staff interface, but there should be no visible results of the patch. Everything should look correct. The stylelint check should return only warnings about "!important" npx stylelint koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss Created attachment 154226 [details] [review] Bug 34392: Run automated Stylelint fixes on staff CSS This patch corrects errors raised by the new stylelint configuration in staff-global.scss. Many of the fixes were made automatically by using the "--fix" option: npx stylelint koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss --fix Some examples of errors found: - Expected single space after ":" - Expected single space after "(" - Expected single space before ")" - Expected empty line before comment - Expected no more than 1 empty line - Expected a trailing semicolon Manual fixes include replacing named colors with hex codes, combining duplicate selectors, removing empty blocks, etc. Some warnings remain: "Unexpected !important" requires more than a quick fix, if we should choose to address them. To test, apply the patch and rebuild the staff interface CSS: https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client The changes affect CSS all around the staff interface, but there should be no visible results of the patch. Everything should look correct. The stylelint check should return only warnings about "!important" npx stylelint koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss Signed-off-by: Sam Lau <samalau@gmail.com> Created attachment 154699 [details] [review] Bug 34392: Run automated Stylelint fixes on staff CSS This patch corrects errors raised by the new stylelint configuration in staff-global.scss. Many of the fixes were made automatically by using the "--fix" option: npx stylelint koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss --fix Some examples of errors found: - Expected single space after ":" - Expected single space after "(" - Expected single space before ")" - Expected empty line before comment - Expected no more than 1 empty line - Expected a trailing semicolon Manual fixes include replacing named colors with hex codes, combining duplicate selectors, removing empty blocks, etc. Some warnings remain: "Unexpected !important" requires more than a quick fix, if we should choose to address them. To test, apply the patch and rebuild the staff interface CSS: https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client The changes affect CSS all around the staff interface, but there should be no visible results of the patch. Everything should look correct. The stylelint check should return only warnings about "!important" npx stylelint koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss Signed-off-by: Sam Lau <samalau@gmail.com> I feel like we should add this to the QA tools to prevent future regressions too. Created attachment 155897 [details] [review] Bug 34392: Run automated Stylelint fixes on staff CSS This patch corrects errors raised by the new stylelint configuration in staff-global.scss. Many of the fixes were made automatically by using the "--fix" option: npx stylelint koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss --fix Some examples of errors found: - Expected single space after ":" - Expected single space after "(" - Expected single space before ")" - Expected empty line before comment - Expected no more than 1 empty line - Expected a trailing semicolon Manual fixes include replacing named colors with hex codes, combining duplicate selectors, removing empty blocks, etc. Some warnings remain: "Unexpected !important" requires more than a quick fix, if we should choose to address them. To test, apply the patch and rebuild the staff interface CSS: https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client The changes affect CSS all around the staff interface, but there should be no visible results of the patch. Everything should look correct. The stylelint check should return only warnings about "!important" npx stylelint koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss Signed-off-by: Sam Lau <samalau@gmail.com> Created attachment 155967 [details] [review] Bug 34392: Run automated Stylelint fixes on staff CSS This patch corrects errors raised by the new stylelint configuration in staff-global.scss. Many of the fixes were made automatically by using the "--fix" option: npx stylelint koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss --fix Some examples of errors found: - Expected single space after ":" - Expected single space after "(" - Expected single space before ")" - Expected empty line before comment - Expected no more than 1 empty line - Expected a trailing semicolon Manual fixes include replacing named colors with hex codes, combining duplicate selectors, removing empty blocks, etc. Some warnings remain: "Unexpected !important" requires more than a quick fix, if we should choose to address them. To test, apply the patch and rebuild the staff interface CSS: https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client The changes affect CSS all around the staff interface, but there should be no visible results of the patch. Everything should look correct. The stylelint check should return only warnings about "!important" npx stylelint koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss Signed-off-by: Sam Lau <samalau@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Thanks for the rebase.. Passing QA Regards QA tools.. I'm reconsidering this at the moment.. should it be part of QA.. or should we simply automate it away as part of our CI process? https://gitlab.com/koha-community/qa-test-tools/-/issues/76 Please rebase Created attachment 157255 [details] [review] Bug 34392: Run automated Stylelint fixes on staff CSS This patch corrects errors raised by the new stylelint configuration in staff-global.scss. Many of the fixes were made automatically by using the "--fix" option: npx stylelint koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss --fix Some examples of errors found: - Expected single space after ":" - Expected single space after "(" - Expected single space before ")" - Expected empty line before comment - Expected no more than 1 empty line - Expected a trailing semicolon Manual fixes include replacing named colors with hex codes, combining duplicate selectors, removing empty blocks, etc. Some warnings remain: "Unexpected !important" requires more than a quick fix, if we should choose to address them. To test, apply the patch and rebuild the staff interface CSS: https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client The changes affect CSS all around the staff interface, but there should be no visible results of the patch. Everything should look correct. The stylelint check should return only warnings about "!important" npx stylelint koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss Signed-off-by: Sam Lau <samalau@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 157342 [details] [review] Bug 34392: Run automated Stylelint fixes on staff CSS This patch corrects errors raised by the new stylelint configuration in staff-global.scss. Many of the fixes were made automatically by using the "--fix" option: npx stylelint koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss --fix Some examples of errors found: - Expected single space after ":" - Expected single space after "(" - Expected single space before ")" - Expected empty line before comment - Expected no more than 1 empty line - Expected a trailing semicolon Manual fixes include replacing named colors with hex codes, combining duplicate selectors, removing empty blocks, etc. Some warnings remain: "Unexpected !important" requires more than a quick fix, if we should choose to address them. To test, apply the patch and rebuild the staff interface CSS: https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client The changes affect CSS all around the staff interface, but there should be no visible results of the patch. Everything should look correct. The stylelint check should return only warnings about "!important" npx stylelint koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss Signed-off-by: Sam Lau <samalau@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Pushed to master for 23.11. Nice work everyone, thanks! Does not apply on 23.05.x Do you think OK to not backport, regarding conflicts in future patches (In reply to Fridolin Somers from comment #13) > Do you think OK to not backport, regarding conflicts in future patches I think it makes sense not to backport. I'm happy to help with CSS conflicts if necessary. Thanks for you answer. And long live our CSS master :D |