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

Move navItems into a store module #3570

Merged
merged 3 commits into from
Jun 4, 2020
Merged

Move navItems into a store module #3570

merged 3 commits into from
Jun 4, 2020

Conversation

kulmann
Copy link
Member

@kulmann kulmann commented Jun 4, 2020

Description

NavItems now live in a navigation store module in phoenix core. They are internally separated into static and dynamic navItems. Static is for the navItems loaded from an extension config. Dynamic is for dynamically loaded navItems (most likely from loaded data). A known limitation of this implementation is, that only statically loaded navItems (the ones coming from appInfo) lead to the extension appearing in the app switcher. As the app switcher is likely to change in the near future, we can touch this separately.

Related Issue

Motivation and Context

We need dynamically loaded navItems that are based on loaded data, not on configuration.

How Has This Been Tested?

For now with Chrome and Firefox locally, with code in settings ui depending on this change (injecting navItems through the store). Statically loaded navItems are now loaded differently (into the store) but the functionality stays the same. Acceptance tests are covering that.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

NavItems now live in a `navigation` store module in phoenix core. They
are internally separated into static and dynamic navItems. Static is for
the navItems loaded from an extension config. Dynamic is for dynamically
loaded navItems (most likely from loaded data).
@kulmann kulmann added the Status:Needs-Review Needs review from a maintainer label Jun 4, 2020
@kulmann kulmann self-assigned this Jun 4, 2020
@update-docs
Copy link

update-docs bot commented Jun 4, 2020

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

Copy link
Collaborator

@LukasHirt LukasHirt left a comment

Choose a reason for hiding this comment

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

Code looks good 👍 I think there's just switched the order of two words in the changelog item

changelog/unreleased/dynamic-nav-items Outdated Show resolved Hide resolved
@kulmann kulmann merged commit 6bd9a5b into master Jun 4, 2020
@delete-merged-branch delete-merged-branch bot deleted the dynamic-sidebar-items branch June 4, 2020 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status:Needs-Review Needs review from a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dynamically generate sidebar nav items
2 participants