Skip to content

Conversation

@snowtimeglass
Copy link
Contributor

@snowtimeglass snowtimeglass commented Oct 31, 2025

[edit from @mikehardy - see updated screenshot below https://github.com//pull/19396#issuecomment-3551240334 ]

Purpose / Description

(Screenshots of one of recent main: 4c812d)
image image

Probably, most users come to the "Add" screen of Image Occlusion note type just in order to use the "Camera" or the "Gallery" feature; moving these actions from the submenu to the top screen of the note editor is practical.

Not only from the pragmatic point of view, but also from a theoretical standpoint, "Gallery" is equivalent to "Select image" in the desktop version, so "Camera" should be a separate option on the same level with "Gallery" and "Paste image from clipboard". In fact, in AnkiMobile, the three options are placed in the same hierarchy.

image image

(Besides, there is more than enough space on the current "Add" screen for Image Occlusion note type (the screen doesn't show deck selector, tag field, toolbar, and keyboard); adding more parts will rather improve the visual balance.)
image

Approach

  • Add buttons for Gallery and Camera in the note editor screen, and remove the submenu codes and files for the two actions
  • Add a labels for the buttons
  • Rename the button for clipboard

How Has This Been Tested?

Checked on a physical device (Android 15)

Before After

image
(Updated on November 3, 2025)
image
image No submenu
"Edit note" screen
image
No (unexpected) changes are observed
image
  • Confirmed that the "Gallery" and "Camera" buttons works as when they were in submenu

Checklist

  • 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

@github-actions
Copy link
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

@snowtimeglass snowtimeglass force-pushed the occlusion_note_screen_button_for_camera_and_gallery_4 branch from 19e52b8 to 8b5e1d5 Compare October 31, 2025 10:54
Copy link
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 like this and I think it's an improvement. Left below minor issues related to the appearance and the strings used.

<string name="note_message">Note saved</string>
<string name="CardEditorCardDeck">Card deck:</string>
<string name="CardEditorNoteDeck">Deck:</string>
<string name="imageSelectionForOcclusionLabel">Image:</string>
Copy link
Member

@lukstbit lukstbit Nov 1, 2025

Choose a reason for hiding this comment

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

I don't think we need to introduce a new string and we could use instead the backend string TR.notetypesIoSelectImage()(the actual text it produces is Select Image(needs sentence case)). It doesn't have ":" at the end but I don't think it's relevant anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The Select Image, which is imperative form, is inconsistent with other labels here. It looks a bit odd to me.

Also, users come to the screen to add Image Occlusion note, so it is already clear for users that the screen (with the conspicuous buttons) is prompting them to select an image.

So, the minimal label "Image:" is sufficient; "Select Image" would be verbose here, IMO.

Copy link
Member

Choose a reason for hiding this comment

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

users come to the screen to add Image Occlusion note, so it is already clear for users that the screen (with the conspicuous buttons) is prompting them to select an image.

For those users, yes it's verbose(and mostly not important), but for someone new might be more useful.

Also this would avoid having to ask for translations for a string which kind of has a backend counterpart.

Copy link
Member

Choose a reason for hiding this comment

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

Please use the backend string. This will be gone some day. Don't add extra work to the translators.

Copy link
Contributor Author

@snowtimeglass snowtimeglass Nov 4, 2025

Choose a reason for hiding this comment

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

Is it okay to use a different backend string, notetypes-image ("Image"), not the "Select image"?

(Another reason, not yet explicitly mentioned above, why the use of the Select image here is undesirable is that it isn't consistent with the usage in the desktop version. In the context, the Select image merely means "Select an image from already-saved files", which is just equivalent to one of the actions here (i.e., "Gallery"). It doesn't imply pasting from the clipboard; it isn't a superordinate concept of the actions of buttons.

Using it as a superordinate label here would be kind of arbitrary deviation from the context and to be avoided as much as possible. It would be unnecessarily confusing.)

<string name="CardEditorTags">Tags: %1$s</string>
<string name="CardEditorCards">Cards: %1$s</string>
<string name="edit_occlusions">Edit Occlusions</string>
<string name="clipboard_for_occlusions" comment="Button's label for pasting image from clipboard in Image Occlusion note type's Add screen" maxLength="28">Paste from clipboard</string>
Copy link
Contributor

Choose a reason for hiding this comment

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

Chsnge not needed, use TR.editingFromClipboard() or the previous one TR.notetypesIoPasteImageFromClipboard()

Copy link
Contributor Author

@snowtimeglass snowtimeglass Nov 3, 2025

Choose a reason for hiding this comment

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

I don't prefer either of them in this case.

TR.editingFromClipboard() (From clipboard) would lack consistency with "Gallery" (= it means 'From gallery') and "Camera" (= 'From camera'): it would be verbose in this case, and this inconsistency would bring no benefit to users.

TR.notetypesIoPasteImageFromClipboard() (Paste Image from Clipboard) would also be verbose here as the label already mentions "Image".

From a purely logical consistency standpoint, “Clipboard” would be appropriate, but I am a little concerned about whether the word ‘clipboard’ is familiar enough to common users, so I have left the word “paste,” which is probably more intuitive for them.

image

@criticalAY criticalAY added the Needs Author Reply Waiting for a reply from the original author label Nov 1, 2025
Copy link
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.

Ok, leaving the backend string discussion to the second reviewer.

<string name="note_message">Note saved</string>
<string name="CardEditorCardDeck">Card deck:</string>
<string name="CardEditorNoteDeck">Deck:</string>
<string name="imageSelectionForOcclusionLabel">Image:</string>
Copy link
Member

Choose a reason for hiding this comment

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

users come to the screen to add Image Occlusion note, so it is already clear for users that the screen (with the conspicuous buttons) is prompting them to select an image.

For those users, yes it's verbose(and mostly not important), but for someone new might be more useful.

Also this would avoid having to ask for translations for a string which kind of has a backend counterpart.

@lukstbit lukstbit added Needs Second Approval Has one approval, one more approval to merge and removed Needs Author Reply Waiting for a reply from the original author labels Nov 3, 2025
Copy link
Contributor

@criticalAY criticalAY left a comment

Choose a reason for hiding this comment

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

I still feel the string can be removed and we should one from backend rest is fine

@BrayanDSO BrayanDSO added the Needs Author Reply Waiting for a reply from the original author label Nov 3, 2025
@david-allison
Copy link
Member

david-allison commented Nov 3, 2025

Any chance we can change the shape of the buttons to make them larger

We have a lot more space and could have much larger touch targets with icons.

Don't let this block the PR, the current change is already an improvement

@david-allison
Copy link
Member

david-allison commented Nov 4, 2025

Gemini suggested this with a bit of prompting; I like the 3 buttons

image

@snowtimeglass snowtimeglass removed the Needs Author Reply Waiting for a reply from the original author label Nov 8, 2025
@mikehardy
Copy link
Member

I would merge this except:

  • you have a defense of the strings used, I understand, but the reviewers are all disagreeing with you. You can stand on that defense, and the PR can sit for longer, or if you just use "close enough" backend strings (and implement the "sentence case" rule for that string) then this is merge-able. My recommendation is to take the suggestions to use the backend string so this can move
  • appears to need a related issue peeled off this to change the buttons as David suggests, unless you do feel like doing them here

@mikehardy mikehardy added the Needs Author Reply Waiting for a reply from the original author label Nov 14, 2025
@david-allison
Copy link
Member

Don't block on my comments, it's better to keep things moving

@mikehardy
Copy link
Member

@david-allison - agreed, my proposed concrete action for your comments was to peel to another issue, I think the strings thing is the real sticky point here. I don't feel comfortable just overriding the review suggestion from all the other reviewers, despite the defense.

@snowtimeglass
Copy link
Contributor Author

snowtimeglass commented Nov 16, 2025

@mikehardy

I or you may be misunderstanding something. I have merely been waiting for feedback (such as agreement or disagreement) from reviewers on the following alternative, which would use a possibly-closer-enough backend string:

Is it okay to use a different backend string, notetypes-image ("Image"), not the "Select image"?

Originally posted by @snowtimeglass in #19396 (comment)

I have proposed that, assuming it can be in line with the reviewers' thoughts.

@mikehardy
Copy link
Member

@snowtimeglass ah! I think it is me that misunderstood that. I believe the main sticking point for other reviewers was that adding a string here vs from backend was unnecessary translator labor, therefore - if there is a backend string that is good enough (and the one you propose does seem good enough to me) - then using that backend string would free this up for merge in my opinion

@david-allison david-allison mentioned this pull request Nov 18, 2025
96 tasks
@snowtimeglass
Copy link
Contributor Author

snowtimeglass commented Nov 19, 2025

@mikehardy Thank you! I've updated this PR with the backend string.

Screenshot:
image

Probably, most users come to the "Add" screen of Image Occlusion note type screen
just in order to use the "Camera" or the "Gallery" feature;
moving these actions from the submenu to the top screen of the note editor is practical.

Not only from the pragmatic point of view, but also from a theoretical standpoint,
"Gallery" is equivalent to "Select image" in the desktop version,
so "Camera" should be a separate option on the same level with
"Gallery" and "Paste image from clipboard".
In fact, in AnkiMobile, the three options are placed in the same hierarchy.

(Besides, there is more than enough space on the current "Add" screen
for Image Occlusion note type (the screen doesn't show deck selector,
tag field, toolbar, and keyboard); adding more parts will rather improve
the visual balance.)
@snowtimeglass snowtimeglass force-pushed the occlusion_note_screen_button_for_camera_and_gallery_4 branch from fa53a66 to 1180cea Compare November 19, 2025 08:31
Copy link
Member

@mikehardy mikehardy left a comment

Choose a reason for hiding this comment

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

I believe all the review comment are addressed

I don't want to inadvertently make a taste error contra- to one of the prior reviewers
(as my taste is sometimes questionable, see #19381 ) - so asking for a re-review

@mikehardy mikehardy removed the Needs Author Reply Waiting for a reply from the original author label Nov 19, 2025
Copy link
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.

Ok.

@lukstbit lukstbit added this pull request to the merge queue Nov 21, 2025
@lukstbit lukstbit added Pending Merge Things with approval that are waiting future merge (e.g. targets a future release, CI wait, etc) and removed Needs Second Approval Has one approval, one more approval to merge labels Nov 21, 2025
Merged via the queue into ankidroid:main with commit d8089d0 Nov 21, 2025
15 checks passed
@github-actions github-actions bot added this to the 2.23 release milestone Nov 21, 2025
@github-actions
Copy link
Contributor

Maintainers: Please Sync Translations to produce a commit with only the automated changes from this PR.

Read more about updating strings on the wiki,

@github-actions github-actions bot removed the Pending Merge Things with approval that are waiting future merge (e.g. targets a future release, CI wait, etc) label Nov 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants