Skip to content

PB-580: Add warning when drawing could get lost otherwise#1121

Merged
sommerfe merged 1 commit intodevelopfrom
feat-pb-580-add-warning-leaving-drawing-mode
Jan 16, 2025
Merged

PB-580: Add warning when drawing could get lost otherwise#1121
sommerfe merged 1 commit intodevelopfrom
feat-pb-580-add-warning-leaving-drawing-mode

Conversation

@sommerfe
Copy link
Contributor

@sommerfe sommerfe commented Nov 8, 2024

@cypress
Copy link

cypress bot commented Nov 8, 2024

web-mapviewer    Run #4288

Run Properties:  status check passed Passed #4288  •  git commit 27d993a2b3: Merge pull request #1121 from geoadmin/feat-pb-580-add-warning-leaving-drawing-m...
Project web-mapviewer
Branch Review develop
Run status status check passed Passed #4288
Run duration 01m 49s
Commit git commit 27d993a2b3: Merge pull request #1121 from geoadmin/feat-pb-580-add-warning-leaving-drawing-m...
Committer Felix Sommer
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 1
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 48
View all changes introduced in this branch ↗︎

@sommerfe sommerfe requested review from ltkum, ltshb and pakb November 8, 2024 09:48
@sommerfe sommerfe marked this pull request as ready for review November 8, 2024 09:48
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.

Implementation looks just, just an issue regarding the store import.

Otherwise I think the warning message should be improved. @hansmannj
@Luke252 a warning about non exported drawing might be a good idea, but in my opinion the warning should say why we should export it or copy the share link. We should also differentiate if the drawing has only be shared via normal link without admin link. So if the user don't click on export and/or copy admin link the warning should say that the drawing cannot be edited anymore once the webpage is reloaded !

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.

Implementation looks good, but I'm against this message.
It will confuse more than help IMHO.

@sommerfe sommerfe force-pushed the feat-pb-580-add-warning-leaving-drawing-mode branch 3 times, most recently from c1fa52b to ed2c536 Compare November 12, 2024 15:07
@sommerfe sommerfe force-pushed the feat-pb-580-add-warning-leaving-drawing-mode branch 4 times, most recently from 3656acb to 3cea793 Compare December 20, 2024 14:58
@sommerfe sommerfe force-pushed the feat-pb-580-add-warning-leaving-drawing-mode branch 7 times, most recently from 98d93d1 to 1421bf4 Compare January 3, 2025 10:42
@sommerfe sommerfe requested review from ltshb and pakb January 3, 2025 10:57
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.

I'm a bit lost here. The PR title says to add a warning when closing the drawing (as the code seems to do) but the warning is not added ? More over based on the previous comments on this PR we should not do it, if it has been decided to do it, it MUST BE documented in the PR. Finally looking at the ticket the changes required seems to have differ but are not 100% clear to me, @hansmannj @Luke252 What has been here decided ? We SHOULD document such decision in ticket. But I'm still quite against such warning, or it should provide a much better info to the user as simply "Attention, your drawing has not been shared.", because such warning is not useful for the purpose of the ticket. I mean maybe the user don't want to share it, but simply recover later on.

@sommerfe sommerfe changed the title PB-580: add warning when leaving drawing mode without export or share PB-580: Add warning when drawing could get lost otherwise Jan 6, 2025
@sommerfe sommerfe force-pushed the feat-pb-580-add-warning-leaving-drawing-mode branch 2 times, most recently from ddbaf4a to 068c9c3 Compare January 7, 2025 14:38
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.

as discussed yesterday, we will change a bit our approach here, please add me back to review when ready with what is described in the ticket

@sommerfe sommerfe force-pushed the feat-pb-580-add-warning-leaving-drawing-mode branch from 068c9c3 to 6f372eb Compare January 8, 2025 10:25
@sommerfe sommerfe force-pushed the feat-pb-580-add-warning-leaving-drawing-mode branch 5 times, most recently from 4719a84 to bbbcf92 Compare January 9, 2025 07:22
@sommerfe sommerfe requested review from ltshb and pakb January 9, 2025 07:48
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.

Found some issues while testing:

  1. No warning set for subsequent drawing, here how to reproduce
    a. Create a drawing and save the admin link
    b. Close the drawing: no warning as expected because the admin link has been copied
    c. Delete the drawing
    d. Create a new drawing without copying the new admin link
    e. Close the new drawing -> no warning ! In this case the warning should come.
  2. When copying the share link from the drawing, the crosshair param is added to the url (on current dev staging is not the case)

"draw_type_marker": "Line / surface",
"drawing_attached": "Drawing added as attachment",
"drawing_empty_cannot_edit_name": "Please add something to the drawing before editing its name.",
"drawing_not_shared_admin_warning": "Attention, you have not generated a link to continue to edit your drawing. You won't be able to edit your drawing after closing this window.",
Copy link
Contributor

Choose a reason for hiding this comment

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

@Luke252 @hansmannj For all translation I would say after reloading the website instead of closing this windows (or something like this), because it is more correct, you can close the drawing and re-open it to get the admin link as long as you don't reload the page.

Copy link
Member

Choose a reason for hiding this comment

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

How about something more explicit, like Attention, if you want to be able to edit your drawing in future, you need an admin link. To get one, please click on share, copy the admin link and save it.

Copy link
Member

Choose a reason for hiding this comment

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

OK, my suggestion from above does not make much sense, since the admin link is already "thrown at the user" in this case, which makes sense.
So, yes, after reloading the website is fine for me!

@hansmannj
Copy link
Member

Found some issues while testing:

  1. No warning set for subsequent drawing, here how to reproduce
    a. Create a drawing and save the admin link
    b. Close the drawing: no warning as expected because the admin link has been copied
    c. Delete the drawing
    d. Create a new drawing without copying the new admin link
    e. Close the new drawing -> no warning ! In this case the warning should come.
  2. When copying the share link from the drawing, the crosshair param is added to the url (on current dev staging is not the case)

Good catch! 👍

@hansmannj
Copy link
Member

Don't we also want to catch the case, where neither share nor admin link are copied and throw a corresponding warning then?

@hansmannj
Copy link
Member

Don't we also want to catch the case, where neither share nor admin link are copied and throw a corresponding warning then?

Ah, ok, that seem's to be covered already, sorry!

@sommerfe sommerfe force-pushed the feat-pb-580-add-warning-leaving-drawing-mode branch 2 times, most recently from 52d808a to 350d1b1 Compare January 10, 2025 08:25
@sommerfe sommerfe requested review from hansmannj and ltshb January 10, 2025 08: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.

You still have an issue when opening the share link of the drawing it adds the cross marker

image

Other issues seems fine now

@sommerfe sommerfe force-pushed the feat-pb-580-add-warning-leaving-drawing-mode branch 2 times, most recently from b7ce9ba to a000b0b Compare January 13, 2025 08:54
@sommerfe sommerfe requested a review from ltshb January 13, 2025 09:08
@sommerfe sommerfe force-pushed the feat-pb-580-add-warning-leaving-drawing-mode branch 2 times, most recently from 9ed796e to 0d62f93 Compare January 13, 2025 10:10
@sommerfe sommerfe force-pushed the feat-pb-580-add-warning-leaving-drawing-mode branch from 0d62f93 to ba153c7 Compare January 15, 2025 13:03
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.

Thanks

@sommerfe sommerfe merged commit 27d993a into develop Jan 16, 2025
3 checks passed
@sommerfe sommerfe deleted the feat-pb-580-add-warning-leaving-drawing-mode branch January 16, 2025 07:38
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.

4 participants