-
-
Notifications
You must be signed in to change notification settings - Fork 226
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: add custom tooltip component to contributors bar chart #501
Conversation
β Deploy Preview for design-insights ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
β Deploy Preview for oss-insights ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Keeping this as a draft till the z-index drama is solved... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keeping this as a draft till the z-index drama is solved...
Thatβs happening because the second card is βaboveβ the first card. So anything inside the first card will be behind the second card.
What you can do is:
- Add a base
z-index
and a positionrelative
to all contributor cards - Then add a higher
z-index
when the contributor card is hovered. That will make sure the hovered card stays βaboveβ all other cards. - Finally, add a
z-index
to the tooltip, to make sure it is above all elements inside the card itself.
Let me know if it helps.
Actually, as @0-vortex mentioned on Slack, the fix I just told you is a "hack". It works, but it's not ideal. It's best to use a Tooltip library and style it as needed. Here's one of the best: Other tooltips: |
Radix Ui now leveraged for the tooltip ππ |
β¦53-languages-in-contributors-expands
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! π
Great job implementing this library in such a short time frame, there are some minor tweaks we can do like delay duration or giving a different position based on element index (left->right, center->center, right->left for example) etc, however that will come with time and us actually having variable tooltips.
For now I think this is ready to go on beta! π π π
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work Sunday! It's a nice implementation.
I added some small adjustments to the UI, so it's more readable and balanced. π
components/molecules/CardHorizontalBarChart/card-horizontal-bar-chart.tsx
Outdated
Show resolved
Hide resolved
components/molecules/CardHorizontalBarChart/card-horizontal-bar-chart.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Compliance Checks
Thank you for your Pull Request! We have run several checks on this pull request in order to make sure it's suitable for merging into this project. The results are listed in the following section.
Watched Files
This pull request modifies specific files that require careful review by the maintainers.
Files Matched
- npm-shrinkwrap.json
- package.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aside from that, LGTM π
components/molecules/CardHorizontalBarChart/card-horizontal-bar-chart.tsx
Outdated
Show resolved
Hide resolved
β¦r-chart.tsx Co-authored-by: Eryc <101464991+pixelsbyeryc@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
## [1.12.0-beta.2](v1.12.0-beta.1...v1.12.0-beta.2) (2022-10-10) ### π Features * add custom tooltip component to contributors bar chart ([#501](#501)) ([855d66b](855d66b))
π This PR is included in version 1.12.0-beta.2 π The release is available on GitHub release Your semantic-release bot π¦π |
Way to go, Sunday! π btw, I love this "co-author" feature π |
## [1.12.0](v1.11.0...v1.12.0) (2022-10-11) ### π Bug Fixes * update pagination counts for repositories and contributors ([#503](#503)) ([1332fab](1332fab)) ### π Features * add `PullRequestPieChart` component ([#514](#514)) ([9132a93](9132a93)) * add custom tooltip component to contributors bar chart ([#501](#501)) ([855d66b](855d66b))
π This PR is included in version 1.12.0 π The release is available on GitHub release Your semantic-release bot π¦π |
* origin/main: (114 commits) chore(minor): release 1.14.0 [skip ci] chore(patch): release 1.14.0-beta.3 on beta channel [skip ci] fix: add root href to header logo component image (#537) fix: correct card horizontal tooltip error on storybook (#536) chore(patch): release 1.14.0-beta.2 on beta channel [skip ci] fix: humanize numbers and use absolute values in highlight cards (#535) chore(minor): release 1.14.0-beta.1 on beta channel [skip ci] feat: allow for displaying insights based on custom topics (#528) fix: show pr velocity in relative days (#534) chore(minor): release 1.13.0 [skip ci] chore(minor): release 1.13.0-beta.1 on beta channel [skip ci] feat: re-enable toggling of bots on scatterchart (#530) chore(patch): release 1.12.0-beta.4 on beta channel [skip ci] fix: remove duplicate contributors from the scatter chart (#529) chore(minor): release 1.12.0-beta.3 on beta channel [skip ci] feat: implement InsightPageCard component (#519) chore(minor): release 1.12.0 [skip ci] chore(minor): release 1.12.0-beta.2 on beta channel [skip ci] feat: add custom tooltip component to contributors bar chart (#501) chore(minor): release 1.12.0-beta.1 on beta channel [skip ci] ...
## [1.12.0-beta.2](open-sauced/app@v1.12.0-beta.1...v1.12.0-beta.2) (2022-10-10) ### π Features * add custom tooltip component to contributors bar chart ([#501](open-sauced/app#501)) ([855d66b](open-sauced/app@855d66b))
## [1.12.0](open-sauced/app@v1.11.0...v1.12.0) (2022-10-11) ### π Bug Fixes * update pagination counts for repositories and contributors ([#503](open-sauced/app#503)) ([1332fab](open-sauced/app@1332fab)) ### π Features * add `PullRequestPieChart` component ([#514](open-sauced/app#514)) ([9132a93](open-sauced/app@9132a93)) * add custom tooltip component to contributors bar chart ([#501](open-sauced/app#501)) ([855d66b](open-sauced/app@855d66b))
What type of PR is this? (check all applicable)
Description
This PR creates a custom
Tooltip
component in the atoms directory... 80% completed but opening this PR to seek help with some CSS troubles πDetails:
The idea was to create a dynamic tooltip component that can be used across all components...so radix was leveraged to create the tooltip component
had to set some props to make it completely dynamic:
the tooltip message
the direction to display
e.g: left, right, top, bottom...Related Tickets & Documents
Fixes #453
Mobile & Desktop Screenshots/Recordings
Added tests?
Added to documentation?
[optional] Are there any post-deployment tasks we need to perform?
[optional] What gif best describes this PR or how it makes you feel?