Skip to content

Conversation

@vijay2909
Copy link

Fixes: #2764

  1. Refactored card_view_menu.xml — removed unnecessary nested menu items for the action popup (Android handles this automatically).
  2. Implemented a single menu item to toggle Archive / Unarchive, similar to the Star menu item.
  3. Added tooltips for the Archive / Unarchive toggle button.
  4. Introduced two new drawables with matching colors and similar icon styles.
  5. Removed unused drawable ( 3 vertical dots icon )
  6. Update tests accordingly, since card_view_menu.xml has changed

Copy link
Member

@TheLastProject TheLastProject left a comment

Choose a reason for hiding this comment

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

Looks generally correct. Have a few small nitpicks and questions

Comment on lines 832 to 834
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
menu.findItem(R.id.action_archive_unarchive).setTooltipText(getString(R.string.unarchive));
}
Copy link
Member

Choose a reason for hiding this comment

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

What difference does this setTooltip call make? I'm not seeing any difference between this and the favourite button when I press or long-press it.

Copy link
Author

Choose a reason for hiding this comment

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

It adds a small tooltip that appears when you long-press or hover over the icon (on Android 8.0+). It’s mainly for accessibility and clarity — helps users understand what the icon does. The difference is subtle, so it’s easy to miss unless you long-press for a moment.

Copy link
Member

Choose a reason for hiding this comment

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

Well, that's the point I'm trying to make: the long-press behaviour is exactly the same for this and the favourite button but the favourite button doesn't have this function call (on Android 15 at least):

image image

For hover, I'm not sure how to test that, any info?

Copy link
Member

Choose a reason for hiding this comment

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

This icon seems to use a completely different arrow than the other archive icons. Can we maybe make this icon consistent with the other 2?

(Seems this one is from "Material Symbols Outlined", while the others are from "Outlined" and "Filled", so using "archive" from the "Outlined" set should fix this)

This icon (ic_outline_archive.xml) loyalty_card_icon_archived.xml ic_unarchive.xml
image image image

Copy link
Member

Choose a reason for hiding this comment

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

(I think it might also be better to use "loyalty_card_icon_archived.xml" for when the icon is archived, as that is more consistent with the favourite icon which shows the current state as opposed to the action pressing the button will do, but I'm honestly not sure what the official Google design language says should be used)

Copy link
Author

Choose a reason for hiding this comment

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

Originally, the Archive icon represented the action (like Gmail), but Gmail removes the item from the list after archiving. Since we’re keeping the card visible in the list, it makes more sense to show the icon as a current state indicator rather than an action.
Star icons are similar — they show state. So now, Unarchive shows if the card is unarchived, Archive if it’s archived, making the status clear at a glance.

Copy link
Member

Choose a reason for hiding this comment

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

But now the star and archive buttons have completely opposite semantics, despite being next to each other. Star shows the current state, archive shows what state change will happen when you press it. That seems very confusing to me, which is why I suggested making both show the current state for consistency, using the non-outline vs. outline differences to show the difference in if it's archived or not (like how the star for favouriting currently works)

vijay2909 and others added 3 commits October 18, 2025 23:49
…java

Co-authored-by: Sylvia van Os <sylvia@hackerchick.me>
Co-authored-by: Sylvia van Os <sylvia@hackerchick.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FR: Archive status while card is open

2 participants