Skip to content

Update Snap geometry edits readme to include default haptics information #250

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

Closed
wants to merge 1 commit into from

Conversation

duffh
Copy link
Collaborator

@duffh duffh commented Oct 24, 2024

Description

PR to update the Kotlin sample "Snap geometry edits" in Edit and Manage Data category.

Included information on the default haptics experience, how to disable haptics and implement custom haptics based on SnapState.

@duffh duffh self-assigned this Oct 24, 2024
Copy link
Collaborator

@TADraeseke TADraeseke left a comment

Choose a reason for hiding this comment

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

Just a couple small bits!

@@ -65,6 +65,8 @@ Snapping can be used during interactive edits that move existing vertices using

Geometry guides are enabled by default when snapping is enabled. These allow for snapping to a point coinciding with, parallel to, perpendicular to, or extending an existing geometry.

On supported platforms haptic feedback on `SnapState.snappedToFeature` and `SnapState.snappedToGeometryGuide` is enabled by default when snapping is enabled. Custom haptic feedback can be configured by setting `SnapSettings.isHapticFeedbackEnabled` to false and listening to `GeometryEditor.snapChanged` events to provide specific feedback depending on the `SnapState`.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
On supported platforms haptic feedback on `SnapState.snappedToFeature` and `SnapState.snappedToGeometryGuide` is enabled by default when snapping is enabled. Custom haptic feedback can be configured by setting `SnapSettings.isHapticFeedbackEnabled` to false and listening to `GeometryEditor.snapChanged` events to provide specific feedback depending on the `SnapState`.
On supported platforms, haptic feedback on `SnapState.snappedToFeature` and `SnapState.snappedToGeometryGuide` is enabled by default, when snapping is enabled. Custom haptic feedback can be configured by setting `SnapSettings.isHapticFeedbackEnabled` to false and listening to `GeometryEditor.snapChanged` events to provide specific feedback, depending on the `SnapState`.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I wonder if we should use the term SharedFlow or Flow at any point here to make it more kotlin specific

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm not sure I agree with the inclusion of the commas here, it may be my poor grammatical ability but it feels like it puts unnatural pauses into the sentence structure.

I can break the sentences down if you think they're running a bit long. The crux of the first sentence is:

"On supported platforms haptic feedback is enabled by default when snapping is enabled."

I've included the snap sates under which haptics fire but I could word it differently or include them as an aside.

Similarly the second sentence:

"Custom haptic feedback can be configured by disabling the default haptics and listening to snap events to provide specific feedback for each snap state".

I've added the specific API calls which can make it feel a bit more verbose, happy to go with what you'd like though.

I'm not aware of SharedFlow or Flow but I'm happy to take suggestions.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@shubham7109
Copy link
Collaborator

shubham7109 commented Oct 25, 2024

@duffh ⚠️Do not merge this PR v.next ⚠️ . We are in the process of replacing the project on v.next with the new sample viewer design. I have carried over these changes to #249, and I would recommend pointing to the design/compose-sample-viewer for future PRs which will eventually replace v.next.

Feel free to make/recommend additional changes to #249 as needed.

Copy link
Collaborator

@shubham7109 shubham7109 left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@duffh duffh closed this Oct 28, 2024
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