Skip to content

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

Merged
merged 3 commits into from
Nov 16, 2023

Conversation

pakb
Copy link
Contributor

@pakb pakb commented Nov 15, 2023

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

@pakb pakb force-pushed the feat_BGDIINF_SB-3193_geoadmin_group_of_layers branch from 899dac8 to d5e6bf1 Compare November 15, 2023 16:34
@pakb pakb requested a review from ltshb November 15, 2023 16:34
pakb added 2 commits November 15, 2023 17:35
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)
@pakb pakb force-pushed the feat_BGDIINF_SB-3193_geoadmin_group_of_layers branch from d5e6bf1 to e5fca8c Compare November 15, 2023 16:35
Copy link
Contributor

@ltshb ltshb left a 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 ?

Comment on lines 60 to 67
// 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
})
Copy link
Contributor

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

@pakb pakb merged commit 6534487 into develop Nov 16, 2023
@pakb pakb deleted the feat_BGDIINF_SB-3193_geoadmin_group_of_layers branch November 16, 2023 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants