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

fix: scatter plot tooltip issue and remove cloudinary rounded image solution #1266

Merged
merged 4 commits into from
Jun 20, 2023

Conversation

OgDev-01
Copy link
Contributor

@OgDev-01 OgDev-01 commented Jun 14, 2023

What type of PR is this? (check all applicable)

  • πŸ• Feature
  • πŸ› Bug Fix
  • πŸ“ Documentation Update
  • 🎨 Style
  • πŸ§‘β€πŸ’» Code Refactor
  • πŸ”₯ Performance Improvements
  • βœ… Test
  • πŸ€– Build
  • πŸ” CI
  • πŸ“¦ Chore (Release)
  • ⏩ Revert

Description

This PR:

Actual problem

  • Not being able to render and style images to be rounded (we got around this using the Cloudinary rounded mage transformation utils function)
  • We could not hover on the tooltip provided by nivo on the scatterplot of which we opened an issue for here

Solution

I was working on a personal project and ran into svgs... and research lead me to find out about foreignObject in svgs. With the foreignObject element, I could render none Scalable Vector Graphic elements as svg. And that was the actual solution to all the above-mentioned issues we had.

Related Tickets & Documents

Fixes #780

Mobile & Desktop Screenshots/Recordings

Before

Screen.Recording.2023-06-14.at.06.58.38.mov

After

Screen.Recording.2023-06-14.at.06.56.57.mov

Added tests?

  • πŸ‘ yes
  • πŸ™… no, because they aren't needed
  • πŸ™‹ no, because I need help

Added to documentation?

  • πŸ“œ README.md
  • πŸ““ docs.opensauced.pizza
  • πŸ• dev.to/opensauced
  • πŸ“• storybook
  • πŸ™… no documentation needed

[optional] Are there any post-deployment tasks we need to perform?

[optional] What gif best describes this PR or how it makes you feel?

@netlify
Copy link

netlify bot commented Jun 14, 2023

βœ… Deploy Preview for design-insights ready!

Name Link
πŸ”¨ Latest commit 2406f93
πŸ” Latest deploy log https://app.netlify.com/sites/design-insights/deploys/6491972b987e0900084683bc
😎 Deploy Preview https://deploy-preview-1266--design-insights.netlify.app
πŸ“± Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Jun 14, 2023

βœ… Deploy Preview for oss-insights ready!

Name Link
πŸ”¨ Latest commit 2406f93
πŸ” Latest deploy log https://app.netlify.com/sites/oss-insights/deploys/6491972b754b4300088fecd0
😎 Deploy Preview https://deploy-preview-1266--oss-insights.netlify.app
πŸ“± Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@OgDev-01 OgDev-01 changed the title refactor: fix scatter plot tooltip issue and remove cloudinary rounded image solution fix: scatter plot tooltip issue and remove cloudinary rounded image solution Jun 14, 2023
@OgDev-01 OgDev-01 added the needs review PRs that need review from core engineering team label Jun 14, 2023
@bdougie
Copy link
Member

bdougie commented Jun 14, 2023

This functionally works, great job!

Can you provide more context to your approach for this fix?

  • Is the lib/utils/roundedImages still needed at this point and should that be deleted?
  • Can you explain the SVG approach to this fix a bit more? I am not quite following the context from just looking at the code.
  • Are we still leveraging cloudinary for caching? I don't remember how much of that was baked into the rounded images.

update:

I already see we are caching separately

https://github.com/open-sauced/insights/blob/beta/lib/utils/cachedImages.ts

@OgDev-01
Copy link
Contributor Author

This functionally works, great job!

Can you provide more context to your approach for this fix?

  • Is the lib/utils/roundedImages still needed at this point and should that be deleted?
  • Can you explain the SVG approach to this fix a bit more? I am not quite following the context from just looking at the code.
  • Are we still leveraging cloudinary for caching? I don't remember how much of that was baked into the rounded images.

update:

I already see we are caching separately

https://github.com/open-sauced/insights/blob/beta/lib/utils/cachedImages.ts

Updates: I have added the pr Description with the actual problem and solution approach
cc: @bdougie

@brandonroberts
Copy link
Contributor

@OgDev-01 are you going to delete the lib/utils/roundedImages.ts file also if its not being used?

@OgDev-01
Copy link
Contributor Author

@OgDev-01 are you going to delete the lib/utils/roundedImages.ts file also if its not being used?

Ooh, i missed that...deleting shortly :<

@OgDev-01 OgDev-01 added ready-to-merge and removed needs review PRs that need review from core engineering team labels Jun 20, 2023
@brandonroberts brandonroberts merged commit ec6b3d5 into beta Jun 20, 2023
@brandonroberts brandonroberts deleted the testing-svg-customization branch June 20, 2023 13:15
github-actions bot pushed a commit that referenced this pull request Jun 20, 2023
## [1.52.0-beta.7](v1.52.0-beta.6...v1.52.0-beta.7) (2023-06-20)

### πŸ› Bug Fixes

* link single highlight dialog contributor info div to contributor profile ([#1279](#1279)) ([67d5a16](67d5a16))
* remove failing maintenance actions ([#1271](#1271)) ([bc516c3](bc516c3))
* scatter plot tooltip issue and remove cloudinary rounded image solution ([#1266](#1266)) ([ec6b3d5](ec6b3d5))
@github-actions
Copy link
Contributor

πŸŽ‰ This PR is included in version 1.52.0-beta.7 πŸŽ‰

The release is available on GitHub release

Your semantic-release bot πŸ“¦πŸš€

github-actions bot pushed a commit that referenced this pull request Jun 20, 2023
## [1.53.0-beta.1](v1.52.0...v1.53.0-beta.1) (2023-06-20)

### πŸ• Features

* handle close highlight dialog ([#1268](#1268)) ([b6a78c7](b6a78c7))

### πŸ› Bug Fixes

* link single highlight dialog contributor info div to contributor profile ([#1279](#1279)) ([67d5a16](67d5a16))
* remove failing maintenance actions ([#1271](#1271)) ([bc516c3](bc516c3))
* scatter plot tooltip issue and remove cloudinary rounded image solution ([#1266](#1266)) ([ec6b3d5](ec6b3d5))
@github-actions
Copy link
Contributor

πŸŽ‰ This PR is included in version 1.53.0-beta.1 πŸŽ‰

The release is available on GitHub release

Your semantic-release bot πŸ“¦πŸš€

github-actions bot pushed a commit that referenced this pull request Jun 22, 2023
## [1.53.0](v1.52.0...v1.53.0) (2023-06-22)

### πŸ• Features

* handle close highlight dialog ([#1268](#1268)) ([b6a78c7](b6a78c7))

### πŸ› Bug Fixes

* language update - change developer to contributor ([#1274](#1274)) ([7e86ac9](7e86ac9)), closes [#1247](#1247)
* link single highlight dialog contributor info div to contributor profile ([#1279](#1279)) ([67d5a16](67d5a16))
* properly format local time displayed on user's profile ([#1282](#1282)) ([604cc62](604cc62))
* remove failing maintenance actions ([#1271](#1271)) ([bc516c3](bc516c3))
* scatter plot tooltip issue and remove cloudinary rounded image solution ([#1266](#1266)) ([ec6b3d5](ec6b3d5))
@github-actions
Copy link
Contributor

πŸŽ‰ This PR is included in version 1.53.0 πŸŽ‰

The release is available on GitHub release

Your semantic-release bot πŸ“¦πŸš€

ElpisHelle added a commit to ElpisHelle/next.js-tailwindcss that referenced this pull request Aug 17, 2023
## [1.52.0-beta.7](open-sauced/app@v1.52.0-beta.6...v1.52.0-beta.7) (2023-06-20)

### πŸ› Bug Fixes

* link single highlight dialog contributor info div to contributor profile ([#1279](open-sauced/app#1279)) ([67d5a16](open-sauced/app@67d5a16))
* remove failing maintenance actions ([#1271](open-sauced/app#1271)) ([bc516c3](open-sauced/app@bc516c3))
* scatter plot tooltip issue and remove cloudinary rounded image solution ([#1266](open-sauced/app#1266)) ([ec6b3d5](open-sauced/app@ec6b3d5))
ElpisHelle added a commit to ElpisHelle/next.js-tailwindcss that referenced this pull request Aug 17, 2023
## [1.53.0-beta.1](open-sauced/app@v1.52.0...v1.53.0-beta.1) (2023-06-20)

### πŸ• Features

* handle close highlight dialog ([#1268](open-sauced/app#1268)) ([b6a78c7](open-sauced/app@b6a78c7))

### πŸ› Bug Fixes

* link single highlight dialog contributor info div to contributor profile ([#1279](open-sauced/app#1279)) ([67d5a16](open-sauced/app@67d5a16))
* remove failing maintenance actions ([#1271](open-sauced/app#1271)) ([bc516c3](open-sauced/app@bc516c3))
* scatter plot tooltip issue and remove cloudinary rounded image solution ([#1266](open-sauced/app#1266)) ([ec6b3d5](open-sauced/app@ec6b3d5))
ElpisHelle added a commit to ElpisHelle/next.js-tailwindcss that referenced this pull request Aug 17, 2023
## [1.53.0](open-sauced/app@v1.52.0...v1.53.0) (2023-06-22)

### πŸ• Features

* handle close highlight dialog ([#1268](open-sauced/app#1268)) ([b6a78c7](open-sauced/app@b6a78c7))

### πŸ› Bug Fixes

* language update - change developer to contributor ([#1274](open-sauced/app#1274)) ([7e86ac9](open-sauced/app@7e86ac9)), closes [#1247](open-sauced/app#1247)
* link single highlight dialog contributor info div to contributor profile ([#1279](open-sauced/app#1279)) ([67d5a16](open-sauced/app@67d5a16))
* properly format local time displayed on user's profile ([#1282](open-sauced/app#1282)) ([604cc62](open-sauced/app@604cc62))
* remove failing maintenance actions ([#1271](open-sauced/app#1271)) ([bc516c3](open-sauced/app@bc516c3))
* scatter plot tooltip issue and remove cloudinary rounded image solution ([#1266](open-sauced/app#1266)) ([ec6b3d5](open-sauced/app@ec6b3d5))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: contributor hover-card is not clickable
3 participants