OurTechCommunity / OurTechCommunity/catchup
Randomly hijack "Read Latest Summary" button
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 19
- Forks
- 18
- Avg merge
- 3d 6h
- Merged PRs (30d)
- 3
Description
Currently, the /summary/random route is accessible only by URL, added in #75. It was decided to keep it as a hidden easter egg and avoid adding a permanent button since it'd cause clutter, but there is no way for a user to discover it via frontend.
We can add a client side script that has a low probability (5 percent?) of hijacking "Read Latest Summary" and swap with "Read Random Summary". I also considered that we don't want to do this if the user is a first time visitor, we can simply use localStorage and store a boolean value for that.
10-12 lines of code at max. After considering several other approaches, this seems the easiest, and also the most fun. After all, random summary picker definitely deserves a randomly appearing button :)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the frontend implementation of the "Read Latest Summary" button and the /summary/random route. Check how browser storage is used, then implement the random first-visit behavior described in the issue. Done means the latest button sometimes becomes a random-summary button for returning users while remaining unchanged for first-time visitors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100