feat(website): make error tooltip direction configurable in AdvancedQueryFilter#1204
Open
fhennig wants to merge 2 commits into
Open
feat(website): make error tooltip direction configurable in AdvancedQueryFilter#1204fhennig wants to merge 2 commits into
fhennig wants to merge 2 commits into
Conversation
…ueryFilter Adds an optional `errorTooltipClass` prop to `AdvancedQueryFilter` (and the internal `ErrorIconWithTooltip`) so callers can control which direction the validation error tooltip opens. Defaults to the original `tooltip-left lg:tooltip-right` so existing usages are unchanged. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
errorTooltipClassprop toAdvancedQueryFilterthat is forwarded to the internalErrorIconWithTooltipcomponent, allowing callers to control which direction the validation error tooltip opens.'tooltip-left lg:tooltip-right'(the original hardcoded value), so all existing usages are unchanged.Design note
We considered using an explicit union type (
'left' | 'right' | 'top' | 'bottom') with a lookup map to avoid Tailwind purging dynamic class names. However, that approach would have made it impossible for callers to pass responsive variants liketooltip-left lg:tooltip-rightwithout introducing extra complexity. Accepting a plain class string keeps full flexibility — callers are responsible for using complete Tailwind class names so the compiler can detect them.Screenshot
With
tooltip-topTest plan
AdvancedQueryFiltershow the tooltip in the same position as before (left on small screens, right on large screens)errorTooltipClass="tooltip-top"sees the tooltip pinned top at all breakpoints🤖 Generated with Claude Code