Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Carbon Styles: Sass style sheet #842

Merged
merged 3 commits into from
Nov 8, 2023
Merged

Conversation

pinussilvestrus
Copy link
Contributor

@pinussilvestrus pinussilvestrus commented Oct 13, 2023

Closes #633

  • Transforms the styled component carbon-styles to a scss file
  • Adds a visual regression test that uses the scss file
  • Deprecate old carbon-styles.js styled component

It can be tested via npm run start:carbon

@bpmn-io-tasks bpmn-io-tasks bot added the in progress Currently worked on label Oct 13, 2023
@pinussilvestrus pinussilvestrus force-pushed the 633-carbon-to-scss branch 2 times, most recently from 791bd4a to f62f1ed Compare October 13, 2023 11:26
@pinussilvestrus
Copy link
Contributor Author

I'd like to update the theming specs to use the carbon styles as well. It anyway already uses the /carbon root.

@pinussilvestrus pinussilvestrus force-pushed the 633-carbon-to-scss branch 3 times, most recently from 365b1be to d19947f Compare October 13, 2023 12:02
@pinussilvestrus pinussilvestrus force-pushed the 633-carbon-to-scss branch 3 times, most recently from 6c04d2f to 55cea38 Compare November 7, 2023 09:54
@pinussilvestrus pinussilvestrus marked this pull request as ready for review November 7, 2023 09:59
@bpmn-io-tasks bpmn-io-tasks bot added needs review Review pending and removed in progress Currently worked on labels Nov 7, 2023
@pinussilvestrus
Copy link
Contributor Author

@vsgoulart the transformation should be done 🎉

Things to clarify

  • I for now only deprecated the old styled component, and removed the reference from the package. We could also remove it right now, but we can also wait to support the legacy use case at least.
  • The Tasklist Carbonization is failing because of the point above. I will try out the new sass file in Tasklist and see whether everything works as expected 👍

@pinussilvestrus
Copy link
Contributor Author

pinussilvestrus commented Nov 7, 2023

Some minor things are broken with the sass file (only disabled styles)

image

I will handle these 👍

Here is the draft PR in Tasklist to replace the stylesheet: https://github.com/camunda/tasklist/pull/3749

@pinussilvestrus
Copy link
Contributor Author

The minor issues are resolved ✅

Copy link
Contributor

@vsgoulart vsgoulart left a comment

Choose a reason for hiding this comment

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

Tested it on Tasklist and everything worked fine

@@ -24,7 +24,7 @@
"./dist/assets/form-js-editor.css": "./dist/assets/form-js-editor.css",
"./dist/assets/form-js-editor-base.css": "./dist/assets/form-js-editor-base.css",
"./dist/assets/form-js-playground.css": "./dist/assets/form-js-playground.css",
"./dist/carbon-styles": "./dist/carbon-styles.js",
"./dist/assets/carbon-styles.scss": "./dist/assets/carbon-styles.scss",
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we provide a CSS file too? Not sure if it's necessary, because almost everyone that uses modern Carbon would have to use SCSS

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I thought about that one, but as you said, the main use case currently is Tasklist and our products anyway, so a CSS file would be obsolete. We can wait for feedback and easily add the compilation step on top.

@pinussilvestrus pinussilvestrus merged commit 6f407f4 into develop Nov 8, 2023
9 of 10 checks passed
@pinussilvestrus pinussilvestrus deleted the 633-carbon-to-scss branch November 8, 2023 07:40
@bpmn-io-tasks bpmn-io-tasks bot removed the needs review Review pending label Nov 8, 2023
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.

Carbon: Investigate an alternative for styled-components
2 participants