-
Notifications
You must be signed in to change notification settings - Fork 189
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
build(angular): update build process for angular 13 #1304
Conversation
@theiliad - any update on official Angular 13 support? Are the blockers mainly the Storyboard? |
Hi, I think for the most part yes. Lerna, storybook & angular 13 aren't playing together 😞 |
Does this repo help https://github.com/nstuyvesant/carbon-charts-angular-13 ? I'm using Carbon Charts across several Angular 13 projects and it's working well aside from having to do an |
@theiliad - are the Storybook issues for Angular 13 related to SCSS by chance? I kept getting errors trying out multiple combinations of loading the theme then styles. I ended up bypassing SCSS altogether and imported the styles-g90.css directly... @import '@carbon/charts/styles-g90.css'; The errors when using SCSS looked like this...
Interestingly, the Carbon Charts Svelte package does everything I need SCSS-wise without me having to do anything manual like I do with Angular and Carbon Charts. There seem to be a lot of different sources on what to do to setup themes with Carbon Charts but they are each different and all except one don't seem to work with Angular 13. |
Yes there are lots of issues that we're having with angular. Some are related to it playing nice in a monorepo, some to storybook and some to sass. I've spent probably over a week trying to get angular 13 to fit inside this monorepo but have had no luck 😞 |
With the latest version of Carbon Charts and themes, what is the recommended approach to load theme g90 and Carbon Charts styles via SCSS? Perhaps I can try debugging this a bit this weekend. |
We're still figuring out the best path for that. Keep in mind that 1.x is currently in beta as our storybook & npm docs mention |
Sure. I'd be willing to experiment if you have any recommendations.
OK - let me know if you have any recommendations re: SCSS, themes, and the latest beta and I'll experiment a bit and provide feedback. |
I'll be adding those pieces soon, also to the strybook tutorials section |
Angular 14 was just released... https://blog.angular.io/angular-v14-is-now-available-391a6db736af |
Was playing with Angular 14.0.1 and @carbon/charts@1.1.0. Had to do a few things to make it work...
I also tried loading the theme first... @use '@carbon/styles/scss/themes';
@use '@carbon/styles/scss/theme' with (
$theme: themes.$g90,
);
@use "@carbon/charts/styles/styles"; but the G90 theme was not applied to Carbon Charts. It continued to use the default theme. Have to load the full themes that apply to more than just Carbon Charts generates a lot of unwanted CSS increasing my bundle size. I'm going to revert @carbon/charts to 0.58.1 and grab its @carbon/charts/styles-g90.css and add that to my project after chopping it down to only classes needed by my charts. It would be great to have an option to set some SCSS variables for fonts, colors, etc. then import a chart type-specific SCSS that uses a bunch of Carbon Charts has attractive charts and an API that's easy to work with. It's a shame it suffers from the heaviness of the styling for the Carbon Design System. |
Hi @nstuyvesant, for theming in 1.x pls read this https://charts.carbondesignsystem.com/?path=/story/docs-tutorials--themes |
@theiliad - Thank you! The new theming approach is very straightforward. Wish I had that link a month ago! |
Here's all of my style setup for my donut, gauge, and vertical bar chart...
My only dependencies in package.json are: "@carbon/charts-angular": "^1.1.0",
"@carbon/import-once": "^10.7.0" The latter was required to get this to work with Angular 14.0.1 (but it is working). Perhaps that can help with the Storybook issues? |
@theiliad - probably close this old PR given where we are. |
DCO Assistant Lite bot: Thanks for your submission! We ask that you all sign our Developer Certificate of Origin before we can accept your contribution. You can sign the DCO by adding a comment below using this text: I have read the DCO document and I hereby sign the DCO. 1 out of 2 committers have signed the DCO. |
No description provided.