Skip to content

introduce fun fact toast message with proper styling#366

Merged
mattqdev merged 1 commit into
physicshub:mainfrom
DevxNadeem:fun-fact-toast
Jun 30, 2026
Merged

introduce fun fact toast message with proper styling#366
mattqdev merged 1 commit into
physicshub:mainfrom
DevxNadeem:fun-fact-toast

Conversation

@DevxNadeem

Copy link
Copy Markdown
Contributor

📘 Pull Request – Add Fun Fact Toast

🔍 Description

This PR introduces a Fun Fact toast/card to the simulation pages. Each simulation now displays a short, relevant physics fact to improve the educational experience.

Changes made

  • Added a reusable Funfact component.
  • Added a dataset containing simulation-specific physics facts.
  • Integrated the component into TopSim.
  • Designed a responsive UI matching the existing PhysicsHub theme.
  • Added a dismiss () button.
  • Automatically hides the toast after a few seconds.

Closes #12


✅ Checklist

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

🎨 Visual Changes

image
  • Added a floating Fun Fact card to simulation pages.
  • Added a close button to dismiss the card.
  • Styled the component to match PhysicsHub's existing UI.
  • Included support for both light and dark themes.

📂 Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 💥 Breaking change
  • 📝 Documentation update
  • ♻️ Refactor / code quality improvement
  • 🎨 UI/UX enhancement
  • 🔒 Security improvement

🧩 Additional Notes for Reviewers

  • The Fun Fact card is displayed only on simulation pages.
  • Facts are mapped to simulations using their chapterId.
  • The component is reusable and can be extended by adding new entries to the facts data file.
  • The card automatically disappears after a short delay and can also be dismissed manually using the close button.

@vercel

vercel Bot commented Jun 30, 2026

Copy link
Copy Markdown

@DevxNadeem is attempting to deploy a commit to the PhysicsHub's projects Team on Vercel.

A member of the Team first needs to authorize it.

@mattqdev mattqdev merged commit 954987b into physicshub:main Jun 30, 2026
1 of 2 checks passed
@mattqdev

Copy link
Copy Markdown
Collaborator

Thank you for this PR!

@physicshub

Copy link
Copy Markdown
Owner

🎉 This PR is included in version 3.29.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lights that shows fun fact about physics.

3 participants