Skip to content

GAUD-8850: Remove select.scss#7155

Merged
EdwinACL831 merged 19 commits into
mainfrom
ecollazos/GAUD-8850_remove_select_scss
Jul 8, 2026
Merged

GAUD-8850: Remove select.scss#7155
EdwinACL831 merged 19 commits into
mainfrom
ecollazos/GAUD-8850_remove_select_scss

Conversation

@EdwinACL831

@EdwinACL831 EdwinACL831 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Jira

GAUD-8850

  • Adds feature flag to wrap the logic to always return the :focus-visible css pseudo-class

- Adds feature flag to wrap the logic to always return the
  :focus-visible css pseudo-class
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Thanks for the PR! 🎉

We've deployed an automatic preview for this PR - you can see your changes here:

URL https://live.d2l.dev/prs/BrightspaceUI/core/pr-7155/

Note

The build needs to finish before your changes are deployed.
Changes to the PR will automatically update the instance.

@EdwinACL831 EdwinACL831 force-pushed the ecollazos/GAUD-8850_remove_select_scss branch from 29eb27f to 21ea095 Compare July 2, 2026 19:15

@EdwinACL831 EdwinACL831 Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, give me a bit longer to review this before reverting.

@EdwinACL831 EdwinACL831 marked this pull request as ready for review July 2, 2026 19:38
@EdwinACL831 EdwinACL831 requested a review from a team as a code owner July 2, 2026 19:38
outline: 2px solid var(--d2l-theme-border-color-focus);
outline-offset: -2px;
}`),
ariaInvalid: getFocusVisibleStyles(ariaInvalidSelector, (selector) => css`${selector} {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This rule is being used both inside and outside the media query, so just added it once

@EdwinACL831 EdwinACL831 Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just realized that @GZolla is working on this same file ang giving a more complete solution in this PR. I will revert these changes and wait for his pr to be merged

@EdwinACL831 EdwinACL831 force-pushed the ecollazos/GAUD-8850_remove_select_scss branch from 01f5b44 to a1b7f07 Compare July 3, 2026 14:15
Comment thread components/inputs/input-select-styles.js Outdated
</svg>`
);

function _getSelectFocusStyles(selector) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@EdwinACL831 EdwinACL831 force-pushed the ecollazos/GAUD-8850_remove_select_scss branch from a172bca to d9008b4 Compare July 6, 2026 16:04
Comment thread components/inputs/input-select-styles.js
@EdwinACL831 EdwinACL831 force-pushed the ecollazos/GAUD-8850_remove_select_scss branch from 8979095 to 612d1f3 Compare July 6, 2026 18:53
github-actions Bot and others added 2 commits July 6, 2026 16:04
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@EdwinACL831 EdwinACL831 requested a review from dlockhart July 7, 2026 18:19
{ 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 },

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
@EdwinACL831 EdwinACL831 merged commit 7aa1e02 into main Jul 8, 2026
8 of 9 checks passed
@EdwinACL831 EdwinACL831 deleted the ecollazos/GAUD-8850_remove_select_scss branch July 8, 2026 17:53
@d2l-github-release-tokens

Copy link
Copy Markdown

🎉 This PR is included in version 3.268.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants