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

Gslux 705 modify feature selection and sync between map and UI #148

Merged
merged 9 commits into from
Sep 4, 2024

Conversation

mki-c2c
Copy link
Contributor

@mki-c2c mki-c2c commented Sep 3, 2024

start of work for selecting and editing features

@mki-c2c mki-c2c changed the base branch from GSLUX-704-draw-end to main September 4, 2024 06:15
@mki-c2c mki-c2c marked this pull request as ready for review September 4, 2024 06:16
@mki-c2c mki-c2c changed the base branch from main to GSLUX-704-draw-end September 4, 2024 06:16
@mki-c2c
Copy link
Contributor Author

mki-c2c commented Sep 4, 2024

all tests are fixed, would be good to merge this also.

@mki-c2c mki-c2c requested a review from tkohr September 4, 2024 06:17
@mki-c2c mki-c2c changed the title Gslux 705 modify feature rebased2 Gslux 705 modify feature selection and sync between map and UI Sep 4, 2024
@mki-c2c mki-c2c changed the base branch from GSLUX-704-draw-end to GSLUX-704-fix_tests September 4, 2024 08:05
@mki-c2c mki-c2c mentioned this pull request Sep 4, 2024
@mki-c2c mki-c2c changed the base branch from GSLUX-704-fix_tests to GSLUX-704-draw-end September 4, 2024 08:21
Copy link
Contributor

@tkohr tkohr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @mki-c2c ! I just noticed that the label is not displayed bigger on selection yet, but we can handle this in a follow-up PR, just as adding e2e tests for the selecting.

Not sure if we should rather merge #135 first, though, since the CI has not run on this one yet.

Comment on lines 31 to 45
// opening the last item is directly done in addDrawnFeature in draw store via activeFeatureId
/* watch(
* features,
* (newFeatures, oldFeatures) => {
* // Last added feature is unfold by default
* if (oldFeatures === undefined || newFeatures.length > oldFeatures.length) {
* const currentFeature =
* newFeatures[oldFeatures === undefined ? 0 : newFeatures.length - 1]
* // currentOpenedFeature.value = currentEditingFeature.value =
* currentFeature.id
* }
* },
* { immediate: true }
* )
* */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we can get rid of this here then.

Comment on lines -4 to -11
// const drawnFeatureToFeature = function (
// drawnFeature: DrawnFeature
// ): Feature<Geometry> {
// const olFeature = drawnFeature.olFeature
// olFeature.set('name', drawnFeature.label)
// return olFeature
// }

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also delete the commented lines below in featuresToUrl?

@@ -35,6 +36,8 @@ class StatePersistorFeaturesService implements StatePersistorService {

restore() {
const { drawnFeatures } = storeToRefs(useDrawStore())
// initialise map listeners for feature selection
useDrawSelect()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It feels a little strange to call a composable in a state persistor, but I agree that it makes sense to concentrate this logic in a composable and don't have a better suggestion neither.

@mki-c2c
Copy link
Contributor Author

mki-c2c commented Sep 4, 2024

Thanks, @mki-c2c ! I just noticed that the label is not displayed bigger on selection yet, but we can handle this in a follow-up PR, just as adding e2e tests for the selecting.

Not sure if you should rather merge #135 first, though, since the CI has not run on this one yet.

Yes, I would also like to see the other PR merged first.

On my local server, the selected labels appear bigger. We can check it with the CD version before merging into main

Base automatically changed from GSLUX-704-draw-end to main September 4, 2024 16:27
Copy link
Contributor

github-actions bot commented Sep 4, 2024

@mki-c2c mki-c2c merged commit c36fcb4 into main Sep 4, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants