nodejs / nodejs.org

The Node.js® Website
https://nodejs.org
MIT License
6.15k stars 6.21k forks source link

Fix: positioning of the toast notification (copy to clipboard) #6737

Closed TenzDelek closed 4 months ago

TenzDelek commented 4 months ago

Description

The notification toast is positioned correctly at the bottom-right corner of the viewport, but when the page is scrollable, the toast remains in the same position on the screen and does not move down as expected when the page is scrolled. ref: https://nodejs.org/en/blog/announcements/v21-release-announce https://nodejs.org/en/blog/announcements/v20-release-announce

Expected behavior

The notification toast should stay at the bottom-right corner of the viewport regardless of scrolling.

Additional context

This issue seems to be caused by the absolute positioning of the toast container. The toast should be positioned using fixed positioning to ensure it stays in the correct place relative to the viewport when scrolling.

Check List

vercel[bot] commented 4 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nodejs-org ✅ Ready (Inspect) Visit Preview May 26, 2024 6:24am
github-actions[bot] commented 4 months ago
Lighthouse Results URL Performance Accessibility Best Practices SEO Report
/en 🟢 97 🟢 100 🟢 100 🟢 91 🔗
/en/about 🟢 100 🟢 100 🟢 100 🟢 91 🔗
/en/about/previous-releases 🟢 99 🟢 100 🟢 100 🟢 92 🔗
/en/download 🟢 94 🟢 100 🟢 100 🟢 91 🔗
/en/blog 🟢 98 🟢 100 🟢 100 🟢 92 🔗
github-actions[bot] commented 4 months ago

Unit Test Coverage Report

Lines Statements Branches Functions
Coverage: 92%
90.67% (593/654) 76.08% (175/230) 94.57% (122/129)

Unit Test Report

Tests Skipped Failures Errors Time
131 0 :zzz: 0 :x: 0 :fire: 6.373s :stopwatch:
ovflowd commented 4 months ago

Could you please attach screenshots or a recording of before/after behaviour?

TenzDelek commented 4 months ago

Could you please attach screenshots or a recording of before/after behaviour?

Before:

https://github.com/nodejs/nodejs.org/assets/122612557/5c2eacbd-3306-4e95-81a4-ac8819aad14d

After:

https://github.com/nodejs/nodejs.org/assets/122612557/2b4cbcf3-51d2-44a9-93a6-d06b93dc119d

cc @ovflowd