Skip to content
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

[Enhancement] Enable strictTemplate checks #1985

Closed
1 of 11 tasks
RasmusKjeldgaard opened this issue Jan 7, 2022 · 0 comments · Fixed by #2711
Closed
1 of 11 tasks

[Enhancement] Enable strictTemplate checks #1985

RasmusKjeldgaard opened this issue Jan 7, 2022 · 0 comments · Fixed by #2711
Assignees
Labels
enhancement New feature or request 👶🏻 New For new issues before prioritisation and refinement NOT Prioritized Issue not yet prioritized and added to a Milestone NOT Tech refined Needs Tech kickoff - solution outlined and agreed

Comments

@RasmusKjeldgaard
Copy link
Collaborator

Describe the enhancement

The fullTemplateTypeCheck flag that we are using in our library configuration (tsconfig.lib.json) will be deprecated in Angular 13, and be replaced by the strictTemplates flag.

With this check enabled in our current repo, we will see errors where we try to use strings for inputs that are actually typed, e.g. 'sm' for the size parameter on the button, that has the type ButtonSize.
Same goes for ThemeColor, other sizes like AvatarSize and so on.

I think in many of these cases, it should be possible to use a string as input value, but that is not possible if we or any projects enable the strictTemplates flag, which will probably be the case for almost everyone when upgrading to Angular 13.

Describe the solution you'd like

Change the enum to a string union-type or a union of strings and the specific size/themecolor enums that already exist.
Beware of breaking changes in this regard.

Have you considered any alternatives?

Are there any additional context?


Checklist:

The following tasks should be carried out in sequence in order to follow the process of contributing correctly.

Refinement

  • Request that the issue is UX refined; do not proceed until this is done.
  • Request that the issue is tech refined; do not proceed until this is done.

Implementation

The contributor who wants to implement this issue should:

  • Make sure you have read: "Before you get coding".
  • Signal to others you are working on the issue by assigning yourself.
  • Create a branch from the master branch following our branch naming convention.
  • Publish a WIP implementation to Github as a draft PR and ask for feedback.
  • Make sure you have implemented tests following the guidelines in: "The good: Test".
  • Update the cookbook with examples and showcases.

Review

Once the issue has been implemented and is ready for review:

  • Do a self-review.
  • Create a pull-request. If you created a draft PR during implementation you can just mark that as "ready for review".
@RasmusKjeldgaard RasmusKjeldgaard added enhancement New feature or request 👶🏻 New For new issues before prioritisation and refinement NOT Prioritized Issue not yet prioritized and added to a Milestone NOT Tech refined Needs Tech kickoff - solution outlined and agreed labels Jan 7, 2022
@mark-drastrup mark-drastrup moved this to 🚀 In Progress in Kirby Sprints Jan 2, 2023
@mark-drastrup mark-drastrup self-assigned this Jan 2, 2023
@mark-drastrup mark-drastrup moved this from 🚀 In Progress to 🔎 Review pending in Kirby Sprints Jan 2, 2023
@mictro mictro moved this from 🔎 Review pending to 👀 Review in progess in Kirby Sprints Feb 20, 2023
@github-project-automation github-project-automation bot moved this from 👀 Review in progess to ✅ Done in Kirby Sprints Feb 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request 👶🏻 New For new issues before prioritisation and refinement NOT Prioritized Issue not yet prioritized and added to a Milestone NOT Tech refined Needs Tech kickoff - solution outlined and agreed
Projects
Archived in project
2 participants