Skip to content

PB-1681: fix vue warnings#1364

Merged
pakb merged 3 commits intodevelopfrom
fix-pb-1681-vue-warnings
Jun 26, 2025
Merged

PB-1681: fix vue warnings#1364
pakb merged 3 commits intodevelopfrom
fix-pb-1681-vue-warnings

Conversation

@sommerfe
Copy link
Contributor

@sommerfe sommerfe commented Jun 16, 2025

@sommerfe sommerfe self-assigned this Jun 16, 2025
@github-actions github-actions bot added the bug label Jun 16, 2025
@sommerfe sommerfe changed the title PB-1411: fix printbox after searchbar clear PB-1681: fix vue warnings Jun 16, 2025
@sommerfe sommerfe closed this Jun 16, 2025
@sommerfe sommerfe force-pushed the fix-pb-1681-vue-warnings branch from 3a240e2 to 8fa2cf2 Compare June 16, 2025 08:41
@sommerfe sommerfe reopened this Jun 16, 2025
@sommerfe sommerfe requested a review from pakb June 16, 2025 08:43
@cypress
Copy link

cypress bot commented Jun 16, 2025

web-mapviewer    Run #5464

Run Properties:  status check passed Passed #5464  •  git commit 1c5f5a32ca: PB-1681: fix two more warnings
Project web-mapviewer
Branch Review fix-pb-1681-vue-warnings
Run status status check passed Passed #5464
Run duration 05m 18s
Commit git commit 1c5f5a32ca: PB-1681: fix two more warnings
Committer Pascal Barth
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 20
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 253
View all changes introduced in this branch ↗︎

Comment on lines +28 to +32
<div>
<slot />
</div>
Copy link
Contributor

Choose a reason for hiding this comment

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

Why would adding an empty <div> fix an error?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The reason for this error is that when adding properties to the DrawingMeasureInteraction component, vue doesn't know to which root html element these properties should be added, this can happen when there are two root elements. Therefore when you only have one root element, in this case the div, in the component vue knows now where to add the properties. See https://mokkapps.de/vue-tips/use-fallthrough-attributes here they propose to use v-bind, but when i tried to use it it did not bind the properties correctly so i added a root element instead. I should probably add a comment to explain this in the code

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i added a comment

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is not the proper fix for this warning. The issue was that we are giving startingFeature prop to all interaction component, even to those that do not declare it.

I've pushed a commit that should fix this

@sommerfe sommerfe force-pushed the fix-pb-1681-vue-warnings branch 2 times, most recently from cac2e78 to 5e31c51 Compare June 18, 2025 07:00
@sommerfe sommerfe requested a review from pakb June 18, 2025 12:38
@sommerfe sommerfe force-pushed the fix-pb-1681-vue-warnings branch from 5e31c51 to 1d46e97 Compare June 23, 2025 08:28
sommerfe and others added 3 commits June 26, 2025 11:43
Dynamically configures props for specialized drawing interactions based on the current edit mode.

This allows passing specific properties, such as the starting feature for line extensions, to the appropriate interaction component, and not to those that do not need it (which would raise a Vue warning for extraneous props)
one that was raised because we are using an obsolete `watch(fn, options?)` signature

the second because some external WMS features didn't have any title, fallback to the feature ID if none is defined
@pakb pakb force-pushed the fix-pb-1681-vue-warnings branch from 954b169 to 1c5f5a3 Compare June 26, 2025 09:44
@pakb pakb merged commit f93433a into develop Jun 26, 2025
6 checks passed
@pakb pakb deleted the fix-pb-1681-vue-warnings branch June 26, 2025 09:58
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