Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces a new model to store the information about the menu directly in the database.
In comparison with the current model, this gives the user more flexibility to create a nested menu with section and sub-section that isn't necessarily tight to a model.
The new menu is currently available on a new API endpoint
/api/menu/new
with the format presented below.Each element of the menu is defined by a name and a namespace, similar to the node kind in the schema.
I'm not sold on the exact syntax but the idea was to avoid names conflict in the future.
To avoid confusing, the confusion between an element of the menu with the models in the schema, the namespace and the name are separated by
:
right now ...The idea is that in order to fully control the behavior of the menu, a menu item should be created for each element of the schema that should be part of the menu.
In a separate PR, it will be possible to define a menu structure in a Git repository.
For compatibility reason and to keep it simple, if a model in the schema reference a location in the menu using the full identifier
<namespace>:<name>
, and if a menu item doesn't already exist for this model, a dynamic menu item will be created