-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Fix identity server input not showing errors #29272
base: develop
Are you sure you want to change the base?
Conversation
@@ -393,28 +374,27 @@ export default class SetIdServer extends React.Component<IProps, IState> { | |||
|
|||
return ( | |||
<SettingsFieldset legend={sectionTitle} description={bodyText}> | |||
<form className="mx_SetIdServer" onSubmit={this.checkIdServer}> | |||
<Field | |||
<TooltipProvider> |
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.
I decided that rather than trying to work around Field's validiity, we should just update this setting to use EditInPlace
. This means we're using a Compound component, with support for asynchronous actions and built in support for progress and error text.
Ultimately this feels like a much better change.
@@ -60,8 +60,6 @@ interface IProps { | |||
// If specified, contents will appear as a tooltip on the element and | |||
// validation feedback tooltips will be suppressed. | |||
tooltipContent?: JSX.Element | string; | |||
// If specified the tooltip will be shown regardless of feedback | |||
forceTooltipVisible?: boolean; |
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 PR deprecates the last user of forceTooltipVisible
. Given it's a force flag, it feels reasonably okay to remove it and encourage using mode modern components.
This addresses a bug where the identity server input field would not show a tooltip on error as it does not use the same validation logic (for good reason, there may be a user input stage in the middle for terms and conditions acceptance).
The change would have been to adapt the existing
Field
to useforceTooltipVisible
(d82029d) but given Compound offers a better component for this sort of thing, I switched theField
forEditInPlace
.There was one other usage of
forceTooltipVisible
which was being used for informational purposes. Since it was used for a settings flag, I've simply given that settings flag adescription
and used the new settings togglebox to reduce one usage offorceTooltipVisible
.Checklist
public
/exported
symbols have accurate TSDoc documentation.