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

PB-375: Added drawing to the report a problem #805

Merged
merged 6 commits into from
Apr 30, 2024

Conversation

ltshb
Copy link
Contributor

@ltshb ltshb commented Apr 24, 2024

  • TODO the title of the drawing overlay when entering from the report a problem is not always nicely displayed depending on the size of the viewport, see will be probably fixed with PB-368 : fluid UI rework #773 PR, so once this PR is finish we need to check it again.
    image
    Note with normal size it works good and on mobile the title is anyway not displayed.

Test link

@ltshb ltshb changed the title PB-375: Made the drawing online configurable PB-375: Added drawing to the report a problem Apr 24, 2024
@ltshb ltshb added the WIP label Apr 24, 2024
Copy link

cypress bot commented Apr 24, 2024

Passing run #1958 ↗︎

0 159 20 0 Flakiness 0

Details:

PB-375: Fix drawing title overflow
Project: web-mapviewer Commit: 2e3ddfbd85
Status: Passed Duration: 04:33 💡
Started: Apr 30, 2024 5:41 AM Ended: Apr 30, 2024 5:46 AM

Review all test suite changes for PR #805 ↗︎

@ltshb ltshb force-pushed the feat-PB-375-drawing-report branch 5 times, most recently from 693a148 to 18c8477 Compare April 25, 2024 09:16
@ltshb ltshb requested a review from pakb April 25, 2024 11:36
@ltshb ltshb removed the WIP label Apr 25, 2024
@ltshb ltshb marked this pull request as ready for review April 25, 2024 11:36
@ltshb ltshb force-pushed the feat-PB-375-drawing-report branch from 42e0253 to 4379851 Compare April 25, 2024 11:39
@ltshb ltshb requested a review from hansmannj April 25, 2024 11:41
src/store/modules/drawing.store.js Outdated Show resolved Hide resolved
src/store/modules/drawing.store.js Outdated Show resolved Hide resolved
src/modules/drawing/DrawingModule.vue Outdated Show resolved Hide resolved
src/modules/drawing/DrawingModule.vue Outdated Show resolved Hide resolved
src/modules/drawing/components/DrawingToolbox.vue Outdated Show resolved Hide resolved
src/modules/drawing/useKmlDataManagement.composable.js Outdated Show resolved Hide resolved
src/modules/drawing/useKmlDataManagement.composable.js Outdated Show resolved Hide resolved
Copy link
Member

@hansmannj hansmannj left a comment

Choose a reason for hiding this comment

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

Thanks, did not check the code, but only the test link.

Two minor things:

  • when clicking on "Draw on the map" as a first action after clicking on "report a problem", i.e. the text field is still empty, sometimes the app does not switch into the drawing mode but is stuck and complains "Report message can not be empty.". Sometimes it switches into the drawing mode, but the red focus and message still shortly appears.
  • Perhaps the text "indicate the appropriate location on the map" is not optimal, as it is not always about a certain location. Maybe something like "Please create the drawing you want to attach" or similar might be better. Picky, I know, sorry! 😉

@ltshb
Copy link
Contributor Author

ltshb commented Apr 26, 2024

Thanks, did not check the code, but only the test link.

Two minor things:

  • when clicking on "Draw on the map" as a first action after clicking on "report a problem", i.e. the text field is still empty, sometimes the app does not switch into the drawing mode but is stuck and complains "Report message can not be empty.". Sometimes it switches into the drawing mode, but the red focus and message still shortly appears.
  • Perhaps the text "indicate the appropriate location on the map" is not optimal, as it is not always about a certain location. Maybe something like "Please create the drawing you want to attach" or similar might be better. Picky, I know, sorry! 😉

@hansmannj for the first point regarding field validation I propose to do it in a separate PR as we should change the field validation behaviour globally not only here. The issue is that we validate the field on typing and focus out.
For the translation I took the one from the old viewer if you have a better proposal I can change it.

@ltshb ltshb requested a review from pakb April 26, 2024 04:33
Copy link
Contributor

@pakb pakb left a comment

Choose a reason for hiding this comment

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

Minor detail, otherwise looking good!

Comment on lines +36 to +38
return !!store.state.layers.systemLayers.find(
(l) => l.id === store.state.drawing.temporaryKmlId
)
Copy link
Contributor

Choose a reason for hiding this comment

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

could be switched to return store.state.layers.systemlayers.some(...) if the goal is to have a boolean return value

Copy link
Member

@hansmannj hansmannj left a comment

Choose a reason for hiding this comment

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

🥇
LGTM. thanks!

We can discuss e.g. in the refinement tomorrow.
I'd suggest to update the text to "Please create the drawing you want to attach", as the reported problem is not necessarily limitid to one single point, but referring to the whole drawing.

ltshb added 5 commits April 30, 2024 06:53
This is needed for the future report a problem that will open the drawing
mode and were we don't want to loose the form values (the form is in the menu
header).
For this I made the drawing online configurable, which means that the drawing
is either online saved (kml backend) and added to the active layers, or
local and added to the system layers.
@ltshb ltshb force-pushed the feat-PB-375-drawing-report branch from 4c5a50f to 7241d4d Compare April 30, 2024 04:53
Avoid overflow in the drawing title which would make the text outside of the
header.

Currently the header height is fixed which has some issues in the placement
of elements.
@ltshb ltshb merged commit 25bfddf into develop Apr 30, 2024
9 checks passed
@ltshb ltshb deleted the feat-PB-375-drawing-report branch April 30, 2024 07:21
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.

3 participants