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

Update SnapGeometryEdits #201

Merged
merged 4 commits into from
May 30, 2024
Merged

Update SnapGeometryEdits #201

merged 4 commits into from
May 30, 2024

Conversation

Luiy0
Copy link
Collaborator

@Luiy0 Luiy0 commented May 23, 2024

Description

This update fixes a casting issue in the sample given snap sources can now be graphics overlays. Additionally, the UI has been reworked to reduce code and updated to include a section to enable snapping to the graphics overlay.

Notes:

  • The upper part of the SnapSettingsScreen is hidden underneath the scaffold topBar with the addition of the graphics overlay UI section. A workaround was to move the SampleTopAppBar to within the Scaffold contents so that the SnapSettingsScreen appears above the sample title.
  • Readme and metadata to be updated following design changes.

Links and Data

Update Design PR

What To Review

  • Review the code to make sure it is easy to follow like other samples on Android
  • README.md and README.metadata.json files

How to Test

Run the sample on the sample viewer or the repo.

Add graphics overlay UI
@Luiy0 Luiy0 self-assigned this May 23, 2024
@Luiy0 Luiy0 changed the title Update SnapGeometryEdits Sample Update SnapGeometryEdits May 24, 2024
Copy link
Collaborator

@fpearson1111 fpearson1111 left a comment

Choose a reason for hiding this comment

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

LGTM (haven't done a super in-depth review though)

Comment on lines 130 to 133
SetupSnapSourceUI(snapSourceList, isSnapSourceEnabled, onSnapSourceChanged, GeometryType.Point)
SetupSnapSourceUI(snapSourceList, isSnapSourceEnabled, onSnapSourceChanged, GeometryType.Polyline)
SetupSnapSourceUI(snapSourceList, isSnapSourceEnabled, onSnapSourceChanged, null)
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice 👍

@Luiy0 Luiy0 marked this pull request as ready for review May 29, 2024 10:36
@Luiy0 Luiy0 requested a review from shubham7109 May 29, 2024 10:37
@Luiy0
Copy link
Collaborator Author

Luiy0 commented May 29, 2024

Hi @shubham7109, can you please review? Thanks.

@hud10837 hud10837 self-requested a review May 29, 2024 15:16
Copy link
Collaborator

@hud10837 hud10837 left a comment

Choose a reason for hiding this comment

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

Changes LGTM. One naming change, but no need to re-review.

There is one preexisting bug in this sample that I found, which your changes haven't caused. If I start creating a geometry but never tap on the map, then want to cancel, pressing the delete icon doesn't work, I can only stop by pressing the save icon. That's a bit unintuitive but not a huge deal.

}

@Composable
fun SetupSnapSourceUI(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Better to make this a noun, ie. SnapSourceUI

@Luiy0
Copy link
Collaborator Author

Luiy0 commented May 30, 2024

Thanks for the quick review @hud10837. I made a fix to the delete button as per your observation. We should be ready to merge now.

@Luiy0 Luiy0 merged commit 983c70a into v.next May 30, 2024
1 check passed
@Luiy0 Luiy0 deleted the lui12799/update_snap_geometry_edits branch May 30, 2024 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants