Skip to content

Conversation

castastrophe
Copy link
Contributor

@castastrophe castastrophe commented Mar 19, 2025

Description

We opened this as a demo of using the native CSS module imports for the web components (reference: https://web.dev/articles/css-module-scripts) and wondering if there are any decent polyfills that could get us the coverage we need to switch over to it.

This approach would mean in future infrastructure we wouldn't need to convert *.css -> *.ts -> *.js at all. One less thing to ship (and have to maintain as a part of our API too). Since we export them as part of our components here, I didn't remove the tasks that generate the *.css.js files but if we committed to an approach like this, we could remove those in a future breaking change.

Action items

  1. Take a look at this approach in the pull request
  2. Click through the Storybook
  3. Read up on CSS Module imports
  4. Post your thoughts and findings to this PR

Copy link

changeset-bot bot commented Mar 19, 2025

⚠️ No Changeset found

Latest commit: abab690

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@castastrophe castastrophe changed the title PoC | leverage css module imports in components RFC | leverage css module imports in components Mar 19, 2025
Copy link
Contributor

github-actions bot commented Mar 19, 2025

Branch preview

Review the following VRT differences

When a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:

If the changes are expected, update the current_golden_images_cache hash in the circleci config to accept the new images. Instructions are included in that file.
If the changes are unexpected, you can investigate the cause of the differences and update the code accordingly.

Copy link
Contributor

Tachometer results

Currently, no packages are changed by this PR...

@coveralls
Copy link
Collaborator

coveralls commented Mar 19, 2025

Pull Request Test Coverage Report for Build 14094674923

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 2012 unchanged lines in 37 files lost coverage.
  • Overall coverage decreased (-11.8%) to 86.218%

Files with Coverage Reduction New Missed Lines %
tools/base/src/condition-attribute-with-id.ts 1 93.22%
packages/tabs/src/Tab.ts 2 94.12%
tools/shared/src/focusable.ts 2 98.83%
tools/base/src/Base.ts 4 98.83%
tools/reactive-controllers/src/ElementResolution.ts 4 95.12%
tools/shared/src/observe-slot-presence.ts 5 88.5%
packages/action-menu/src/ActionMenu.ts 6 86.02%
packages/tooltip/src/tooltip-directive.ts 7 84.09%
packages/alert-dialog/src/AlertDialog.ts 9 95.31%
tools/reactive-controllers/src/FocusGroup.ts 9 93.23%
Totals Coverage Status
Change from base Build 14094527602: -11.8%
Covered Lines: 14184
Relevant Lines: 16434

💛 - Coveralls

@castastrophe castastrophe force-pushed the castastrophe/poc-css-module-scripts branch 2 times, most recently from 75cfee3 to 2a1ea92 Compare March 26, 2025 22:27
@castastrophe castastrophe force-pushed the castastrophe/poc-css-module-scripts branch 2 times, most recently from a09f6ee to 84afd94 Compare April 3, 2025 17:21
@castastrophe castastrophe force-pushed the castastrophe/poc-css-module-scripts branch 4 times, most recently from 60cb2a0 to 43313e8 Compare April 22, 2025 14:38
@castastrophe castastrophe force-pushed the castastrophe/poc-css-module-scripts branch from 43313e8 to 0fbbce6 Compare April 28, 2025 14:16
@castastrophe castastrophe force-pushed the castastrophe/poc-css-module-scripts branch 2 times, most recently from b1cedb8 to b679f84 Compare May 7, 2025 15:59
@castastrophe castastrophe force-pushed the castastrophe/poc-css-module-scripts branch from b679f84 to 841ed84 Compare June 12, 2025 15:44
@castastrophe
Copy link
Contributor Author

@castastrophe castastrophe force-pushed the castastrophe/poc-css-module-scripts branch from 841ed84 to abab690 Compare June 16, 2025 18:59
@castastrophe castastrophe deleted the castastrophe/poc-css-module-scripts branch June 19, 2025 13:40
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