Skip to content

Conversation

@Shubhashish-Chakraborty

📝 Description

The Sugar Labs website has some long pages. When a user scrolls and goes to the bottom of a long page, they have to manually scroll all the way back to the top, which can be inconvenient. i SOLVED the issue which i opened #546 with adding a single line (and importing the component) in the App.tsx and created a component ScrollToTop. Kept the Button's theme greenish - matching the sugarlabs theme kinda..

🔗 Related Issue

Fixes #546

🔄 Type of Change

  • 📱 New Feature (new page, component, or functionality)
  • 🎨 UI/UX Update (visual changes, styling improvements)
  • ⚡ Performance Improvement

📷 Visual Changes

scrollToTopPR.mp4

🧪 Testing Performed

📱 Browser Compatibility

  • Chrome (Version: )
  • Firefox (Version: )
  • Safari (Version: )
  • Edge (Version: )
  • Mobile Chrome (Device: )
  • Mobile Safari (Device: )

🖥️ Responsive Design

  • Desktop (1200px+)
  • Tablet (768px - 1199px)
  • Mobile (320px - 767px)

✅ Test Cases

  1. Button appears after scrolling 300px down.
  2. Button disappears when scrolled back to top.
  3. Button visibility threshold at exactly 300px.
  4. Clicking button smoothly scrolls to top.
  5. Button maintains visibility during scroll.

♿ Accessibility

  • Proper heading hierarchy maintained
  • ARIA labels added where needed
  • Color contrast requirements met
  • Keyboard navigation works correctly
  • Screen reader testing performed

📋 PR Checklist

  • My code follows the project's coding style guidelines
  • I have tested these changes locally
  • I have updated the documentation accordingly
  • My changes generate no new warnings or console errors
  • I have checked for and resolved any merge conflicts
  • I have optimized images/assets (if applicable)
  • I have validated all links are working correctly

📚 Reviewer Resources

Thank you for contributing to the Sugar Labs website! 🎉

@github-actions
Copy link

❌ Checks Failed

Status: 🚫 Not ready to merge

Please fix the following issues before merging:

📝 Code Linting Failed

Issue: Code formatting or style violations detected.

Specific problems:

• Code formatting issues detected

How to fix:

Platform Command Description
🐧 Unix/macOS/Linux npm run format Auto-fix all formatting issues
🪟 Windows npm run format:file <filename> Fix specific files
🔍 Check Only npm run format:check Check formatting without fixing

Need help with linting? Check out the Linting Guide for Windows Users for detailed instructions.


🛠️ Next Steps

  1. Fix the issues mentioned above
  2. Test locally to ensure everything works
  3. Push your fixes to this branch
  4. Wait for re-check - This bot will automatically run again

🤖 This comment will be updated automatically when you push new commits

@github-actions
Copy link

🎉 All Checks Passed!

Status: ✅ Ready to merge

✅ Completed Workflows

Workflow Status Details
🔨 Continuous Integration ✅ Passed Build completed successfully
📝 Code Linting ✅ Passed All formatting and style checks passed

🚀 This PR is ready for review and can be safely merged to main branch!

Great work! Your code meets all quality standards. 👏

@Shubhashish-Chakraborty
Copy link
Author

hey @sa-fw-an
ive finally raised the PR after your approval #546
do check this out👍

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.

Feature Request: Add a "Scroll to Top" button : improves UX

1 participant