Skip to content
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

#338 - Tooltip for Report button #374

Merged
merged 1 commit into from
Jan 4, 2023

Conversation

Klotske
Copy link
Contributor

@Klotske Klotske commented Jan 4, 2023

Worked on #338

As requested by comment #338 (comment) added tooltip for the report buttons

Before:
Before
After:
After

@andrewm4894
Copy link
Collaborator

cool, thanks, might even be able to use this to try maybe add some myself elsewhere perhaps.

one thing is what does "Report" mean? is it to report or flag something as sensitive or inappropriate, or broken in some sense?

just asking as im actually not sure so wondering if something we can say thats more specific without getting too wordy.

</Button>
</PopoverTrigger>
<Tooltip hasArrow label="Report" bg="red.600">
<div>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this div necessary?

Copy link
Contributor Author

@Klotske Klotske Jan 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. The Tooltip component refuses to work if its child element is a PopoverTrigger. Same thing in reverse. Tried several approaches but only this one worked.
I think Chakra uses ref forwarding on Tooltip and PopoverTrigger, but those components don't accept ref on their own.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I concur, the Chakra docs show using Box which is basically div.

@fozziethebeat fozziethebeat merged commit 086e1a7 into LAION-AI:main Jan 4, 2023
@Klotske Klotske deleted the add-report-tooltip branch January 5, 2023 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants