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

Use JSON:API Menu Items by default #539

Closed
1 task
Tracked by #544
Decipher opened this issue Jul 19, 2022 · 0 comments · Fixed by #550
Closed
1 task
Tracked by #544

Use JSON:API Menu Items by default #539

Decipher opened this issue Jul 19, 2022 · 0 comments · Fixed by #550
Labels
enhancement New feature or request good first issue Good for newcomers module: menu Related to the `druxt-menu` module
Milestone

Comments

@Decipher
Copy link
Member

Is your feature request related to a problem? Please describe.
The DruxtMenu module uses the default Drupal Menu items by default, but they don't support system and plugin menus.

As the Drupal Druxt module requires JSON:API Menu Items, the DruxtMenu module should default to use this data.

Describe the solution you'd like

  • Use JSON:API Menu Items data by default

Describe alternatives you've considered
N/A

Additional context
The DruxtSite module already sets this by default:

menu: {
jsonApiMenuItems: true,
...((this.options || {}).druxt || {}).menu,
},

The same code could be used here:

const options = {
baseUrl: moduleOptions.baseUrl,
...(this.options || {}).druxt || {},
menu: {
...((this.options || {}).druxt || {}).menu,
...moduleOptions,
}
}

@Decipher Decipher added enhancement New feature or request module: menu Related to the `druxt-menu` module labels Jul 19, 2022
@Decipher Decipher added this to the 1.0.0 milestone Jul 19, 2022
@Decipher Decipher added the good first issue Good for newcomers label Jul 19, 2022
Decipher added a commit that referenced this issue Aug 12, 2022
Decipher added a commit that referenced this issue Aug 12, 2022
Decipher added a commit that referenced this issue Aug 12, 2022
* feat(#539): default to JSON:API Menu Items data

* chore(#539): update test coverage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers module: menu Related to the `druxt-menu` module
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant