-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[PM-13876] replace angular validation with html constraints validation #11816
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
98fef39
rough-in passphrase validation failure handling
audreyality 1ad143f
trigger valid change from settings
audreyality 4f76d0f
Merge branch 'main' into tools/PM-13876/prevent-generate-until-valid
audreyality 3ee034a
fix `max` constraint enforcement
audreyality 42be5db
add taps for generator validation monitoring/debugging
audreyality 6832b43
HTML constraints validation rises like a phoenix
audreyality b3accc3
remove min/max boundaries to fix chrome display issue
audreyality dd23ce0
bind settings components as view children of options components
audreyality 9774e8a
remove defunct `okSettings$`
audreyality 9b79bdb
extend validationless generator to passwords
audreyality 1942a92
extend validationless generator to catchall emails
audreyality bd3457c
extend validationless generator to forwarder emails
audreyality e8f6e15
extend validationless generator to subaddress emails
audreyality aec68c3
extend validationless generator to usernames
audreyality 34a05b8
Merge branch 'main' into tools/PM-13876/remove-validation
audreyality e02e08c
fix observable cycle
audreyality 703b310
disable generate button when no algorithm is selected
audreyality c75909b
prevent duplicate algorithm emissions
audreyality c356c7a
add constraints that assign email address defaults
audreyality File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 6 additions & 1 deletion
7
libs/tools/generator/components/src/catchall-settings.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
<form class="box" [formGroup]="settings" class="tw-container"> | ||
<bit-form-field> | ||
<bit-label>{{ "domainName" | i18n }}</bit-label> | ||
<input bitInput formControlName="catchallDomain" type="text" /> | ||
<input | ||
bitInput | ||
formControlName="catchallDomain" | ||
type="text" | ||
(change)="save('catchallDomain')" | ||
/> | ||
</bit-form-field> | ||
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,7 @@ | |
buttonType="main" | ||
(click)="generate('user request')" | ||
[appA11yTitle]="credentialTypeGenerateLabel$ | async" | ||
[disabled]="!(algorithm$ | async)" | ||
> | ||
{{ credentialTypeGenerateLabel$ | async }} | ||
</button> | ||
|
@@ -33,16 +34,19 @@ | |
[appA11yTitle]="credentialTypeCopyLabel$ | async" | ||
[appCopyClick]="value$ | async" | ||
[valueLabel]="credentialTypeLabel$ | async" | ||
[disabled]="!(algorithm$ | async)" | ||
></button> | ||
</div> | ||
</bit-card> | ||
<tools-password-settings | ||
#passwordSettings | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
class="tw-mt-6" | ||
*ngIf="(showAlgorithm$ | async)?.id === 'password'" | ||
[userId]="userId$ | async" | ||
(onUpdated)="generate('password settings')" | ||
/> | ||
<tools-passphrase-settings | ||
#passphraseSettings | ||
class="tw-mt-6" | ||
*ngIf="(showAlgorithm$ | async)?.id === 'passphrase'" | ||
[userId]="userId$ | async" | ||
|
@@ -80,21 +84,25 @@ <h2 bitTypography="h6">{{ "options" | i18n }}</h2> | |
</bit-form-field> | ||
</form> | ||
<tools-catchall-settings | ||
#catchallSettings | ||
*ngIf="(showAlgorithm$ | async)?.id === 'catchall'" | ||
[userId]="userId$ | async" | ||
(onUpdated)="generate('catchall settings')" | ||
/> | ||
<tools-forwarder-settings | ||
#forwarderSettings | ||
*ngIf="!!(forwarderId$ | async)" | ||
[forwarder]="forwarderId$ | async" | ||
[userId]="this.userId$ | async" | ||
/> | ||
<tools-subaddress-settings | ||
#subaddressSettings | ||
*ngIf="(showAlgorithm$ | async)?.id === 'subaddress'" | ||
[userId]="userId$ | async" | ||
(onUpdated)="generate('subaddress settings')" | ||
/> | ||
<tools-username-settings | ||
#usernameSettings | ||
*ngIf="(showAlgorithm$ | async)?.id === 'username'" | ||
[userId]="userId$ | async" | ||
(onUpdated)="generate('username settings')" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 15 additions & 3 deletions
18
libs/tools/generator/components/src/forwarder-settings.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,28 @@ | ||
<form class="box" [formGroup]="settings" class="tw-container"> | ||
<bit-form-field *ngIf="displayDomain"> | ||
<bit-label>{{ "forwarderDomainName" | i18n }}</bit-label> | ||
<input bitInput formControlName="domain" type="text" placeholder="example.com" /> | ||
<input | ||
bitInput | ||
formControlName="domain" | ||
type="text" | ||
placeholder="example.com" | ||
(change)="save('domain')" | ||
/> | ||
<bit-hint>{{ "forwarderDomainNameHint" | i18n }}</bit-hint> | ||
</bit-form-field> | ||
<bit-form-field *ngIf="displayToken"> | ||
<bit-label>{{ "apiKey" | i18n }}</bit-label> | ||
<input bitInput formControlName="token" type="password" /> | ||
<button type="button" bitIconButton bitSuffix bitPasswordInputToggle></button> | ||
<button | ||
type="button" | ||
bitIconButton | ||
bitSuffix | ||
bitPasswordInputToggle | ||
(change)="save('token')" | ||
></button> | ||
</bit-form-field> | ||
<bit-form-field *ngIf="displayBaseUrl" disableMargin> | ||
<bit-label>{{ "selfHostBaseUrl" | i18n }}</bit-label> | ||
<input bitInput formControlName="baseUrl" type="text" /> | ||
<input bitInput formControlName="baseUrl" type="text" (change)="save('baseUrl')" /> | ||
</bit-form-field> | ||
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
catchall-constraints.ts
.