Skip to content

feat(manage-notetypes): use more material components#21072

Open
BrayanDSO wants to merge 3 commits into
ankidroid:mainfrom
BrayanDSO:feat/manage-notetypes
Open

feat(manage-notetypes): use more material components#21072
BrayanDSO wants to merge 3 commits into
ankidroid:mainfrom
BrayanDSO:feat/manage-notetypes

Conversation

@BrayanDSO
Copy link
Copy Markdown
Member

@BrayanDSO BrayanDSO commented May 17, 2026

Purpose / Description

Hide the FAB on scroll and use a Material App Bar

How Has This Been Tested?

Emulator 31

Details
Screen_recording_20260518_081453.webm

Screenshot tests

Details

./gradlew :AnkiDroid:recordRoborazziPlayDebug -Pscreenshot --tests "com.ichi2.anki.notetype.*" -Ptheme=all

appbar_lifted base black_appbar_lifted black_base black_multi_select_mode dark_appbar_lifted dark_base dark_multi_select_mode multi_select_mode plain_appbar_lifted plain_base plain_multi_select_mode

Learning (optional, can help others)

Describe the research stage

Links to blog posts, patterns, libraries or addons used to solve this problem

Checklist

Please, go through these checks before submitting the PR.

  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • You have commented your code, particularly in hard-to-understand areas
  • You have performed a self-review of your own code
  • UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
  • UI Changes: You have tested your change using the Google Accessibility Scanner

@BrayanDSO
Copy link
Copy Markdown
Member Author

BrayanDSO commented May 17, 2026

the animation feels buggy. Works well on the Settings fragments. Idk what's the difference.

Maybe it's the subtitle? It is the subtitle. The animation is smooth wihout it. Looks like an upstream issue

Maybe move the subtitle to the bottom of the screen like the Studied X cards in Y minutes text in the deck picker?

image

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 17, 2026

Snapshot diff report vs main. Open screenshot-diff for diffs.

  • ManageNotetypesScreenshotTest: 3 changes
All 3 changed screenshots

ManageNotetypesScreenshotTest

  • appbar_lifted_compare.png
  • base_compare.png
  • multi_select_mode_compare.png

@ZornHadNoChoice

This comment was marked as resolved.

@lukstbit
Copy link
Copy Markdown
Member

lukstbit commented May 18, 2026

Maybe move the subtitle to the bottom of the screen like the Studied X cards in Y minutes text in the deck picker?

Maybe remove it directly, it provides no relevant information IMO just clutters the toolbar.

I also agree with ZornHadNoChoice, it doesn't look too good. I made this remark with Settings as well.

Comment thread AnkiDroid/src/test/java/com/ichi2/anki/notetype/ManageNotetypesScreenshotTest.kt Outdated
Comment thread AnkiDroid/src/main/res/layout/activity_manage_note_types.xml Outdated
Copy link
Copy Markdown
Member

@lukstbit lukstbit left a comment

Choose a reason for hiding this comment

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

I'm ok with the changes with a discussion on the toolbar style to settle this once for all.

Love the screenshot tests.

@BrayanDSO BrayanDSO force-pushed the feat/manage-notetypes branch from 0a8a5ed to f5599ae Compare May 18, 2026 11:19
@github-actions
Copy link
Copy Markdown
Contributor

Important

Maintainers: This PR contains Strings changes

  1. Sync Translations before merging this PR and wait for the action to complete
  2. Review and merge the auto-generated PR in order to sync all user-submitted translations
  3. Sync Translations again and merge the PR so the huge automated string changes caused by merging this PR are by themselves and easy to review

@BrayanDSO BrayanDSO force-pushed the feat/manage-notetypes branch from f5599ae to 98a3525 Compare May 18, 2026 11:20
@BrayanDSO
Copy link
Copy Markdown
Member Author

  1. Used a default non-collapsible toolbar
  2. Updated the video and screenshot tests

@BrayanDSO BrayanDSO added Needs Second Approval Has one approval, one more approval to merge and removed Needs Review labels May 18, 2026
@david-allison
Copy link
Copy Markdown
Member

AppBar is fine.

I question hiding the FAB. I don't see this happening on other apps (Gmail contracts the FAB, but that's not a hide) and the RecyclerView seems to have sufficient bottom padding so the FAB won't obscure the bottom row

@ZornHadNoChoice
Copy link
Copy Markdown
Collaborator

FABs remain in place on scroll.

Extended FABs can collapse into a FAB on scroll and expand on reaching the bottom of the view.

-Material 3 guidelines

@BrayanDSO BrayanDSO force-pushed the feat/manage-notetypes branch from 98a3525 to 9895f9f Compare May 18, 2026 12:15
@BrayanDSO
Copy link
Copy Markdown
Member Author

It's something Material has on its own catalog app, so it is an acceptable practice in Material design.

With many notetypes the bottom padding feels quite weird IMO. It looks like someone oversaw an extra enormous margin while designing the screen

Details image

With auto-hide, it can be half the original size

Details image

Also, "Adding" may not be a frequent action for a lot of people. Maybe it shouldn't even be a FAB, just a + button in the menu. For those people, automatically hiding it make it less intrusive.

@lukstbit
Copy link
Copy Markdown
Member

I added the margin at the bottom to protect the content from being hidden by the fab and also to leave space for the multi selection info panel that also appears at the bottom.

@BrayanDSO
Copy link
Copy Markdown
Member Author

I added the margin at the bottom to protect the content from being hidden by the fab and also to leave space for the multi selection info panel that also appears at the bottom.

I get that and it was a good choice, but the padding may still be weird for the people that don't notice that

Copy link
Copy Markdown
Contributor

@Giyutomioka-SS Giyutomioka-SS left a comment

Choose a reason for hiding this comment

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

LGTM! 🚀

Comment thread AnkiDroid/src/main/res/layout/activity_manage_note_types.xml
@BrayanDSO BrayanDSO force-pushed the feat/manage-notetypes branch from 9895f9f to 18bc31f Compare May 19, 2026 01:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Second Approval Has one approval, one more approval to merge Strings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants