Skip to content
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

Add skeleton pages for user dashboard routes #156

Merged

Conversation

Eakam1007
Copy link
Contributor

@Eakam1007 Eakam1007 commented Feb 8, 2023

Resolves #138

Added basic pages for the following routes (as mentioned in the issue):

  • /domains
  • /domains/new
  • /domains/:id
  • /certificate
  • /certificate/instructions

Also added a component for the header that will display on top of these pages. See image here

These are basic pages which can be styled later based on the figma designs

Steps to test

  • Setup and run starchart locally
  • Navigate to the above routes and check that they work. They will only have one simple heading text (irrelevant as this will be changed later anyway)

@Eakam1007 Eakam1007 self-assigned this Feb 8, 2023
humphd
humphd previously approved these changes Feb 8, 2023
Copy link
Contributor

@humphd humphd left a comment

Choose a reason for hiding this comment

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

This is great. One question.

@@ -0,0 +1,21 @@
import { Heading, Text, Link } from '@chakra-ui/react';
Copy link
Contributor

Choose a reason for hiding this comment

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

What are the rules about using Chakra UI Link vs. Remix Link? I wonder if we should prefer the router's link component?

Copy link
Contributor Author

@Eakam1007 Eakam1007 Feb 8, 2023

Choose a reason for hiding this comment

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

Oh, I simply used a Link here to render a <a> element which links to #114 . This is so that anyone working on the page can see where it came from. I felt the on other pages it was more obvious what they were about

@Ririio
Copy link
Contributor

Ririio commented Feb 8, 2023

Should we have a separate heading page so we don't have to recycle it for each route?

@Eakam1007 Eakam1007 marked this pull request as ready for review February 8, 2023 02:44
@Eakam1007
Copy link
Contributor Author

Should we have a separate heading page so we don't have to recycle it for each route?

You mean a separate component for the header that appear on the figma designs?

image

@Ririio
Copy link
Contributor

Ririio commented Feb 8, 2023

You mean a separate component for the header that appear on the figma designs?

yeah... I was wondering how you'll be handling displaying the header across all the routes?

@Eakam1007
Copy link
Contributor Author

yeah... I was wondering how you'll be handling displaying the header across all the routes?

Hmm, yea I hadn't thought of that. I will need to take a look to understand the best way to do this

@Eakam1007 Eakam1007 marked this pull request as draft February 8, 2023 02:59
@Eakam1007 Eakam1007 marked this pull request as ready for review February 8, 2023 04:13
@Eakam1007
Copy link
Contributor Author

I have added a common header component for both domains and certificates routes

Ririio
Ririio previously approved these changes Feb 8, 2023
Copy link
Contributor

@Ririio Ririio left a comment

Choose a reason for hiding this comment

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

Looks good to me

export default function CertificatesRoute() {
return (
<div>
<Header />
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably this can be put higher in the router order, since every page will have this header, no? I'd do what you're doing here at the very top of the hierarchy, and render all the other routes into the outlet.

Copy link
Contributor

Choose a reason for hiding this comment

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

would rendering it at the top affect the login page?

Copy link
Contributor

Choose a reason for hiding this comment

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

True, need to put it in the right spot. We could also decide to always show the header, and remove the user info from the right. Remix has useMatches() that lets you get data loaded in any route layer, which you can use to get a user object or something without passing it around via props. We could use this to know if the user is logged in or not, and change how we show things.

Copy link
Contributor Author

@Eakam1007 Eakam1007 Feb 8, 2023

Choose a reason for hiding this comment

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

There is also a way to do this purely based on the routes folder structure. I found this useful blog about it.
I have changed it so the header will be display on all the routes except login

Copy link
Contributor

Choose a reason for hiding this comment

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

Neat, I didn't know about this.

app/routes/__index.tsx Outdated Show resolved Hide resolved
@Eakam1007 Eakam1007 requested a review from Ririio February 8, 2023 19:05
Copy link
Contributor

@Ririio Ririio left a comment

Choose a reason for hiding this comment

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

Looks good to me

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

LGTM

@Eakam1007 Eakam1007 merged commit dafb37a into DevelopingSpace:main Feb 9, 2023
@Eakam1007 Eakam1007 deleted the 138-user-dashboard-skeleton-pages branch February 9, 2023 19:25
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.

Create basic pages and routes for user dashboard pages
3 participants