Skip to content

Angular native wrappers - #3933#4206

Open
GCHQDev01001010 wants to merge 20 commits intomi6:developfrom
GCHQDev01001010:3933-angular-native-output
Open

Angular native wrappers - #3933#4206
GCHQDev01001010 wants to merge 20 commits intomi6:developfrom
GCHQDev01001010:3933-angular-native-output

Conversation

@GCHQDev01001010
Copy link

@GCHQDev01001010 GCHQDev01001010 commented Jan 22, 2026

Summary of the changes

Set up new output targets in the stencil config to output native angular wrapper components in a similar vein to the react components. Versions have been included that will allow the integrating developers to import the components as standalone items one-by-one at need or as a whole module. This also required the addition/alteration of the custom-elements-dist output to create an internal package for the web-components that the angular output plugin could use.

The package is included in the pack all script and other checks. Also includes an Angular schematic in the package so users can install simply with "ng add".

Documentation has been updated to indicate installation and useage of the new package and components and to provide clarity that this is a community-developed and supported addition as per the ICDS team's request.

(This is a rebuild of #4180 )

Related issue

closes #3933
& ic-design-system 850

Checklist

General

  • Changes to docs package checked and committed.
  • All acceptance criteria reviewed and met.

Testing

  • Relevant unit tests and visual regression tests added.
  • Visual testing against Figma component specification completed.
  • [-] Playground stories in React Storybook up to date, with any prop changes and additions addressed. - not needed, see 850 issue comments
  • [-] Compare performance of modified components against develop using Performance addon in React Storybook. - not needed, see 850 issue comments

Accessibility

  • Accessibility Insights FastPass performed.
  • A11y unit test added and yields no issues.
  • [-] A11y plug-in on Storybook yields no issues. - not including Storybook
  • Manual screen reader testing performed using NVDA and VoiceOver.
  • Manual keyboard testing for keyboard controls and logical focus order.
  • Correct roles used and ARIA attributes used correctly where required.
  • Logical heading structure is maintained, and the HTML elements used for headings can be changed to fit within the wider page structure.

Resize/zoom behaviour

  • Page can be zoomed to 400% with no loss of content.
  • Screen magnifier used with no issues.
  • Text resized to 200% with no loss of content.
  • Text spacing increased as per the WCAG 1.4.12 success criterion with no loss of content.

System modes

  • Browser setting 'prefers reduced motion' tested. No animations or motion visible whilst this setting is on.
  • Windows High Contrast mode tested with no loss of content.
  • System light and dark mode tested with no loss of content.
  • Browser support tested (Chrome, Safari, Firefox and Edge).

Testing content extremes

  • Min/max content examples tested with no loss of content or overflow.
  • All prop combinations work without issue.
  • Tested for FOUC (Flash of Unstyled Content) in both SSR (Server-Side Rendering) and SSG (Static Site Generation) settings.
  • Controlled and uncontrolled input components tested.
  • Props/slots can be updated after initial render.

Copy link
Contributor

@GCHQ-Developer-112 GCHQ-Developer-112 left a comment

Choose a reason for hiding this comment

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

This is just an initial review, I will review this again most likely some time next week

dist/
www/
loader/
components/
Copy link
Contributor

Choose a reason for hiding this comment

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

This will mean changes to our components will not be committed - please remove this line

Copy link
Author

Choose a reason for hiding this comment

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

as discussed at the meeting last week, this is a separate folder that gets added in due to the new dist output that is required for the angular output target plugin. I put it in the git ignore to avoid adding excess bulk to the git repo and won't affect the web component source code.
I will return to this and see if there is a better way this can be approached, such that the source components for the angular build match those for the react one or the base web-component output, but our testing so far hasn't worked out.

"dist/",
"loader/",
"hydrate/",
"components/",
Copy link
Contributor

Choose a reason for hiding this comment

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

Why has this been added?

Copy link
Author

Choose a reason for hiding this comment

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

As per previous comment and the discussion held last week, this is the output of a new dist target that we need (with some specific packaging) as a source for the angular plugin to work it's magic turning the web components into the natively wrapped equivalents.
If there is another way to grab the components that doesn't require a new version being output I will try to find it and change this back, but currently this doesn't seem possible.

Copy link
Contributor

@GCHQ-Developer-299 GCHQ-Developer-299 left a comment

Choose a reason for hiding this comment

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

Will review again when @GCHQ-Developer-112 's comments have been addressed

@GCHQDev01001010 GCHQDev01001010 force-pushed the 3933-angular-native-output branch 2 times, most recently from 227365d to cdf95c7 Compare February 11, 2026 13:02
Copy link
Contributor

Choose a reason for hiding this comment

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

Will a directive need to be created for each event emitted by our components?

Copy link
Author

Choose a reason for hiding this comment

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

This is only for the ones that are highlighted in the value-accessors part of the config. They are generated in order to allow angular to treat the relevant components as form controls and to know where to find the value.

Adds references to the upcoming Angular packages to the build, commit and ci files. Also tweaks the
contributing documentation slightly.

re mi6#3933
…ive components

Adds the angularOutputTarget plugin for stencil and includes relevant config so that the natively
wrapped ICDS elements are output as a package. Also adds a pure output for the web components as an
intermediary packaged within @ukic/web-components for the Angular plugin to make use of.

ref mi6#3933
…ing the angular native wrappers

Provides the underlying folders structure, npm config, scripts and such for publishing the Angular
package. Also includes the 3.18.0 output from the stencil generator.

closes mi6#3933
…sure builds output correctly

updates the various exports and entry points to account for changes in how the latest version of the
stencil output targets bundle the module
…r guidance to Contributing.md

As per review comments, angular-community-supported project removed from pre-commit hook and
CONTRIBUTING.md updated so that Angular guidance was separated out from the React section.
…g-add command & updates README

Per PR comments, removed the description from the argument of the ng-add command as it is mildly
redundant. Also updated the Angular package's README for readability and grammar
@GCHQDev01001010 GCHQDev01001010 force-pushed the 3933-angular-native-output branch from 63fe92f to 122eaba Compare March 6, 2026 14:23
Copy link
Author

@GCHQDev01001010 GCHQDev01001010 left a comment

Choose a reason for hiding this comment

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

Pushed with latest version and PR comments addressed

Copy link
Author

Choose a reason for hiding this comment

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

This is only for the ones that are highlighted in the value-accessors part of the config. They are generated in order to allow angular to treat the relevant components as form controls and to know where to find the value.

"dist/",
"loader/",
"hydrate/",
"components/",
Copy link
Author

Choose a reason for hiding this comment

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

As per previous comment and the discussion held last week, this is the output of a new dist target that we need (with some specific packaging) as a source for the angular plugin to work it's magic turning the web components into the natively wrapped equivalents.
If there is another way to grab the components that doesn't require a new version being output I will try to find it and change this back, but currently this doesn't seem possible.

dist/
www/
loader/
components/
Copy link
Author

Choose a reason for hiding this comment

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

as discussed at the meeting last week, this is a separate folder that gets added in due to the new dist output that is required for the angular output target plugin. I put it in the git ignore to avoid adding excess bulk to the git repo and won't affect the web component source code.
I will return to this and see if there is a better way this can be approached, such that the source components for the angular build match those for the react one or the base web-component output, but our testing so far hasn't worked out.

@GCHQ-Developer-112 GCHQ-Developer-112 requested a review from a team March 12, 2026 11:50
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.

3 participants