oxidecomputer / rfd-site

Web frontend for browsing, searching, and reading RFDs
https://rfd.shared.oxide.computer
Mozilla Public License 2.0
87 stars 4 forks source link

Add `/rfd/0123/discussion` route that redirects to GH PR #60

Closed david-crespo closed 1 month ago

david-crespo commented 1 month ago

It would just be a loader, no page necessary, and do something similar to the RFD view one, except we would not try to fetch the discussion and we would only redirect if the user has the right perms. If the user is not logged in, we should always redirect to login (even for public RFDs).

https://github.com/oxidecomputer/rfd-site/blob/c42214b4cda29f84c8d367d0bcfac60295885b55/app/routes/rfd.%24slug.tsx#L82-L121

benjaminleonard commented 1 month ago

Should be pretty easy, can just use the PR number like we do in the dialog. If there isn't a discussion do we 404 or redirect to the RFD?

https://github.com/oxidecomputer/rfd-site/blob/c42214b4cda29f84c8d367d0bcfac60295885b55/app/components/rfd/RfdDiscussionDialog.tsx#L237

david-crespo commented 1 month ago

I'd probably 404 since we don't have a nice way of saying "sorry!" on the RFD page if we land there.

augustuswm commented 1 month ago

I like this as it means we can probably retire https://{number}.rfd.oxide.computer/discussion , which is handled by some technology that we would like to stop supporting. It also means it is part of our site / api, and not another private thing. For backwards compat, I can put together some blanket redirects