-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert 'contact', 'team', and 'whoami' to app router; partially convert '404' [#134] #1032
Conversation
dea7987
to
163efe8
Compare
163efe8
to
91dede0
Compare
91dede0
to
65263b2
Compare
65263b2
to
1f5099a
Compare
Is that level of whitespace variation worth trying to nail down, IyourO? |
Maybe not? Though if I were doing the work I'd probably still try. It also might have more impact on mobile viewports? Would be good to check. The logo position change seems like it'll have more impact when navigating between a page like the contact page and an Auspice page. |
Oh believe me, there has been some previous effort in this direction, I assure you. On first blush, I think I would push further effort getting the header alignment perfect to after adding the login/user tracking bit, as I suspect some of the delta is due to that.
Yeah, fair; I haven't done a lot of checking around mobile viewport sizes. |
BTW, what browser is this, and do you happen to remember the rough viewport size? |
@tsibley this was a question for you, about that comparison GIF — I'm having trouble reproducing some of the differences visible there with Firefox v131 on macOS. |
Firefox 113.0.2 on Linux (specifically |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like the direction this is heading, thank you for simplifying the styling ❤️
1f5099a
to
8d1e000
Compare
8d1e000
to
2104fe7
Compare
If folks want to take another look at this, I've addressed the feedback about the basic layout (I think! 🤞 ) and also finished the Heroku seems to be having some deployment issues at the moment; when a review app finally builds, I'll link a preview. Next stage: dealing with the user context. |
2104fe7
to
b3216b1
Compare
b3216b1
to
d07e6ea
Compare
c15a78d
to
ffe9b13
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed all the contents of converted pages. Will continue reviewing styles next week.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't look through the styling changes too closely but just compared the updated pages to prod. I like that the /whoami
page's layout matches the rest of the site now 👍
I think the move away from styled-components should make it easier to remove UserContext
/UserDataWrapper
completely and just fetch the current user data server side.
ffe9b13
to
a331d36
Compare
(Not sure why I can't
I guess I don't see this as a huge issue, because when all this work is done, all the duplicates will be gone, as all the "old" components will be removed/replaced — more specifically, If the work is introducing multiple duplicates where there is currently only a single copy, I would consider that a bug/mis-implementation — but I don't think that's the case. The only way to do this without having some transient duplication would be to convert the entire |
Oh I replied to an existing thread so you have to go back to the thread to add a comment. GitHub UI doesn't do a great job of showing this... copying back to the thread: #1032 (comment) |
_Largely_ derived from material in Pages Router pages and components, but with a number of redundant or otherwise unneeded styling elements excised for minimalism. Does not yet implement logged in state, and explicitly drops "minimized" as a nav-bar concept, at least for the moment.
Note: this includes some updates to the FocusParagraph component which required some knock-on changes in the 'contact' page, due to the exports of FocusParagraph changing.
Also updates the 404 content test to match the new behavior of not returning the full page. Note: file renaming (`404.jsx` -> `not-found.tsx`) is because Next.js App Router requires the latter name. Note: old `pages/404.jsx` and `src/pages/404.jsx` are left in place because the `ListResources` component depends on the `ErrorContainer` style being exported from them. This will be addressed in a subsequent commit.
* Add <UserDataWrapper> component to base layout to provide access to logged in user via React Context * Wrap username or login link display into <UserOrLoginLink> Client Component; add to <Nav> component
Note: updates the page to use the default layout with the toolbar and team avatars, in addition to the sponsor logos.
a331d36
to
f8982b0
Compare
Description of proposed changes
This converts the global/shared layout and navigation bits, the
/contact
,/team
, and/whoami
pages (including login state display in that page and the global nav), and the general outline of the404/not-found
page over to using the App Router. The404
page has been changed to provide a link to the root page, rather than loading the (as-yet-unported)<Splash>
component.This also required converting all
styled-components
usage in those parts over to either regular CSS, or to CSS Modules, depending on the scope of the usage. In general, I have tried to keep things scoped either very tightly (i.e., in specific CSS Modules imported into a single component) or put them in a global CSS file that is imported in the root layout.I have elected to migrate components to
/static-site/components
as they are converted over for use with App Router; that felt like the cleanest option. I also elected to put page content directly into theapp/*/pages.tsx
files, rather than propagating the "page content is actually understatic-site/src/pages/*.jsx
" pattern, reasoning that this reduces the number of moving parts and makes it more clear where the content is relative to the the URL it is displayed at.To be explicit: when this conversion work is done, I expect the contents of
/static-site
to be:Related issue(s)
#1052
#134
Checklist