ng-clarity icon indicating copy to clipboard operation
ng-clarity copied to clipboard

chore: angular 14

Open coryrylan opened this issue 2 years ago • 6 comments

Angular is now cutting v14 releases. To prepare for the 14 release @clr/angular will need a beta branch to start cutting v14 versions.

  • update @clr/angular to @cds/core and @cds/angular v6 latest
  • enable the core shim by default in @clr/angular this will fix/enable high contrast and other a11y fixes in @clr/angular
    • https://beta--core-demo.netlify.app/?path=/story/themes-clarity-ui--page
  • Adjust the focus trap on ClrNavLevel to use the newly provided focus trap from @cds/core v6

coryrylan avatar Apr 21 '22 21:04 coryrylan

Angular 14 went live a week ago. It's since impossible to add clarity to an up to date project. Any news on this chore?

ShutLee avatar Jun 14 '22 15:06 ShutLee

@ShutLee we are investigating if we need to upgrade to v14 or you can use Clarity v13 with Angular v14. So far seems to work fine.

https://stackblitz.com/edit/clarity-dark-theme-clr13-cds6-yeqqs3

I need to investigate more on example how the bundle size increases but you are able to use Angular 14 and Clarity v13 at the moment.

bbogdanov avatar Jun 14 '22 15:06 bbogdanov

It's since impossible to add clarity to an up to date project.

It's not impossible. You may get a peer dependency warning, but as far we know right now, it's safe to ignore the warning.

kevinbuhmann avatar Jun 14 '22 15:06 kevinbuhmann

ok, so we just have to use npm install instead of ng add and use --force ?

Rebolon avatar Jun 22 '22 07:06 Rebolon

ok, so we just have to use npm install instead of ng add and use --force ?

Using --force works for me, although I received this error when attempting to build:

An unhandled exception occurred: Script file node_modules/@webcomponents/webcomponentsjs/custom-elements-es5-adapter.js does not exist.

Which I solved with:

npm install @webcomponents/webcomponentsjs --force

I'm not sure if manually installing webcomponentjs is a v14 issue or happened in previous versions, but it's not mentioned in the getting started guide.

jdh148 avatar Jun 23 '22 01:06 jdh148

for now the solution is to manualy force each package, including webcomponent

the full procedure is here: https://clarity.design/get-started/developing/angular/ The only difference is to force the npm install

npm install @clr/icons @clr/angular @clr/ui @cds/core @webcomponents/webcomponentsjs --force

ShutLee avatar Jun 23 '22 06:06 ShutLee

We widened the peer dependency a few versions back on 13.x to allow Angular 14. We don't plan on releasing a v14 of ng-clarity at this time. We are focusing on planning for v15.

kevinbuhmann avatar Nov 08 '22 17:11 kevinbuhmann

Hi there 👋, this is an automated message. To help Clarity keep track of discussions, we automatically lock closed issues after 14 days. Please look for another open issue or open a new issue with updated details and reference this one as necessary.

github-actions[bot] avatar Nov 23 '22 01:11 github-actions[bot]