GovAlta / ui-components

ui-components contains the code you need to start building a user interface for Government of Alberta platforms and services.
Apache License 2.0
14 stars 24 forks source link

Spike: Investigate options for Angular type safety #1379

Open ArakTaiRoth opened 10 months ago

ArakTaiRoth commented 10 months ago

Info

Currently there is no type safety with Angular. We ask people to implement CUSTOM_ELEMENTS_SCHEMA when they import our packages. By doing this, it disables type safety for their application, which is not desirable. This disables things like failing builds if they misspell a property or use a property that doesn't exist. They expect the application to work, and it doesn't, but there was no build error, so they're left to figure it out on their own what the issue is.

We have seen teams build their own Angular wrappers around our components to combat this issue. But that's a lot of work to hoist onto every other Angular team.

Options

We have come up with a few things that could be options:

  1. Custom Language Server
  2. Implement our own Angular wrappers (can this be done in such a way that it doesn't constitute a major version change)
  3. Implement our own custom VS Studio plugin (this could work, but only helps developers using VS Studio)

We aren't exclusive to the options listed above, if there is another option that we haven't presented that could be better, please investigate it.

Acceptance Criteria:

We have a list of options that could work (what was listed above, we don't know it will actually work). With an idea for each one on effort to implement, how much it will effect our users (effort for them), and how effective it will be at solving the issue.

tzuge commented 8 months ago

:tada: This issue has been resolved in version 4.16.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

tzuge commented 8 months ago

:tada: This issue has been resolved in version 1.16.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

tzuge commented 5 months ago

:tada: This issue has been resolved in version 2.6.0-alpha.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

tzuge commented 5 months ago

:tada: This issue has been resolved in version 2.6.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

cjam commented 4 months ago

what is the status of this issue? Where does angular type safety fall on the roadmap for this project?

I see @chrisolsen mentioned this in a PR but it was unclear as to the state of things.. I can only assume it still doesn't work based on this being still open.

chrisolsen commented 4 months ago

@cjam Angular wrapping components are currently in progress.

cjam commented 4 months ago

@chrisolsen I'm sure you're already aware of all the work Mitch R did, but in the event that you are not he has wrapped all / most of the components from this library over here:

https://github.com/GovAlta-EMU/aed-components/tree/main/libs/aed-ui-components/src/lib/goa-components

Perhaps it could just be pulled in and maintained in here by your team instead of externally.

chrisolsen commented 4 months ago

Thanks @cjam, but I don't have an EMU account so I don't have access to that repo. Would it be possible to send me the zip file via Slack?