GAUD-8850: Remove select.scss#7155
Conversation
- Adds feature flag to wrap the logic to always return the :focus-visible css pseudo-class
|
Thanks for the PR! 🎉 We've deployed an automatic preview for this PR - you can see your changes here:
Note The build needs to finish before your changes are deployed. |
29eb27f to
21ea095
Compare
There was a problem hiding this comment.
I added back the code in the vdiffs just to make sure they are still looking as expected. Here is the report. this will be reverted once we are happy (get some thumbs up) with the changes and their results
There was a problem hiding this comment.
Actually, give me a bit longer to review this before reverting.
| outline: 2px solid var(--d2l-theme-border-color-focus); | ||
| outline-offset: -2px; | ||
| }`), | ||
| ariaInvalid: getFocusVisibleStyles(ariaInvalidSelector, (selector) => css`${selector} { |
There was a problem hiding this comment.
This rule is being used both inside and outside the media query, so just added it once
There was a problem hiding this comment.
I had to also update these styles in order to use the _getFocusVisibleStyles and replace the getFocusPseudoClass cause this file is imported in at the beginning of the input-select-styles.js and generating the styles in BSI would also had the same issue.
Note: This file is being imported in input-select-styles.js because the --d2l-input-invalid-image css variable is being used there, so we need to register it too.
01f5b44 to
a1b7f07
Compare
| </svg>` | ||
| ); | ||
|
|
||
| function _getSelectFocusStyles(selector) { |
There was a problem hiding this comment.
I'm personally finding the addition of this helper really confusing to follow the before & after, vs. just calling into getFocusVisibleStyles directly from _generateSelectStyles right inline.
There was a problem hiding this comment.
imo i think should be pretty straight forward. what I did was only to group styles and selectors into this function, and then use the returned object there. I decided to created this helper function to encapsulate the logic that replaces the getPseudoClass from above
a172bca to
d9008b4
Compare
8979095 to
612d1f3
Compare
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
| { name: 'sass-rtl-overflow', template: sassOverflowFixture, rtl: true }, | ||
| { name: 'sass-rtl-overflow-focus', template: sassOverflowFixture, rtl: true, focus: true }, | ||
| { name: 'sass-rtl-invalid', template: sassInvalidFixture, rtl: true }, | ||
| { name: 'sass-rtl-invalid-focus', template: sassInvalidFixture, rtl: true, focus: true }, |
There was a problem hiding this comment.
Ok so the plan is to merge this PR, then update BSI to use the new generate function and merge that, then come back here and remove the Sass entirely?
If we need to do it in 2 phases anyway, I think I'd suggest:
- Introduce the generator function in core and update the Sass tests to use it (should have little to no vdiff changes) & merge & release that
- Update BSI to use the generator
- Come back and remove the Sass tests
There was a problem hiding this comment.
OK, regarding the BSI step I already have the PR for review. I will put back the sass tests and make them to use the generated styles.
WDYM by introduce the generator function in core? if you mean to use that, I think it is currently being used to generate the selectStyles in this line
There was a problem hiding this comment.
I meant more for future changes like this to do it in the 3 phases I listed.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
|
🎉 This PR is included in version 3.268.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Jira
GAUD-8850