Skip to content

GAUD-8851 remove text scss#7161

Merged
EdwinACL831 merged 24 commits into
mainfrom
ecollazos/GAUD-8851_remove_text_scss
Jul 14, 2026
Merged

GAUD-8851 remove text scss#7161
EdwinACL831 merged 24 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
Comment thread components/inputs/input-text-styles.js Outdated

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.

@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.

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

Functions are not any more exported and only used within the _generateInputTextStyles function, which is the only exposed function to BSI for input texts

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.

Comment thread components/inputs/input-text-styles.js Outdated
Comment thread components/inputs/input-styles.js Outdated
Comment thread components/inputs/test/input-text.vdiff.js
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>
Comment thread test/node-imports-test.js Outdated
@EdwinACL831
EdwinACL831 force-pushed the ecollazos/GAUD-8851_remove_text_scss branch from a2f113c to 1c1c9a4 Compare July 7, 2026 13:44
@EdwinACL831
EdwinACL831 requested review from GZolla and dlockhart July 7, 2026 18:19
before(() => {
const style = document.createElement('style');
style.id = 'generated-styles';
style.textContent = _generateInputTextStyles('.d2l-test-input-text');

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.

For example, here is a similar implementation about how this would be done in BSI as well @GZolla and @dlockhart: We would only need to call the generator function, instead of calling multiple functions there in BSI.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Comment thread components/inputs/input-styles.js
@EdwinACL831
EdwinACL831 requested a review from dlockhart July 10, 2026 16:51
@EdwinACL831
EdwinACL831 force-pushed the ecollazos/GAUD-8851_remove_text_scss branch from c6a8704 to 42d8179 Compare July 10, 2026 18:17

${_generateInputDisabledBaseStyles(selector)}

${_generatewebkitSearchStyles(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 don't think we want this here since then it'll show up in inputStyles and it wasn't there before. I think we want to only do it from _generateInputTextStyles.

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

Uh, please correct me if I am wrong but I think that code also was included in the generated inputStyles.. So what I did just be equivalent to what it was before for that portion of the code

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.

Yep you're right -- I was confused because before your last commit it would have been missing them.

That indicates to me that we're missing a vdiff to cover this case for inputStyles, could you add that in?

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.

Hmm although if it's truly only needed for webkit then our vdiffs being Chrome-only won't help. But if it does something for Chrome then it's worth adding vdiffs I think.

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, I have added test cases for NON-SASS and SASS, making sure the native X doesn't appear thanks to our -webkit- css rule. Thank you!

@EdwinACL831
EdwinACL831 requested a review from dlockhart July 13, 2026 18:59
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

@dlockhart dlockhart left a comment

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.

This is looking good!

@EdwinACL831
EdwinACL831 merged commit f7a5d91 into main Jul 14, 2026
11 checks passed
@EdwinACL831
EdwinACL831 deleted the ecollazos/GAUD-8851_remove_text_scss branch July 14, 2026 13:35
@d2l-github-release-tokens

Copy link
Copy Markdown

🎉 This PR is included in version 3.271.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.

3 participants