Skip to content

fix: move close button to top of share modal for better UX#192

Merged
mattqdev merged 2 commits intophysicshub:mainfrom
maaviah17:fix/modal-close-button
Feb 18, 2026
Merged

fix: move close button to top of share modal for better UX#192
mattqdev merged 2 commits intophysicshub:mainfrom
maaviah17:fix/modal-close-button

Conversation

@maaviah17
Copy link
Contributor

📘 Pull Request Template – PhysicsHub

Thank you for contributing to PhysicsHub!
Please complete the sections below to help us review your pull request efficiently.


🔍 Description

This PR improves the usability of the share modal by moving the close button to the top of the modal container. Previously, the close button was placed after the social media icons, requiring users to scroll before being able to dismiss the modal.

Changes Made

  • Moved the close button to the modal header section
  • Improved layout alignment for better visual structure
  • Added a dedicated header container for cleaner component organization
  • Ensured the close button is easily accessible without scrolling

Benefits

  • Better user experience and accessibility
  • Faster interaction for users, especially on smaller screens
  • Follows common modal UI/UX conventions
  • Improves overall layout consistency

Closes #191


✅ Checklist

Before requesting a review, please ensure that you have:

  • Verified that the project builds and runs locally (npm run dev)
  • Ensured no ESLint or TypeScript warnings/errors remain
  • Updated documentation, comments, or in-code explanations where needed
  • Verified responsiveness across devices (desktop, tablet, mobile)
  • Followed the CONTRIBUTING.md guidelines

🎨 Visual Changes (if UI-related)

Before

Screenshot 2026-02-16 at 05 19 06

After

Screenshot 2026-02-16 at 06 19 29

📂 Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to change)
  • 📝 Documentation update
  • ♻️ Refactor / code quality improvement
  • [x ] 🎨 UI/UX enhancement
  • 🔒 Security improvement

🧩 Additional Notes for Reviewers

@maaviah17
Copy link
Contributor Author

Hi, I’ve implemented the requested changes and attached screenshots for reference.
Please let me know if any modifications are needed. Thank you!

@physicshub
Copy link
Owner

Hey, sorry for late reply, your PR is fine and almost ready to be merged. Unfortunatly while trying to delete the package-lock.json from the PR, I accidentally deleted it entirely. Can you please update the PR so that these changes aren't recorded?

After this I'll merge your PR

@maaviah17 maaviah17 force-pushed the fix/modal-close-button branch from 02d9ebd to e52572e Compare February 18, 2026 08:08
@maaviah17
Copy link
Contributor Author

I’ve restored the package-lock.json file and updated the PR.
Please let me know if anything else is needed. Thanks!

@mattqdev mattqdev merged commit f04111d into physicshub:main Feb 18, 2026
1 check passed
@mattqdev
Copy link
Collaborator

Thank you so much for this fix!

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.

UI Enhancement: Place close button at top right instead of after social icons

3 participants

Comments