As we did with Bug 31529, I think we should run automated Stylelint corrections on staff-global.scss now that the file has had significant changes in the staff interface upgrade. Automated fixes will correct style issues like: - lower case color hex codes - properties out of alphabetical order - missing empty lines or extra empty lines - missing spaces after ":" ...according to our Stylelint configuration, .stylelintrc.json
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