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

Refactor navbar + reusable button components #13

Merged
merged 15 commits into from
Nov 28, 2024

Conversation

MelanieKent
Copy link
Contributor

@MelanieKent MelanieKent commented Nov 24, 2024

PR Information

  • Created reusable Primary and Secondary button components. This should hopefully make development faster and refactoring easier in case there are any UI changes later (we will only need to make updates in one place).
  • Moved dashboard code into homepage since dashboard no longer exists in the Figma.
  • Implemented a sticky side nav bar and top app bar that matches the Figma designs. Devs should be able to simply wrap their page in <NavContentWrapper> and it should format everything out-of-the-box.
  • Updated some CSS to a lighter theme to match Figma designs.
  • Updated some paths that were pointing to the wrong spot.

If anything looks off, please let me know and I can fix it! 😄

Visuals

Recording.2024-11-26.235538.mp4

(Ignore the random duplicate button groups, just demonstrating how scrolling works). Have not made any significant changes to the layout of any pages

@MelanieKent MelanieKent changed the title Refactor navbar + reusable button and form input components Refactor navbar + reusable button components Nov 27, 2024
@MelanieKent MelanieKent marked this pull request as ready for review November 27, 2024 08:15
@@ -36,6 +36,7 @@ jobs:
npm run lint

- name: Build frontend
if: false
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Skipping the frontend build step for now - the build is failing because there is a FlowLeaflets logo that is stored in the assets folder with gitignore. Not sure what's the best way around this?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think what we can do for the frontend is to put just the Flowleaflets logo from the root assets folder into the frontend one, and import from there instead. I don't think we'll need most of the other assets from the root folder for the ui so this should be ok.

Copy link
Contributor

@TonyLiu0226 TonyLiu0226 left a comment

Choose a reason for hiding this comment

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

Excellent work with making new reusable components and implementing the styles! I've made a few comments, mostly minor details and some file restructuring. Let me know if you have any questions or suggestions

@@ -36,6 +36,7 @@ jobs:
npm run lint

- name: Build frontend
if: false
Copy link
Contributor

Choose a reason for hiding this comment

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

I think what we can do for the frontend is to put just the Flowleaflets logo from the root assets folder into the frontend one, and import from there instead. I don't think we'll need most of the other assets from the root folder for the ui so this should be ok.

@@ -0,0 +1,34 @@
import Logo from "../../../../assets/flow-leaflets-logo.svg";
Copy link
Contributor

Choose a reason for hiding this comment

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

If implementing the above suggestion, change this import to the frontend assets folder

<p className="nav-button-text">History</p>
</NavLink>
</div>
<button className="logout-button" onClick={handleSignOut}>
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor suggestion, but should we add some text to indicate logout button here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this is more of a question for the designers. It might be best to wait for their input before making changes from the Figma design. What do you think?

};

const handleAddLogbook = () => {
navigate("/uploadPhotos")
Copy link
Contributor

Choose a reason for hiding this comment

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

This should redirect to /logcode once #12 has been merged in

<CTASection />
</div>
</NavContentWrapper>
);
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Another small suggestion, to keep things consistent with homepage, perhaps call this function MainContent

Copy link
Contributor

Choose a reason for hiding this comment

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

Another suggestion for consistency and for making it easier to implement tests is to move all the pages into its own folder with a __tests__ folder, similar to how login and sign_up folders are currently implemented. For the tests file inside each page, a simple test will do for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated!

Copy link
Contributor

@TonyLiu0226 TonyLiu0226 left a comment

Choose a reason for hiding this comment

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

Everything looks good! feel free to merge in

@MelanieKent MelanieKent merged commit 96b4fc3 into main Nov 28, 2024
2 checks passed
@MelanieKent MelanieKent deleted the MelanieKent/update-navbar-and-buttons branch November 28, 2024 19:01
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.

2 participants