Skip to content

feat: Show tooltip for unobvious elements #2637

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

Open
wants to merge 6 commits into
base: compose-dev
Choose a base branch
from

Conversation

validcube
Copy link
Member

@validcube validcube commented Jul 5, 2025

Add TooltipWrap to well... wrap a composable component using TooltipBox.

Extended FAB aren't wrapped because they have text shown in the button.

Icon Button, Small FAB and regular FAB are wrapped because they do not have text shown.

partially fix - #2555

@validcube validcube added the ReVanced Manager Compose Regarding the Compose rewrite of ReVanced Manager label Jul 5, 2025
@validcube validcube changed the base branch from main to compose-dev July 5, 2025 17:49
@validcube validcube requested a review from Copilot July 5, 2025 17:49
Copilot

This comment was marked as outdated.

Copy link
Member

@Axelen123 Axelen123 left a comment

Choose a reason for hiding this comment

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

I thought the contentDescription of the icon was enough for accessibility purposes but I assume there is a good reason for it. The pattern of wrapping an IconButton in a TooltipWrap appears a lot. Consider making a new composable to handle it.

@validcube
Copy link
Member Author

I thought the contentDescription of the icon was enough for accessibility purposes but I assume there is a good reason for it.

contentDescription is for accessibility purposes (TalkBack), but Tooltip is for feature discovery purposes (let users know what this button will do before they press on it)

lwix5iqu-1.png

The pattern of wrapping an IconButton in a TooltipWrap appears a lot. Consider making a new composable to handle it.

Agree, willco on Sunday weekends.

@validcube
Copy link
Member Author

Done™️!

@validcube validcube requested review from Axelen123 and Copilot July 11, 2025 09:14
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a set of reusable tooltip wrappers (TooltipWrap, TooltipIconButton, TooltipFloatingActionButton, TooltipSmallFloatingActionButton) and replaces many existing IconButton/FAB usages across screens to display tooltips for actions without visible text.

  • Introduces new tooltip components under ui/component/tooltip
  • Wraps delete, reset, back, help, search, and other icon buttons with TooltipIconButton
  • Replaces plain and haptic FABs with TooltipFloatingActionButton/TooltipSmallFloatingActionButton where appropriate

Reviewed Changes

Copilot reviewed 23 out of 24 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
app/src/main/java/app/revanced/manager/ui/screen/settings/DownloadsSettingsScreen.kt Wrapped delete action in TooltipIconButton
app/src/main/java/app/revanced/manager/ui/screen/settings/AdvancedSettingsScreen.kt Wrapped restore/reset action in TooltipIconButton
app/src/main/java/app/revanced/manager/ui/screen/settings/AboutSettingsScreen.kt Wrapped social icon buttons in TooltipIconButton
app/src/main/java/app/revanced/manager/ui/screen/PatchesSelectorScreen.kt Wrapped search, filter, back icons and FABs in tooltip wrappers
app/src/main/java/app/revanced/manager/ui/screen/PatcherScreen.kt Wrapped save and log export icons in TooltipIconButton
app/src/main/java/app/revanced/manager/ui/screen/DashboardScreen.kt Wrapped toolbar icons and FAB in tooltip wrappers
app/src/main/java/app/revanced/manager/ui/screen/AppSelectorScreen.kt Wrapped search icon in TooltipIconButton
app/src/main/java/app/revanced/manager/ui/component/tooltip/TooltipWrap.kt Added core TooltipWrap component
app/src/main/java/app/revanced/manager/ui/component/tooltip/TooltipIconButton.kt Added TooltipIconButton wrapper
app/src/main/java/app/revanced/manager/ui/component/tooltip/TooltipFloatingActionButton.kt Added TooltipFloatingActionButton wrapper
app/src/main/java/app/revanced/manager/ui/component/tooltip/TooltipSmallFloatingActionButton.kt Added TooltipSmallFloatingActionButton wrapper
app/src/main/java/app/revanced/manager/ui/component/settings/IntegerItem.kt Wrapped edit icon in TooltipIconButton
app/src/main/java/app/revanced/manager/ui/component/patches/OptionFields.kt Wrapped option editor icons in TooltipIconButton
app/src/main/java/app/revanced/manager/ui/component/haptics/HapticSmallFloatingActionButton.kt Introduced haptic small FAB (unchanged)
app/src/main/java/app/revanced/manager/ui/component/bundle/ImportBundleDialog.kt Added TODO around potential tooltip wrapping
app/src/main/java/app/revanced/manager/ui/component/bundle/BundleTopBar.kt Wrapped back icon in TooltipIconButton
app/src/main/java/app/revanced/manager/ui/component/bundle/BundleInformationDialog.kt Wrapped delete/update icons in TooltipIconButton
app/src/main/java/app/revanced/manager/ui/component/SearchView.kt Wrapped back icon in TooltipIconButton
app/src/main/java/app/revanced/manager/ui/component/PasswordField.kt Wrapped visibility toggle in TooltipIconButton
app/src/main/java/app/revanced/manager/ui/component/NotificationCard.kt Wrapped dismiss icon in TooltipIconButton
app/src/main/java/app/revanced/manager/ui/component/ExceptionViewerDialog.kt Wrapped share icon in TooltipIconButton
app/src/main/java/app/revanced/manager/ui/component/ArrowButton.kt Wrapped arrow toggle in TooltipIconButton
app/src/main/java/app/revanced/manager/ui/component/AppScaffold.kt Wrapped back icon in TooltipIconButton
Comments suppressed due to low confidence (1)

app/src/main/java/app/revanced/manager/ui/component/tooltip/TooltipWrap.kt:1

  • [nitpick] The new tooltip components introduce interactive UI behavior and haptic feedback but don’t appear to have any corresponding tests. Consider adding unit or integration tests to verify tooltip visibility and haptic feedback on long press.
package app.revanced.manager.ui.component.tooltip

) {
IconButton(
onClick = onClick,
modifier = modifier,
Copy link
Preview

Copilot AI Jul 11, 2025

Choose a reason for hiding this comment

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

[nitpick] The modifier is applied to both TooltipWrap and the inner IconButton, leading to duplicate modifications in layout or behavior. Consider applying the modifier only to the outer wrapper and using the default Modifier for the inner IconButton.

Suggested change
modifier = modifier,

Copilot uses AI. Check for mistakes.

content: @Composable (() -> Unit),
) {
TooltipWrap(
modifier = modifier,
Copy link
Member

Choose a reason for hiding this comment

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

If you need to pass modifiers to TooltipWrap, use a separate parameter, otherwise remove it. This also applies for the other components.

@@ -69,7 +69,11 @@ fun AppTopBar(
scrollBehavior = scrollBehavior,
navigationIcon = {
if (onBackClick != null) {
IconButton(onClick = onBackClick) {
TooltipIconButton(
modifier = Modifier,
Copy link
Member

Choose a reason for hiding this comment

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

Explicitly passing empty Modifiers is unnecessary since the parameter should be set by default. Please remove these throughout the codebase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ReVanced Manager Compose Regarding the Compose rewrite of ReVanced Manager
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants