Skip to content

GAUD-8851 remove text scss#7161

Open
EdwinACL831 wants to merge 11 commits into
mainfrom
ecollazos/GAUD-8851_remove_text_scss
Open

GAUD-8851 remove text scss#7161
EdwinACL831 wants to merge 11 commits into
mainfrom
ecollazos/GAUD-8851_remove_text_scss

Conversation

@EdwinACL831

@EdwinACL831 EdwinACL831 commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Jira

GAUD-8851

I strongly suggest to review this commit by commit to understand the final result in case it doesn't make sense right away

@EdwinACL831 EdwinACL831 requested a review from a team as a code owner July 3, 2026 20:32

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 thought that would be easier to understand and implement style in BSI, therefore I created this new file with the generator function.

@github-actions

github-actions Bot commented Jul 3, 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-7161/

Note

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

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.

What I did here was basically expose some base-style-generator-functions that I used in the new file input-text-styles.js

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 will revert these changes in the test file. The report results are really good and there is not significant difference

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 is a good practice that @dlockhart suggested me last time, and I found it very useful. Here we might see how different (if there is any) the component would look with these generated styles, compared to the sass ones

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 will revert these changes in this file. The report results are really good and there is not significant difference

Comment thread components/inputs/input-text-styles.js Outdated
Comment thread components/inputs/input-text-styles.js Outdated
import { _isValidCssSelector } from '../../helpers/internal/css.js';
import { getFocusVisibleStyles } from '../../helpers/focus.js';

function _generateInputTextDisabledStyles(selector) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This shouldn't be needed anymore. If you check the input-styles under the off flag. It has the same styles, meant to override focus-styles when item is disabled. However, the new generated styles adds :not(disabled) to those focus styles so they don't need to be overriden

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.

Thanks for the clarification. That answers my comment below as well.

@@ -0,0 +1,54 @@

import {
_generateInputAriaInvalidBaseStyles,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is the plan to use this functions separately on BSI? I think it would be cleaner to merge everything that is always used together under a single function so that consumers wouldn't need to import all of them separately.

@EdwinACL831 EdwinACL831 Jul 6, 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.

No, The plan is to only use the exported function _generateInputTextStyles from this file. I used only these ones to build it up easier and readable

Comment thread components/inputs/input-styles.js Outdated
@@ -166,8 +166,15 @@ describe('d2l-input-text', () => {

describe('sass', () => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I mentioned this on the other PR but input-text was using the new generated styles because the flag defaults to true so the base tests are already tracking the changes, these could be removed along the sass styles

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.

Oh you're correct. Thank you for the heads up!

Edwin Collazos and others added 4 commits July 6, 2026 09:52
…hey are already handled by the Input base styles by the :not(:disabled)
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