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

(DOP-1921): Fix - Feedback widget tooltips should appear above the floating card #337

Merged
merged 4 commits into from
Jan 26, 2021

Conversation

nlarew
Copy link
Contributor

@nlarew nlarew commented Jan 22, 2021

https://jira.mongodb.org/browse/DOP-1921

  • The feedback card hovers above the right column TOC, which remains usable underneath the card
  • The star rating tooltips render above the card/stars (thanks usePortal prop!)
  • The tooltip text uses nbsp; to keep everything on a single line. (Aesthetic!)

image

@nlarew nlarew requested a review from sophstad January 22, 2021 21:38
@nlarew nlarew changed the title (DOP-1921): Fix - Feedback widget tooltips appear behind the floating card (DOP-1921): Fix - Feedback widget tooltips should appear above the floating card Jan 26, 2021
@@ -9,6 +9,15 @@ import loadable from '@loadable/component';
import { StarIcon } from '../icons';
const Tooltip = loadable(() => import('./LeafygreenTooltip'));

// Given a string, convert all regular space characters to non-breaking spaces
function convertSpacesToNbsp(someString) {
Copy link
Member

Choose a reason for hiding this comment

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

Any reason not to use replace() here? Something like someString.replace(/\s/g, ' ') may be cleaner/faster.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Only reason is that I didn't think of it! Good suggestion, I'll update now.

Copy link
Member

@sophstad sophstad left a comment

Choose a reason for hiding this comment

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

Great find with usePortal! I'm glad we didn't have to enter z-index hell 😁 thanks a lot for taking care of this, Nick!

@sophstad sophstad merged commit 8aca47b into mongodb:master Jan 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants