-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[Fix]: Migrate existing tag nav to new navigation tree structure #4882
[Fix]: Migrate existing tag nav to new navigation tree structure #4882
Conversation
@mikemurray and @aldeed Can you take a look at this when you have a chance? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dancastellon Can you move the two util functions to /imports/plugins/core/versions/server/util
? We don't want migrations to reference any code outside of the versions
plugin because otherwise someone may use those utils for something else, change them to match future development, and in the process break the way the original migration is supposed to work.
@dancastellon I noticed that to 2nd level tags aren't sorted in the correct order. Do we need to preserve that order or was it an acceptable loss to sort them by |
I vote for preserving the current order, which is the order in the subtag arrays. You could potentially follow the pattern used in the starterkit, which gets all tags first and then passes to the recursive function. |
@aldeed should this be going into |
…eserve order of subtags (order defined on parent)
@mikemurray and @aldeed - I've made 2 changes:
To retest you should just be able to:
|
@dancastellon @aldeed Looks good to me. Just wanted to confirm which branch this PR is supposed to go into. |
@mikemurray Good question on the base branch for this PR. Based on the fact that #4683 was merged into RC8, I believe this should target RC8 as well. |
@spencern then into RC8 it goes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Files related to the migration have been moved to the versions plugin
Resolves #4881
Impact: minor
Type: bugfix
Issue
With the merge of #4683, a new API for defining and loading navigation trees was introduced. As part of migration 50, a default navigation tree was created with a single "Home" item. The migration should have also converted the existing tag nav items to the new tree.
Solution
This PR updates migration 50 to migrate the existing tag nav to the new tree structure.
Breaking changes
None
Testing