brown-puzzle-hq / bph-site

1 stars 0 forks source link

Use onClick to redirect entire row to hint page #112

Closed brian-xu closed 3 weeks ago

brian-xu commented 3 weeks ago

Clicking the button when it says "CLAIM" redirects to the hint page, clicking when it says "UNCLAIM" keeps the user on the hint list.

vercel[bot] commented 3 weeks ago

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

Name Status Preview Comments Updated (UTC)
bph-site ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 8, 2024 9:04am
brian-xu commented 3 weeks ago

For some reason this sort of breaks the next/previous buttons on the table, looking for a fix

brian-xu commented 3 weeks ago

should be fixed by https://github.com/TanStack/table/discussions/2731

qiaochloe commented 3 weeks ago

Looks great! Made some changes so that users stay on the hint page when they click CLAIM. It feels more smooth to me. Also did some minor refactoring, feel free to squash and merge this PR if it looks good after you check over it @brian-xu

alex-j-wang commented 3 weeks ago

Looks great! Made some changes so that users stay on the hint page when they click CLAIM. It feels more smooth to me. Also did some minor refactoring, feel free to squash and merge this PR if it looks good after you check over it @brian-xu

Might be worth discussing during meeting, I think last year clicking CLAIM auto-redirected to hint-specific page. Saves a click. Could maybe even have UNCLAIM on a hint-specific page redirect to hint table.

Or maybe we just make the buttons toggle optimistically, that would be smoother.

qiaochloe commented 3 weeks ago

Sounds good to me. (I will strike for the CLAIM button.)

qiaochloe commented 3 weeks ago

Spoke with Thomas, am now in favor of a button that opens a new tab in the background and switches you to that view.

alex-j-wang commented 3 weeks ago

Oh, fixed by #116. Applying the changes here so linter stops complaining. Might want to make response box match button optimism but otherwise I think this branch is pretty much ready to merge.

qiaochloe commented 3 weeks ago

Looks great, going to squash & merge but leaving the branch here.