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

Coordinate picker #120

Merged
merged 27 commits into from May 22, 2022
Merged

Coordinate picker #120

merged 27 commits into from May 22, 2022

Conversation

CommanderStorm
Copy link
Member

@CommanderStorm CommanderStorm commented May 17, 2022

This PR implements a coodinate Picker.
resolves #107

Todo:

  • add translations
  • figgure out a way of creating a draggable custom marker (I have tried the simple ways, something is not working; I have to spend some quality time debuging this)
  • add a better styling than this:
    image
    image
    image

since you are more into design: what UI would you (@octycs ) prefer?

@CommanderStorm CommanderStorm added feature New feature or request frontend Related to the frontend labels May 17, 2022
@CommanderStorm CommanderStorm self-assigned this May 17, 2022
@CommanderStorm
Copy link
Member Author

The reason why a custom logo is not draggable is, because we use images in a div container instead of (svg) images for this usecase. I think this should be another PR

@CommanderStorm CommanderStorm marked this pull request as ready for review May 18, 2022 07:00
@CommanderStorm
Copy link
Member Author

Call to action:
image

Copy link
Contributor

@octycs octycs left a comment

Choose a reason for hiding this comment

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

Just some typos at the moment. I will test styling (esp. on mobile) later.

One thing though (we talked about it): Should we add a note to collect multiple edits in bulk? Else someone might hit the feedback rate limit.

Some possible idea: When selecting a coordinate, it is added into local storage, so that opening the dialog just reads all coordinates from local storage (the part in view-view.js). Then we can say on the feedback form, that your edit is temporarily saved and you can also close the dialog and add it for another room. Only when hitting submit (for type 'entry'), the local storage is cleared, or after a timeout (e.g. 12h).

webclient/src/i18n.yaml Outdated Show resolved Hide resolved
webclient/src/i18n.yaml Outdated Show resolved Hide resolved
webclient/src/views/view/view-view.js Outdated Show resolved Hide resolved
Co-authored-by: octycs <octycs@users.noreply.github.com>
@CommanderStorm
Copy link
Member Author

One thing though (we talked about it): Should we add a note to collect multiple edits in bulk? Else someone might hit the feedback rate limit.

Some possible idea: When selecting a coordinate, it is added into local storage, so that opening the dialog just reads all coordinates from local storage (the part in view-view.js). Then we can say on the feedback form, that your edit is temporarily saved and you can also close the dialog and add it for another room. Only when hitting submit (for type 'entry'), the local storage is cleared, or after a timeout (e.g. 12h).

I will have a look into it this comment this evening, if this would be a large change, I would like for this to be its own PR, but maybe this is just a small change..

@CommanderStorm
Copy link
Member Author

CommanderStorm commented May 18, 2022

I added the workflow as requested.

please have a look at 2c8b90a
Is this something we want, or should this be reverted?

Pro:

  • The amount of tokens requested per client should be reduced, if the user is using multiple tabs

Con:

  • if the user submits in one tab, this will not affect the token in the other tab => when the user tries to submit this token the user sees an error

@CommanderStorm
Copy link
Member Author

CommanderStorm commented May 18, 2022

I also do not know, if the toasts I added are to verbose.. I am somewhat divided on this

The current draft seems a bit overwhealming but I dont know of a shorter way to phrase the information
image

@octycs
Copy link
Contributor

octycs commented May 18, 2022

Is this something we want, or should this be reverted?

Oh right, I didn't think about using multiple tabs. In my opinion it's better yes, because it should (or am I wrong?) only be a problem if you had the feedback form already open in Tab B when clicking Submit in Tab A, and it should be easily fixed by copying the text and reopening the feedback form.

@octycs
Copy link
Contributor

octycs commented May 18, 2022

The current draft seems a bit overwhealming but I dont know of a shorter way to phrase the information

I'm not entirely sure where that last sentence about buildings etc. comes from. As far as I understand, the body is always just the list of collected edits, so it would only be a title/text mismatch (add vs. correct coordinate), but no data lost. Or am I missing something?

@CommanderStorm
Copy link
Member Author

Or am I missing something?

What I am imaginging is:

  1. User edits one coordinate and corrects the name
  2. closes the Feedback form
  3. opens it on another page (custom things the user did to the body are not present anymore)

@octycs
Copy link
Contributor

octycs commented May 18, 2022

What about a warning:

If you want to correct several coordinates at the same time, you can close this window and edit more coordinates.
We will save your changes locally for 12 hours.
Warning, that's only valid for coordinates!

Falls du mehrere Koordinaten gleichzeitig korrigieren willst, kannst du dieses Fenster schließen und weitere Koordinaten editieren. Wir speichern deine Veränderungen für 12 Stunden bei dir lokal.
Achtung, das gilt nur für Koordinaten!

Is this clear enough?

Signed-off-by: Frank Elsinga <frank@elsinga.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request frontend Related to the frontend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Coordinate Picker
2 participants