evidence-dev / evidence

Business intelligence as code: build fast, interactive data visualizations in pure SQL and markdown
https://evidence.dev
MIT License
3.38k stars 163 forks source link

Fix scrollbar appearing when hovering last chart on page #1939

Closed hughess closed 1 week ago

hughess commented 1 week ago

Description

When hovering the last chart on a page, occasionally a scroll would appear on the page.

This adds padding to the article to eliminate the scrollbar.

Before

CleanShot 2024-04-24 at 16 01 20

After

CleanShot 2024-04-24 at 16 02 11

Checklist

changeset-bot[bot] commented 1 week ago

🦋 Changeset detected

Latest commit: 63908810d17dfc77b4ab8546d0f2721434dba995

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages | Name | Type | | ----------------------------- | ----- | | @evidence-dev/core-components | Patch | | @evidence-dev/evidence | Patch | | my-evidence-project | Patch | | @evidence-dev/components | Patch | | evidence-test-environment | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

netlify[bot] commented 1 week ago

Deploy Preview for evidence-development-workspace ready!

Name Link
Latest commit 63908810d17dfc77b4ab8546d0f2721434dba995
Latest deploy log https://app.netlify.com/sites/evidence-development-workspace/deploys/662966f1ef04d9000737b8bc
Deploy Preview https://deploy-preview-1939--evidence-development-workspace.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 configuration.

netlify[bot] commented 1 week ago

Deploy Preview for next-docs-evidence ready!

Name Link
Latest commit 63908810d17dfc77b4ab8546d0f2721434dba995
Latest deploy log https://app.netlify.com/sites/next-docs-evidence/deploys/662966f13818d800098f68b1
Deploy Preview https://deploy-preview-1939--next-docs-evidence.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 configuration.

hughess commented 1 week ago

@mcrascal this seems to work well, but a couple things I wasn't sure about on this one:

mcrascal commented 1 week ago

@hughess this seems totally fine, but I think the extra space should be added to the charts themselves. As an example, datatable doesn't cause this bug because it includes sufficient space to accommodate the download buttons.

With this fix, I think this will crop up again when composing charts into wrapper components (like a modal), or when people are building custom components.