Skip to content

Conversation

skimberk
Copy link
Contributor

@skimberk skimberk commented Oct 8, 2025

A second attempt to implement #90 (after #91 seems to have maybe done something a bit different than intended, I'm guessing maybe changed a bit too much?)

This is mostly all Copilot generated, not sure what the policy is on generated vs hand-written code, but there was a lot of hand holding from me.

Essentially:

  • Changes the News tab
  • Mostly everything looks/works the same
  • When you click on a news article, it scrolls to it (same as before) but also updates the URL (new)
  • When you open a link of the form news/:post_id, it automatically scrolls to that article
  • Added some (auto generated) tests. Not sure how effective they are tbh

The most annoying part was that there's several stages of loading of the content. Initially, no content is loaded. Then, some of the content is loaded, but the markdown still needs to be rendered. Finally, the markdown is rendered, but images might still be loading. So the majority of the non-test code is trying to handle this.

How did I test:

  • I ran NPM tests (they all passed):
npm run test
  • I tested manually locally by including on the various links, trying to open them in news tabs, ctrl clicking them, refreshing, etc

Screenshot (it looks the same as before, just see the newly updated URL in the address bar!):
Screenshot 2025-10-08 at 13 31 48

@msaroufim @yangw-dev

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.

1 participant