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

The menu doesn't update if a new sub section is added after rendering has already completed #2601

Closed
alexandrevryghem opened this issue Nov 8, 2023 · 0 comments · Fixed by #2610
Assignees
Labels
bug claimed: Atmire Atmire team is working on this issue & will contribute back
Milestone

Comments

@alexandrevryghem
Copy link
Member

alexandrevryghem commented Nov 8, 2023

Describe the bug
When you add a new subsection to a navbar section that previously didn't have any subsections yet, and that the component has already been rendered, the new subsection(s) don't appear.

To Reproduce
Steps to reproduce the behavior:

  1. Add the following code to your HomeNewsComponent:
ngOnInit(): void {
  this.menuService.addSection(MenuID.PUBLIC, Object.assign({
    id: 'test',
    parentID: 'browse_global_communities_and_collections',
    active: false,
    visible: true,
    model: {
      type: MenuItemType.LINK,
      text: 'test',
      link: '/test',
    } as LinkMenuItemModel,
  }, {
    shouldPersistOnRouteChange: true,
  }));
}
  1. Go to a random page (except for home, for example /statistics) and refresh the page
  2. The Communities & Collections should have no subsection yet
  3. Navigate to the home page using the breadcrumbs
  4. The subsection is not visible underneath Communities & Collections

Expected behavior
When you add a new subsection to a section that previously didn't have any subsections yet, the component should be updated, and the subsections should be automatically added.

@alexandrevryghem alexandrevryghem added bug needs triage New issue needs triage and/or scheduling claimed: Atmire Atmire team is working on this issue & will contribute back labels Nov 8, 2023
@alexandrevryghem alexandrevryghem self-assigned this Nov 8, 2023
@github-project-automation github-project-automation bot moved this to 🆕 Triage in DSpace Backlog Nov 8, 2023
@tdonohue tdonohue removed this from DSpace Backlog Nov 8, 2023
@tdonohue tdonohue removed the needs triage New issue needs triage and/or scheduling label Nov 8, 2023
@tdonohue tdonohue moved this from 📋 To Do to 🏗 In Progress in DSpace 8.x and 7.6.x Maintenance Nov 8, 2023
@github-project-automation github-project-automation bot moved this from 🏗 In Progress to ✅ Done in DSpace 8.x and 7.6.x Maintenance Nov 13, 2023
@tdonohue tdonohue added this to the 7.6.1 milestone Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug claimed: Atmire Atmire team is working on this issue & will contribute back
Projects
2 participants