Skip to content

feat(app): better handle multiple types, default values, and options for input/output/model signals#1526

Merged
vogloblinsky merged 5 commits intocompodoc:developfrom
bameyrick:input-signals-improvements
Nov 12, 2024
Merged

feat(app): better handle multiple types, default values, and options for input/output/model signals#1526
vogloblinsky merged 5 commits intocompodoc:developfrom
bameyrick:input-signals-improvements

Conversation

@bameyrick
Copy link
Contributor

Extends the work in #1439 to:

  • Allow for options to be provided with a default value input('value', { transform: (value) => value.toLowerCase() })
  • Allow for multiple types for inputs e.g. input<string | number>(), input<'button' | 'reset'>()

This doesn't fully address some of the comments in #1439 to use babel, however it should handle more cases for input/output/model signals.

Closes #1498

@vogloblinsky
Copy link
Contributor

Hi,
Thank for this PR.
Could you add unit tests for that in test/src/cli/cli-generation-big-app.spec.ts?
🙏🏻

@bameyrick
Copy link
Contributor Author

Hi @vogloblinsky, I've added some (admittedly very messy) tests and made sure the signal's default values/types also work with periods and underscores .

@vogloblinsky vogloblinsky merged commit 2cb2dbb into compodoc:develop Nov 12, 2024
@bameyrick bameyrick deleted the input-signals-improvements branch November 12, 2024 16:43
@pvds
Copy link

pvds commented Nov 13, 2024

@bameyrick great work!

@vogloblinsky I'm not sure whether compodoc has a release schedule.
When do you plan to create a new release?

@vogloblinsky
Copy link
Contributor

I am on it, this week ;)

@pvds
Copy link

pvds commented Nov 26, 2024

@vogloblinsky I guess you're busy, any update on the release?

@valentinpalkovic
Copy link
Contributor

@vogloblinsky Any chance of getting this fix released soon? :)

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.

[BUG] Input Signals implementation is excluding valid cases

4 participants