Skip to content

Conversation

@Prakhar896
Copy link
Contributor

This PR introduces the following changes:

  • Layout.jsx renamed to RootLayout.jsx, which simply gets auth state to fetch the session and mounts the Toaster. It is the absolute parent of the entire routing structure.
  • New DefaultLayout.jsx which wraps a Navbar and Outlet content with defaultLayout CSS styling.
  • New ProtectedLayout.jsx which ensures that a valid session is active before Outlet content is rendered. If not, the user is re-directed to the login (/auth/login) page. This layout already makes use of animations, do not double ProtectedLayout and AnimateIn.
  • New AnimateIn.jsx which wraps Outlet content with a quick, smooth animation.
  • SampleProtected page now has a working log out button.
  • New CentredSpinner component. Used by ProtectedLayout while session retrieval is ongoing.
  • Navbar avatar is responsive to current username
  • Fixed bugs in networking interface and added ability to control which states of the promise an action is rendered for with actionForTypes parameter in ToastWizard.promiseBased.

There should be no breaking changes, but I recommend readers to review main.jsx to understand the layout rendering structure well, so as to avoid unexpected behaviour.

@Prakhar896 Prakhar896 self-assigned this Jul 11, 2025
@Prakhar896 Prakhar896 added the enhancement New feature or request label Jul 11, 2025
@Prakhar896 Prakhar896 merged commit cef34a9 into main Jul 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants