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

[Feat] Using tippy for map popover #1539

Merged
merged 1 commit into from
Jul 18, 2021
Merged

[Feat] Using tippy for map popover #1539

merged 1 commit into from
Jul 18, 2021

Conversation

heshan0131
Copy link
Contributor

  • Using Tippy to avoid complex positioning calculations. Hopefully, this will also prevent React RangeError: Maximum call stack size exceeded from happening. (BTW, I was wrong, Tippy does expose Popper's virtual element functionality, but under a different name: getReferenceClientRect, so I could use it here). Tried to keep the current tooltip behavior mostly unchanged
  • A bit of a clean up of the display logic in MapContainer
  • Tooltip positioning and overflow prevention now takes the boundaries of the container into account (DeckGL element)
  • Improve CSS styling:
    • using Flexbox instead of absolute positioning for the header row
    • setting margins between the children of the containers instead of before the individual child elements (using & > *+* { margin-top: ...})
    • using CSS grid for the tables - we can specify row-gap and column-gap and avoid outer padding for the content of the cells. This way the content can be correctly aligned with the text outside of the table

- Using Tippy to avoid complex positioning calculations. Hopefully, this will also prevent React RangeError: Maximum call stack size exceeded from happening. (BTW, I was wrong, Tippy does expose Popper's virtual element functionality, but under a different name: [getReferenceClientRect](https://atomiks.github.io/tippyjs/v6/all-props/#getreferenceclientrect), so I could use it here). Tried to keep the current tooltip behavior mostly unchanged
- A bit of a clean up of the display logic in `MapContainer`
- Tooltip positioning and overflow prevention now takes the boundaries of the container into account (`DeckGL` element)
- Improve CSS styling:
     - using Flexbox instead of absolute positioning for the header row
     - setting margins _between_ the children of the containers instead of before the individual child elements (using `& > *+* { margin-top: ...}`)
     - using CSS grid for the tables - we can specify `row-gap` and `column-gap` and avoid outer padding for the content of the cells. This way the content can be correctly aligned with the text outside of the table
@heshan0131 heshan0131 requested a review from ilyabo July 8, 2021 04:35
@heshan0131 heshan0131 merged commit 9bcb341 into master Jul 18, 2021
@delete-merged-branch delete-merged-branch bot deleted the 0707-tippy-tooltip branch July 18, 2021 23:10
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.

2 participants