Repository navigation
feat: Tooltips in collection components - #7289
Closed
snowystinger wants to merge 8 commits into
Closed
snowystinger wants to merge 8 commits into
snowystinger wants to merge 8 commits into
Conversation
# Conflicts: # packages/react-aria-components/src/Tooltip.tsx
snowystinger
marked this pull request as ready for review
January 21, 2025 06:09
snowystinger
commented
Jan 21, 2025
| return Result; | ||
| } | ||
|
|
||
| // TODO fix the override types |
Member
Author
There was a problem hiding this comment.
something about these overrides isn't quite right
export function createBranchComponent<T extends object, P extends {children?: any}, E extends Element>(type: string, render: (props: P, ref: ForwardedRef<E>) => ReactElement, useChildren?: (props: P) => ReactNode): (props: P & React.RefAttributes<T>) => ReactElement | null;
export function createBranchComponent<T extends object, P extends {children?: any}, E extends Element>(type: string, render: (props: P, ref: ForwardedRef<E>, node: Node<T>) => ReactElement, useChildren?: (props: P) => ReactNode): (props: P & React.RefAttributes<T>) => ReactElement | null;
export function createBranchComponent<T extends object, P extends object, E extends Element>(type: string, render: (props: P, ref: ForwardedRef<E>, node?: any) => ReactElement, useChildren: (props: P) => ReactNode = useCollectionChildren) {
They complain in TableView and some others that the Element type on the forwardedRef doesn't match (true, but I haven't figured out how to get the generic to work)
snowystinger
commented
Jan 21, 2025
| export interface CollectionBranchProps { | ||
| /** The collection of items to render. */ | ||
| collection: ICollection<Node<unknown>>, | ||
| collection?: ICollection<Node<unknown>>, |
Member
Author
There was a problem hiding this comment.
opinions on this change? It's kind of breaking as noted in Breadcrumbs
snowystinger
commented
Jan 21, 2025
| ); | ||
| } | ||
|
|
||
| // TODO: what should we do about TooltipTriggers with a single child that wraps the trigger and the tooltip? |
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.
Closes #6800, #7303
Request initially for Tooltips on Tabs, especially when we implement collapse behaviour if we want to go from a long label to icon only before collapsing further into a Picker. This has been requested in Issues before as well.
✅ Pull Request Checklist:
📝 Test Instructions:
🧢 Your Project: