carbon-components-angular icon indicating copy to clipboard operation
carbon-components-angular copied to clipboard

[Compatibility] Is carbon-component-angular compatible with carbon-component 11

Open chayanray opened this issue 3 years ago • 1 comments

Detailed description

carbon-components-angular has peer dependency with carbon-component v10

In package.json "carbon-components": "^10.0.0"

Is the latest version compatible with carbon-components v11?

chayanray avatar Aug 03 '22 11:08 chayanray

Hi @chayanray, currently we are testing Carbon v11. Let me know if you are interested in being our Sponsor User & trying out the migration process. 😃

You can start consuming Carbon v11 by running npm i carbon-components-angular@next. You will need to use Angular v12 & greater. The migration documents can be found in the wiki.

You can also use this storybook for reference (URL subject to change on official release).

If you would like to see the code for v11, you can do so here.

Akshat55 avatar Aug 08 '22 14:08 Akshat55

Hi @Akshat55 Thanks for the reply. There seems to be a few issues with Carbon 11 and angular at the moment. First still not able to figure out how to import equivalent to the following in v11:

import { DataTable, Modal, Pagination } from 'carbon-components'; <-- v10

Also sass loader in angular seems to be a big headache. Even '$spacing-02' or '$text-01' etc. which are indeed present in themes/colors are shown as undefined variables even with the proper modules being loaded. Possibly fixing this is the easy part, except a few mixin issues.

Any ideas on how to solve the first issues?

chayanray avatar Aug 31 '22 07:08 chayanray

Hi @Akshat55 The angular library has peer dependency on Carbon v10, hence it would be difficult to let go of carbon-components v10 and upgrade to v11. Kindly advise.

chayanray avatar Sep 14 '22 08:09 chayanray

carbon-components@v11 is carbon v11, it basically forwards the styles from @carbon/styles package.

Carbon v11 is not compatible with Carbon-components-angular (CCA) v4. Hence, CCA v4 will not get support for carbon v11 as it is a breaking change. The support for v11 is introduced in CCA v5, where @carbon/styles is the new peer dependency. CCA v5 has additional breaking changes as support for all Angular versions preceding Angular 12 have been dropped.

We have NOT released a stable version of v5 as of yet, since we could not find any migration testers. So you if you're willing to try out the migration, that would be great and can bring us a step closer to an official release of CCA v5!

You can start consuming Carbon v11 by running npm i carbon-components-angular@next. You will need to use Angular v12 & greater. The migration documents can be found in the wiki. You can also use this storybook for reference (URL subject to change on official release). If you would like to see the code for v11, you can do so here.

Akshat55 avatar Sep 14 '22 21:09 Akshat55

@Akshat55 CCA v5 has peer dependency on carbon-components@v10 and hence will not allow installation of carbon-components@v11 at the same time. Kindly check the package.json and let me know if I am overlooking something.

chayanray avatar Sep 15 '22 05:09 chayanray

@chayanray

Root package.json (carbon-components-angular@next) now has @carbon/styles as a peer dependency. Same goes for package.json in src directory.

Akshat55 avatar Sep 20 '22 03:09 Akshat55

Closing issue as it has been addressed in the responses. CCA@next supports Carbon 11, not via carbon-components package but @carbon/styles. Please reopen the issue or respond if you have any further questions regarding CCA & Carbon v11.

Akshat55 avatar Oct 11 '22 02:10 Akshat55