Skip to content

Fix scroll bug#345

Open
cameronblandford wants to merge 3 commits into
downforacross:masterfrom
cameronblandford:fix/scroll-reset-list
Open

Fix scroll bug#345
cameronblandford wants to merge 3 commits into
downforacross:masterfrom
cameronblandford:fix/scroll-reset-list

Conversation

@cameronblandford
Copy link
Copy Markdown
Contributor

@cameronblandford cameronblandford commented Mar 25, 2025

Context:

  • Two users (A and B) are both looking at the clue list in a game
  • User A scrolls all the way down to the bottom of the clue list without clicking anything
  • User B clicks anywhere on the clue list

Expected behavior:

  • Nothing should happen for User A
  • User B should have the clue move 20% away from the top of the screen

Observed behavior:

  • User A has their scroll position reset to their last-selected clue

I tried writing this a bunch of different ways as a class component, none of them worked. So I ended up opting for a standard functional component. As a result, the diff is bigger than I'd like. I haven't tested it with vim mode, but everything else functions as expected.


Note that the refactor into a functional component was 90% Claude's doing, I tested a bunch after but am operating partially blind.

Previously, if you were scrolled down the clue list view, anyone
clicking anywhere on the clue list view would jump your scroll
location back to your selected clue.

This refactor fixes that problem, while converting the component
into modern react syntax.
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 25, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
downforacross.com ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 25, 2025 1:41am

@cameronblandford
Copy link
Copy Markdown
Contributor Author

cc @stevenhao

@cameronblandford
Copy link
Copy Markdown
Contributor Author

cc @stevenhao again, what do you think?

@stevenhao
Copy link
Copy Markdown
Member

taking a look!

Comment thread server/model/pool.ts
ssl: {
rejectUnauthorized: false,
}
...(process.env.NODE_ENV === 'production' && {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks safe, but what was the reason it was necessary again?

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.

2 participants