BeforeIDieCode / BeforeIDieAchievements

🌟An open source project that helps developers make their first pull request and contribute to open source projects. πŸš€πŸŽ― Developers can contribute by sharing what they want to do before they die. πŸ’‘πŸ”—
https://before-i-die-achievements.vercel.app
MIT License
115 stars 178 forks source link

Feature: Randomize the text color on contributorsmap page when page refreshes #214

Closed harmit17 closed 10 months ago

harmit17 commented 10 months ago

Issue Addressed

Closes #184

Proposed Changes and Benefits

I have implemented a new feature to randomize the color of the text being displayed every time a user visits the page. This enhancement is aimed at improving the user experience by adding variety to the text color, making the content visually engaging. To achieve this, I made the following changes: β€’ Created a function called getDifferentColors() in MapContributors.jsx to generate a random color. β€’ Applied this function to the style attribute of the <p> tag, ensuring that the text color changes every time the page refreshes. β€’ Removed the color property from MapContributors.module.css to prevent any overriding of the dynamically generated text color.

Screenshots

When I run the project:

image

After I refresh the page:

image

As you can see the color generated by the getDifferentColors() function in element.style.

Notes to Reviewers

It might possible that while testing you directly click on contributors map. And it will redirect you to hosted page. I made the same mistake when I was implementing this feature and could not figure it out for long time.

Checklist

β€’ [x] I have thoroughly read and understand The Contribution Guidelines. β€’ [x] The title of this PR follows the Feature: Randomize the text color on page refresh format. β€’ [x] I have listed my proposed changes and their benefits. β€’ [x] I have linked the corresponding issue in the Issues section.

vercel[bot] commented 10 months ago

@harmit17 is attempting to deploy a commit to the Before I Die Code Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] commented 10 months ago

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Comments Updated (UTC)
before-i-die-achievements βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Oct 19, 2023 6:02pm
XanderRubio commented 10 months ago

@harmit17 Your pull request has been successfully merged!!! Congratulations Bottle with Popping CorkBottle with Popping CorkBottle with Popping CorkDouble Exclamation MarkDouble Exclamation MarkDouble Exclamation Mark.

Keep living a life with discipline and intentionality, and you will make it happen!

If you haven't already, please go ahead and star Glowing StarGlowing StarGlowing Starthis repo and you are more than welcome to continually contribute to this project by assisting with our open issues, or adding your own new open issues, and additionally you can get an idea of ideas we have to continually grow this project further as technology and tech stack continually evolve by looking at the ROADMAP for the project. Have a great day, and thank you for taking the time to contribute, Harmit! You can view your contribution now on the live link. Have a great rest of your day, and I will be sending you an invite to be a member of the Before I Die Code now.

XanderRubio commented 10 months ago

This PR closes issue #184

harmit17 commented 10 months ago

@harmit17 Your pull request has been successfully merged!!! Congratulations Bottle with Popping CorkBottle with Popping CorkBottle with Popping CorkDouble Exclamation MarkDouble Exclamation MarkDouble Exclamation Mark.

Keep living a life with discipline and intentionality, and you will make it happen!

If you haven't already, please go ahead and star Glowing StarGlowing StarGlowing Starthis repo and you are more than welcome to continually contribute to this project by assisting with our open issues, or adding your own new open issues, and additionally you can get an idea of ideas we have to continually grow this project further as technology and tech stack continually evolve by looking at the ROADMAP for the project. Have a great day, and thank you for taking the time to contribute, Harmit! You can view your contribution now on the live link. Have a great rest of your day, and I will be sending you an invite to be a member of the Before I Die Code now.

Thanks for the opportunity.