-
Notifications
You must be signed in to change notification settings - Fork 15
BGDIINF_SB-3193 : topics are now group of layers #533
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
Conversation
899dac8
to
d5e6bf1
Compare
preparation work so that we can feed an external getCap parsing to the LayerCatalog component Removing all related TopicTree classes, and replacing them with the GeoAdminGroupOfLayers equivalent. Adapting the menu to use this new GeoAdminGroupOfLayers to build the topic tree. also fix : now implementing properly the opening of certain categories, if the backend tells to do so (switch to Aviation topic to have an example)
and fix an issue when default topic is set at startup with some catalog node that should be opened, the catalog wasn't opened correctly because of race condition between URL param parsing and topic loading (hence the move of isFirstSetTopic into the callback function)
d5e6bf1
to
e5fca8c
Compare
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.
Looks good just a minor comment.
I also found a bug but apparently not related to this PR, see https://jira.swisstopo.ch/browse/BGDIINF_SB-3197 the bug is already present on the current develop branch, but when doing the rework we might first consider this strange bug, maybe there is a use case that we are not aware of ?
// reading the current topic at startup and opening any required category | ||
onMounted(() => { | ||
showChildren.value = openThemesIds.value.indexOf(item.getID()) !== -1 | ||
}) | ||
// reacting to topic changes (some categories might need some auto-opening) | ||
watch(openThemesIds, (newValue) => { | ||
showChildren.value = showChildren.value || newValue.indexOf(item.getID()) !== -1 | ||
}) |
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.
We should keep the same organization as in Option API, meaning watch are before life-cycle hooks. I updated the readme about this see #534
preparation work so that we can feed an external getCap parsing to the LayerCatalog component
Removing all related TopicTree classes, and replacing them with the GeoAdminGroupOfLayers equivalent.
Adapting the menu to use this new GeoAdminGroupOfLayers to build the topic tree.
also fix : now implementing properly the opening of certain categories, if the backend tells to do so (switch to Aviation topic to have an example)
simplification of topics.cy.js and fix an issue when default topic is set at startup with some catalog node that should be opened, the catalog wasn't opened correctly because of race condition between URL param parsing and topic loading (hence the move of isFirstSetTopic into the callback function)
Test link