-
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-13818] Allow user to edit self-hosted url during registration #11790
[PM-13818] Allow user to edit self-hosted url during registration #11790
Conversation
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found.
Additional details and impacted files@@ Coverage Diff @@
## main #11790 +/- ##
==========================================
- Coverage 33.63% 33.62% -0.01%
==========================================
Files 2821 2823 +2
Lines 88115 88171 +56
Branches 16784 16797 +13
==========================================
+ Hits 29635 29647 +12
- Misses 56160 56202 +42
- Partials 2320 2322 +2 ☔ View full report in Codecov by Sentry. |
…-url-during-registration
private handleSelfHostedSelection(prevSelectedRegion: RegionConfig | Region.SelfHosted | null) { | ||
return from(SelfHostedEnvConfigDialogComponent.open(this.dialogService)).pipe( | ||
tap((result: boolean | undefined) => | ||
this.handleSelfHostedEnvConfigDialogResult(result, prevSelectedRegion), | ||
), | ||
); | ||
} |
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.
Converting the open
promise to an observable requires a lot of ceremony that isn't buying us anything, since we are effectively converting it back to a promise with take(1)
and subscribe()
in onSelectClosed
.
What do you think of this alternative?
type RegionSelection = RegionConfig | Region.SelfHosted | null;
protected async onSelectClosed(selection: RegionSelection) {
if (selection === Region.SelfHosted) {
const result = await SelfHostedEnvConfigDialogComponent.open(this.dialogService)
return this.handleSelfHostedEnvConfigDialogResult(result, selection);
}
}
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.
…-url-during-registration
…-url-during-registration
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.
See #11790 (comment)
…-registration' of https://github.com/bitwarden/clients into auth/pm-13818/allow-user-to-edit-self-hosted-url-during-registration
…-url-during-registration
…-url-during-registration
@@ -31,6 +33,7 @@ export class SelectComponent<T> implements BitFormFieldControl, ControlValueAcce | |||
/** Optional: Options can be provided using an array input or using `bit-option` */ | |||
@Input() items: Option<T>[] = []; | |||
@Input() placeholder = this.i18nService.t("selectPlaceholder"); | |||
@Output() closed = new EventEmitter<T>(); |
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.
@Output() closed = new EventEmitter<T>(); | |
@Output() closed = new EventEmitter(); |
protected async onSelectClosed(selection: RegionSelection) { | ||
if (this.selectedRegion.value === Region.SelfHosted) { | ||
const result = await SelfHostedEnvConfigDialogComponent.open(this.dialogService); | ||
return this.handleSelfHostedEnvConfigDialogResult(result, selection); | ||
} | ||
} |
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.
This needs to be refactored to no longer expect a parameter, correct? Since close
no longer emits a value.
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.
Whoops yes - here's the fix: 2533716
New Issues
Fixed Issues
|
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.
DS changes look good, thanks!
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-13818?atlOrigin=eyJpIjoiZmQ2Njc1OTg0NTg5NGI1NDkxMjdhZmQ0NThiOGJmZjciLCJwIjoiaiJ9
📔 Objective
Re-launch the
self-hosted-env-config-dialog
after a user has previously selected the self hosted option from the "Creating account on" select. This allows a user to go back and edit values after the dialog has closed.📸 Screenshots
⏰ Reminders before review
🦮 Reviewer guidelines
:+1:
) or similar for great changes:memo:
) or ℹ️ (:information_source:
) for notes or general info:question:
) for questions:thinking:
) or 💭 (:thought_balloon:
) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion:art:
) for suggestions / improvements:x:
) or:warning:
) for more significant problems or concerns needing attention:seedling:
) or ♻️ (:recycle:
) for future improvements or indications of technical debt:pick:
) for minor or nitpick changes