Skip to content

Fix identity server input not showing errors#29272

Closed
Half-Shot wants to merge 5 commits into
developfrom
hs/fix-error-tooltip
Closed

Fix identity server input not showing errors#29272
Half-Shot wants to merge 5 commits into
developfrom
hs/fix-error-tooltip

Conversation

@Half-Shot
Copy link
Copy Markdown
Member

@Half-Shot Half-Shot commented Feb 14, 2025

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 use forceTooltipVisible (d82029d) but given Compound offers a better component for this sort of thing, I switched the Field for EditInPlace.

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 a description and used the new settings togglebox to reduce one usage of forceTooltipVisible.

Checklist

  • Tests written for new code (and old code if feasible).
  • New or updated public/exported symbols have accurate TSDoc documentation.
  • Linter and other CI checks pass.
  • I have licensed the changes to Element by completing the Contributor License Agreement (CLA)

@Half-Shot Half-Shot requested a review from a team as a code owner February 14, 2025 17:29
@Half-Shot Half-Shot changed the title Hs/fix error tooltip Fix identity server input not showing an error Feb 14, 2025
@Half-Shot Half-Shot changed the title Fix identity server input not showing an error Fix identity server input not showing errors Feb 14, 2025
<SettingsFieldset legend={sectionTitle} description={bodyText}>
<form className="mx_SetIdServer" onSubmit={this.checkIdServer}>
<Field
<TooltipProvider>
Copy link
Copy Markdown
Member Author

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.

// validation feedback tooltips will be suppressed.
tooltipContent?: JSX.Element | string;
// If specified the tooltip will be shown regardless of feedback
forceTooltipVisible?: boolean;
Copy link
Copy Markdown
Member Author

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.

@Half-Shot
Copy link
Copy Markdown
Member Author

Half-Shot commented Feb 17, 2025

Rather than trying to do effectively two changes here, I've split these out into two PRs #29280 / #29282

@Half-Shot Half-Shot closed this Feb 17, 2025
@t3chguy t3chguy deleted the hs/fix-error-tooltip branch February 11, 2026 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant