Closed Bug 1911369 Opened 2 years ago Closed 2 years ago

[Toolbar redesign] Migrate from rememberRipple() to ripple()

Categories

(Firefox for Android :: Toolbar, enhancement, P3)

All
Android
enhancement

Tracking

()

RESOLVED FIXED
132 Branch
Tracking Status
firefox132 --- fixed

People

(Reporter: royang, Assigned: royang)

References

(Blocks 1 open bug)

Details

Attachments

(7 files)

The reason as follows:

  1. Visual feedback ripple it cant be seen because of menu and user's thumb/finger.
  2. Haptic feedback on long pressing.
  3. Performance gain with no ripple effect set (due to rememberRipple)
Assignee: nobody → royang
Blocks: 1909258
Whiteboard: [avocado sprint]
Whiteboard: [avocado sprint]

Waiting for Compose Material version 1.7

Severity: -- → N/A
Priority: -- → P3
Summary: [Toolbar redesign] Remove ripple effect on the search and tabs tray buttons → [Toolbar redesign] Migrate from rememberRipple() to ripple()
See Also: → 1915975

(In reply to Chris Peterson [:cpeterson] from comment #3)

Waiting for Compose Material version 1.7

Which is now conveniently available.

It should no longer be needed with Compose 1.7 and Ripple API changes.

Modifier.kt:49: Error: Using Modifier.then with a Modifier factory function with an implicit receiver [SuspiciousModifierThen from androidx.compose.ui]
ReorderableList.kt:283: Error: Using Modifier.then with a Modifier factory function with an implicit receiver [SuspiciousModifierThen from androidx.compose.ui]

https://googlesamples.github.io/android-custom-lint-rules/checks/SuspiciousModifierThen.md.html

Here's a perfherder comparison link for perftest-android-hw-a51-startup-fenix-cold for this patchset vs. plain m-c tip (which includes the fix from bug 1915975):
https://treeherder.mozilla.org/perfherder/compare?originalProject=try&originalRevision=ecb01ec517d59b7967c84a62b48aee02d8e36ca3&newProject=try&newRevision=9d52896824eabb7f0d4e78ccc21c769e78040669&framework=15&page=1

Looks like it's pretty neutral to a slight improvement. Over to you for more testing, Roger!

Flags: needinfo?(royang)

looks great. I did a profile with your changes and the rememberRipple performance cost is definitely gone. Please feel free to move forward with this. Thanks!

Flags: needinfo?(royang)
Attachment #9422930 - Attachment description: WIP: Bug 1911369 - Update AndroidX Compose BOM to version 2024.09.00. → Bug 1911369 - Update AndroidX Compose BOM to version 2024.09.00.
Attachment #9422933 - Attachment description: WIP: Bug 1911369 - Revert bug 1915975. → Bug 1911369 - Revert bug 1915975.
Attachment #9422934 - Attachment description: WIP: Bug 1911369 - Use quadraticTo() instead of quadraticBezierTo(). → Bug 1911369 - Use quadraticTo() instead of quadraticBezierTo().
Attachment #9422935 - Attachment description: WIP: Bug 1911369 - Adapt to Ripple API changes. → Bug 1911369 - Adapt to Ripple API changes.
Attachment #9422936 - Attachment description: WIP: Bug 1911369 - Fix SuspiciousModifierThen errors. → Bug 1911369 - Fix SuspiciousModifierThen errors.
Attachment #9422937 - Attachment description: WIP: Bug 1911369 - Suppress ClickableText deprecation warnings. → Bug 1911369 - Suppress ClickableText deprecation warnings.
See Also: → 1917336
Pushed by rvandermeulen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1deb428dd28d Update AndroidX Compose BOM to version 2024.09.00. r=android-reviewers,Roger https://hg.mozilla.org/integration/autoland/rev/c36dc110dba3 Revert bug 1915975. r=android-reviewers,Roger https://hg.mozilla.org/integration/autoland/rev/d37d7be320ce Use quadraticTo() instead of quadraticBezierTo(). r=android-reviewers,Roger https://hg.mozilla.org/integration/autoland/rev/2801135d0ebe Adapt to Ripple API changes. r=android-reviewers,mcarare,Roger https://hg.mozilla.org/integration/autoland/rev/fd44a9da188a Fix SuspiciousModifierThen errors. r=android-reviewers,Roger https://hg.mozilla.org/integration/autoland/rev/4fe85c6bb778 Suppress ClickableText deprecation warnings. r=android-reviewers,Roger https://hg.mozilla.org/integration/autoland/rev/c37b6b3302f8 Remove some obsolete ExperimentalMaterialApi annotations. r=android-reviewers,Roger
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: