Skip to content

GAUD-8850: Remove select.scss#7155

Open
EdwinACL831 wants to merge 15 commits into
mainfrom
ecollazos/GAUD-8850_remove_select_scss
Open

GAUD-8850: Remove select.scss#7155
EdwinACL831 wants to merge 15 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
const ariaInvalidSelector = `${selector}[aria-invalid="true"], ${selector}[aria-invalid="true"]:hover, ${selector}[aria-invalid="true"]`;

return {
notDisabled: getFocusVisibleStyles(notDisabledSelector, (selector) => css`${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 think this block could just use getFocusRingStyles directly and pass in the box-shadow as extraStyles. That way we have one less duplication of the outline/outline-offset. Although then I think we'd lose the box-shadow: none in the high-contrast version... which I'm not sure how important that was.

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 could update that function as well to receive additional styles for the @media(prefer-contrast: more) query. Also will test this first locally and see how does that looks like

</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

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.

We should add this (and the others that we missed) to node-imports-test.js.

@EdwinACL831 EdwinACL831 force-pushed the ecollazos/GAUD-8850_remove_select_scss branch from 8979095 to 612d1f3 Compare July 6, 2026 18:53
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants