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

Unify navbars #233

Open
wants to merge 24 commits into
base: main
Choose a base branch
from
Open

Unify navbars #233

wants to merge 24 commits into from

Conversation

MaHaWo
Copy link
Collaborator

@MaHaWo MaHaWo commented Mar 7, 2025

  • use sidebar instead of tabs for userland navigation
  • make the sidebar into a drawer with a button to show it when on smaller screens
  • make breadcrumbs more useful by adding starting page of navigation
  • add dummy settings element
  • make the app use the darkmode setting of the user's system
  • delete obsolete files
  • update packages
  • removed redundancies between navbar and footer

open still for suggestions:

  • stop navbar from collapsing too early
  • what to do with it other than having a logo and the locale chooser?

separate PR:

  • tests (separate PR since almost nothing has behavioral tests yet)

@codecov-commenter
Copy link

codecov-commenter commented Mar 7, 2025

Codecov Report

Attention: Patch coverage is 0% with 124 lines in your changes missing coverage. Please review.

Project coverage is 26.13%. Comparing base (825089f) to head (5ff3d42).

Files with missing lines Patch % Lines
frontend/src/lib/components/UserLandingPage.svelte 0.00% 54 Missing ⚠️
...end/src/lib/components/ChildrenRegistration.svelte 0.00% 12 Missing ⚠️
frontend/src/lib/components/MilestoneGroup.svelte 0.00% 11 Missing ⚠️
frontend/src/routes/+layout.svelte 0.00% 11 Missing ⚠️
frontend/src/lib/components/Milestone.svelte 0.00% 9 Missing ⚠️
...rontend/src/lib/components/ChildrenFeedback.svelte 0.00% 7 Missing ⚠️
frontend/src/lib/components/FrontPageCard.svelte 0.00% 5 Missing ⚠️
...ontend/src/lib/components/MilestoneOverview.svelte 0.00% 4 Missing ⚠️
frontend/src/lib/components/LocaleChooser.svelte 0.00% 3 Missing ⚠️
frontend/src/lib/translations.ts 0.00% 3 Missing ⚠️
... and 3 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #233      +/-   ##
==========================================
- Coverage   26.39%   26.13%   -0.27%     
==========================================
  Files         116      116              
  Lines        5076     5127      +51     
  Branches      101      101              
==========================================
  Hits         1340     1340              
- Misses       3651     3702      +51     
  Partials       85       85              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@MaHaWo MaHaWo requested a review from lkeegan March 7, 2025 14:04
@MaHaWo MaHaWo linked an issue Mar 7, 2025 that may be closed by this pull request
jmsssc and others added 10 commits March 11, 2025 09:45
…main in top right nav menu for logged out users
… menu to top right using VerticalBars(Hamburger) Icon, swipe in from right

* currently overlaps with the (empty) mobile menu, so will move the stuff from there into this one menu button for mobile when logged in.
* change default page load to be the Kinder (Kids overview) page
…n homepage. Change Login or Register translation to "Einloggen" only.
…re it needs to appear

* remove the Impressum/Public links from the menu for logged in users when on userLand
…that the "public menu" disappears once in user land, when you navigate to it clientside rather than reloading/loading the page.

* remove unused imports
…le, and horizontally with a good margin on desktop
@jmsssc
Copy link
Collaborator

jmsssc commented Mar 11, 2025

This version has:

In Userland view, all options are now in the Sidebar, for both mobile and PC users. (So Language selection and Dark mode(reintroduced) are here).

The public buttons (Downloads, Contact, and Log in) only appear on non-user land pages, like the home page. The dark mode and language selection are with them on those pages.

Because of the above, on mobile there is now only ever one button - in the top right Users can open the Sidebar from the right with it when logged in on userLand, and it displays the public buttons from the PC in the menu when on other pages, like "Downloads", or Language Selection.

@MaHaWo
Copy link
Collaborator Author

MaHaWo commented Mar 11, 2025

@jmsssc is this ready for review ?

@jmsssc
Copy link
Collaborator

jmsssc commented Mar 12, 2025

@jmsssc is this ready for review ?

Yep, this is ready

@jmsssc jmsssc mentioned this pull request Mar 12, 2025
Copy link
Member

@lkeegan lkeegan left a comment

Choose a reason for hiding this comment

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

Thanks, this looks good!

A couple of issues I noticed:

  • when logged in, trying to change the locale doesn't change the locale, and appears to also reload the "kinder" page in de locale?
  • when logged in with a mobile size screen, sometimes clicking on the locale chooser opens the menu at the top of the screen instead of where I clicked
    • could this be because in LocaleChooser the Dropdown has triggeredBy="#id", with the same id for both of our instances of LocaleChooser?
  • "einstellung" link doesn't seem to work
  • (very minor) the hamburger in mobile view & dark mode is a bit bigger than the top grey area - and maybe would benefit from being white-ish in dark mode to make it more obvious? I guess ideally it would be the same icon that is there in mobile view when the user is not logged in?
    image

import { MoonSolid, SunSolid } from "flowbite-svelte-icons";
</script>

<FunctionalIcon tooltip={'Darkmode ein- oder ausschalten'}>
Copy link
Member

@lkeegan lkeegan Mar 12, 2025

Choose a reason for hiding this comment

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

this german tooltip text can be added somewhere in https://github.com/ssciwr/mondey/blob/main/frontend/src/lib/translations.ts
and referenced here, e.g. something like

...
import { i18n } from "$lib/i18n.svelte";
...
tooltip={i18n.tr.frontpage.toggleDarkmode}

then in the admin interface in the deployed version translations can be added for other languages

Copy link
Collaborator

@jmsssc jmsssc Mar 12, 2025

Choose a reason for hiding this comment

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

Thank you for the review @lkeegan

Ah good catch sure absolutely the Hamburger icon is an issue on dark mode, that's wrong. I made the icon bigger but I can return it to the same size as the non-logged in icon (lg rather than xl) and make it turn white in dark mode. And maybe remove the background color of it's container if it messes with the UI. I will make the tooltip a translation key too.

On the other couple of things: The LocaleChooser I thought wasn't functional yet throughout, but absolutely I will look at why it might not work now and get it working on this branch. Einstellung is the same, it was like that so I did not change it or think anything was awry as I didn't realize it worked differently on main. I will look at code in main where I see it allows you to change your password and set locale, and get it working on this branch.

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.

Unify navigation bars?
4 participants