PB-540: Adapt help text for drawing#1296
Merged
ismailsunni merged 4 commits intodevelopfrom Apr 17, 2025
Merged
Conversation
web-mapviewer
|
||||||||||||||||||||||||||||
| Project |
web-mapviewer
|
| Branch Review |
develop
|
| Run status |
|
| Run duration | 01m 23s |
| Commit |
|
| Committer | Ismail Sunni |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
0
|
|
|
1
|
|
|
0
|
|
|
48
|
| View all changes introduced in this branch ↗︎ | |
eff7c6a to
de29456
Compare
Contributor
There was a problem hiding this comment.
Copilot reviewed 2 out of 7 changed files in this pull request and generated no comments.
Files not reviewed (5)
- packages/mapviewer/src/modules/i18n/locales/de.json: Language not supported
- packages/mapviewer/src/modules/i18n/locales/en.json: Language not supported
- packages/mapviewer/src/modules/i18n/locales/fr.json: Language not supported
- packages/mapviewer/src/modules/i18n/locales/it.json: Language not supported
- packages/mapviewer/src/modules/i18n/locales/rm.json: Language not supported
Comments suppressed due to low confidence (1)
packages/mapviewer/src/modules/drawing/components/DrawingTooltip.vue:131
- Ensure that 'selectedFeatures' is non-empty before accessing 'selectedFeatures.value[0]' to avoid potential runtime errors, for example by inserting a check prior to using it.
if (nonPointFeatureTypes.includes(featureDrawingMode)) {
de29456 to
24dbe9e
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adapts the help text for drawing features by adjusting tooltip translation keys and revising deletion logic in the drawing toolbox.
- In DrawingTooltip.vue, a new array for non-point feature types is added and logic is introduced to append the geometry type to the translation keys when applicable.
- In DrawingToolbox.vue, the deletion logic is updated by renaming and reworking the computed property to more clearly allow deletion of the last point based on drawing mode.
Reviewed Changes
Copilot reviewed 2 out of 7 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/mapviewer/src/modules/drawing/components/DrawingTooltip.vue | Adds non-point feature types and refines tooltip translation key logic for vertex modification. |
| packages/mapviewer/src/modules/drawing/components/DrawingToolbox.vue | Renames and updates the computed property controlling point deletion to support extended line drawing scenarios. |
Files not reviewed (5)
- packages/mapviewer/src/modules/i18n/locales/de.json: Language not supported
- packages/mapviewer/src/modules/i18n/locales/en.json: Language not supported
- packages/mapviewer/src/modules/i18n/locales/fr.json: Language not supported
- packages/mapviewer/src/modules/i18n/locales/it.json: Language not supported
- packages/mapviewer/src/modules/i18n/locales/rm.json: Language not supported
sommerfe
approved these changes
Apr 16, 2025
Contributor
sommerfe
left a comment
There was a problem hiding this comment.
can be maybe simplified but it's ok for readability
Comment on lines
+67
to
+80
| const isAllowDeleteLastPoint = computed( | ||
| () => { | ||
| // Allow to delete the last point only if we are drawing line or measure | ||
| if (isDrawingLineOrMeasure.value) { | ||
| return true | ||
| } else { | ||
| // or when extending line | ||
| return ( | ||
| editMode.value === EditMode.EXTEND && | ||
| selectedLineString.value && | ||
| selectedLineCoordinates.value?.length > 2 | ||
| ) | ||
| } | ||
| } |
Contributor
There was a problem hiding this comment.
Suggested change
| const isAllowDeleteLastPoint = computed( | |
| () => { | |
| // Allow to delete the last point only if we are drawing line or measure | |
| if (isDrawingLineOrMeasure.value) { | |
| return true | |
| } else { | |
| // or when extending line | |
| return ( | |
| editMode.value === EditMode.EXTEND && | |
| selectedLineString.value && | |
| selectedLineCoordinates.value?.length > 2 | |
| ) | |
| } | |
| } | |
| const isAllowDeleteLastPoint = computed( | |
| () => { | |
| // Allow to delete the last point only if we are drawing line or measure | |
| return isDrawingLineOrMeasure.value) || | |
| // or when extending line | |
| ( | |
| editMode.value === EditMode.EXTEND && | |
| selectedLineString.value && | |
| selectedLineCoordinates.value?.length > 2 | |
| ) | |
| } | |
| } |
24dbe9e to
0b2a235
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Test link