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

[Draw area] Don't allow user to draw mis-shapen polygons #2604

Open
gino-m opened this issue Aug 5, 2024 · 7 comments
Open

[Draw area] Don't allow user to draw mis-shapen polygons #2604

gino-m opened this issue Aug 5, 2024 · 7 comments
Labels
type: fr Request for new feature
Milestone

Comments

@gino-m
Copy link
Collaborator

gino-m commented Aug 5, 2024

Do not allow self-intersecting polygons to be added.

When trying to add a vertex that would introduce an invalid polygon, we'll show a dialog with the message ""Areas can't intersect with themselves" and "Ok" button to dismiss.

@gino-m gino-m added this to Ground Aug 5, 2024
@gino-m gino-m converted this from a draft issue Aug 5, 2024
@gino-m gino-m added the type: fr Request for new feature label Aug 5, 2024
@gino-m gino-m added this to the GA release milestone Aug 5, 2024
@gino-m gino-m added the ux needed Product input from PM/UX needed label Aug 6, 2024
@amegantz
Copy link

amegantz commented Aug 17, 2024

After rejecting the vertex, maybe we show a toast/snackbar and say something like:

  • "The edges of an area can't overlap with other edges from the same area"
  • "Areas can't intersect with themselves"
  • "Area perimeter can't intersect with itself"

WDYT?

@gino-m
Copy link
Collaborator Author

gino-m commented Aug 19, 2024

  • "Area perimeter can't intersect with itself"

I vote for 3, possibly removing the term "area", which we no longer mention during the data collection flow, so:

"Perimeter can't intersect with itself"

@amegantz
Copy link

Works for me

@rawbzz
Copy link

rawbzz commented Dec 6, 2024

I have one option where its a popup toast and one thats more like a dialog

Image

@gino-m
Copy link
Collaborator Author

gino-m commented Dec 6, 2024

I have one option where its a popup toast and one thats more like a dialog

Image

Thanks, @rawbzz. Both options look good, I'm leaning towards the second option since it provides an explicit way of dismissing the message which isn't close to the "Add point" tap target, helping to mitigate accidental taps.

Assuming the 2nd option, I would update the label - the current label sounds like tapping might add a point. Perhaps a simple "Ok" would be better (@amegantz)

@rawbzz
Copy link

rawbzz commented Dec 13, 2024

agreed i like the second option

@gino-m gino-m removed the ux needed Product input from PM/UX needed label Dec 13, 2024
@gino-m
Copy link
Collaborator Author

gino-m commented Dec 13, 2024

Thanks @rawbzz , updated the PR description accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: fr Request for new feature
Projects
Status: No status
Development

No branches or pull requests

3 participants