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

Kuwait Comp: Bottom Navbar #2508

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open

Kuwait Comp: Bottom Navbar #2508

wants to merge 17 commits into from

Conversation

FaithDaka
Copy link
Collaborator

@FaithDaka FaithDaka commented Nov 6, 2024

PR Checklist

  • PR title descriptive (can be used in release notes)

Description

Includes a dynamic navigation bar component for the Kuwait app.

Git Issues

Closes #

Screenshots/Videos

@FaithDaka
Copy link
Collaborator Author

@chrismclarke @jfmcquade

I have a few things I want to achieve in this PR:

  1. Creating a new layout component for the Kuwait theme. Given that the design doesn't have a static header, footer, margins or padding, there's need to destructure the layout defined in app.component.html. I created a plh_kids_kw folder within the packages/components in order for it to have a dedicated module.
    I don't know if I'm better off creating a new skin or if we can explore this option?
  2. Routing to the 3 pages represented by the navbar items. For the debug app I wanted a new footer where the home button mapped to the theme page, library button mapped to the templates page and settings button mapped to the side-menu items. Is that reasonable?
  3. The actual navbar design.

Item 3 has been done (with some static styling). It's 1 and 2 that are a WIP and need insights

@FaithDaka FaithDaka self-assigned this Nov 6, 2024
@FaithDaka FaithDaka added the feature Work on app features/modules label Nov 7, 2024
@FaithDaka FaithDaka added this to the ParentApp Kids KW Dec 2024 milestone Nov 7, 2024
@chrismclarke
Copy link
Member

@chrismclarke @jfmcquade

I have a few things I want to achieve in this PR:

  1. Creating a new layout component for the Kuwait theme. Given that the design doesn't have a static header, footer, margins or padding, there's need to destructure the layout defined in app.component.html. I created a plh_kids_kw folder within the packages/components in order for it to have a dedicated module.
    I don't know if I'm better off creating a new skin or if we can explore this option?
  2. Routing to the 3 pages represented by the navbar items. For the debug app I wanted a new footer where the home button mapped to the theme page, library button mapped to the templates page and settings button mapped to the side-menu items. Is that reasonable?
  3. The actual navbar design.

Item 3 has been done (with some static styling). It's 1 and 2 that are a WIP and need insights

Thanks Faith, all sounds like good options to have at the core app layout level.

Am I right in thinking that only the main section would have routing included and the other two sections single templates? If so it may be worth considering using something like a slider/modals/overlays to display the section content so that a user will always be returned to the same place when resuming main section (it never actually is removed from the dom). This wouldn't really work if the other sections were routable, in which case we could still look into using angular child routers.

Remind me @jfmcquade how we've handled bottom navbars in the past and whether we've had a similar use case?

@jfmcquade
Copy link
Collaborator

Apologies, I've not had time to properly engage with this fully, but I think your plan sounds good, @FaithDaka

Remind me @jfmcquade how we've handled bottom navbars in the past and whether we've had a similar use case?

I believe we have one way to configure a footer: via the APP_FOOTER_DEFAULTS.templateName parameter, which can be set either in a deployment config or in a skin. Then the convention has been to use a specially designed component, navigation_bar within the template whose name gets passed to that property. The navigation_bar component itself does not contain any specific features that make it act as a footer to the app, that's all handled by the core app code, which displays any template that is passed within an ion-footer element defined within the app component template.

Since the footer is applied at the deployment config/skin level, we don't currently have any functionality for displaying a footer on some pages and not others.

Copy link

github-actions bot commented Nov 12, 2024

Visit the preview URL for this PR (updated for commit 6a56b7e):

https://plh-teens-app1--pr2508-feat-bottom-nav-l3cgh4h9.web.app

(expires Fri, 06 Dec 2024 04:52:17 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: e4c0bab6b08dd290fbf002fd6e07987fa4b5fce1

@esmeetewinkel
Copy link
Collaborator

To feed into the discussion (but please ignore if this is out of the scope of this PR):

Also the PLH Kids TZ deployment would like to have a white styling of the footer (as an alternative to the current primary colour default), see ParentingForLifelongHealth/plh-kids-app-tz-content#135. The design is very similar to the design for Kuwait - so it would be handy for me if this styling would also be accessible to other themes and would be vaguely in-line with the current footer authoring.

Copy link
Collaborator

@jfmcquade jfmcquade left a comment

Choose a reason for hiding this comment

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

Hi @FaithDaka.

Following on from our discussion this week:

  • We will independently implement the ability to configure the header and footer through exposing template-level authored parameters. Therefore:
    • The layout component can be removed,
    • The kw specific module and routing module can be removed
  • This PR can therefore consist of a new navbar component that can be configured to show inside the footer independently.
    • I think the component can live at the plh folder level, and the plh-kids-kw folder can be removed
    • The navbar component should be able to handle up to four buttons. That way it can be used for the FacilitatorApp navbar too.
    • The navbar component should be able to handle the case of no button label text being provided, and display the icons with sensible styling in this case

@chrismclarke
Copy link
Member

Just to quickly add that the work for the navbar template override is currently open as #2531, hopefully should be merged at some point next week pending some minor review changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Work on app features/modules test - preview Create a preview deployment of the PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants