Anki-android: copy&paste menu

Created on 16 Oct 2019  ยท  14Comments  ยท  Source: ankidroid/Anki-Android

I am sorry for bringing this trivial issue, but it looks like in the last update the conext menu inside card edit interface was redesigned. Now when I do a long press, I see a button to insert a "{{c1::}}" snippet. Why so? I use copy&paste functionality in Anki every day, and now it is buried in a separate burger menu, while this snippet is always under our fingertips...
And it seems there is no way to change it back :(

2.9.x Good First Issue! Help Wanted UI

Most helpful comment

Not just internet points, but fame! I had one or two PRs merged and people
stop me on the street now and ask for photographs! :)

On Wed, Oct 16, 2019 at 11:13 AM Mike Hardy notifications@github.com
wrote:

Nice digging! Any suggestion how to untangle this and #5533
https://github.com/ankidroid/Anki-Android/issues/5533 based on your
findings? Might be an easy PR and - don't tell anyone - but we award
tons of internet points to anyone that gets a PR merged ๐Ÿ˜‰ ๐Ÿ™

โ€”
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/ankidroid/Anki-Android/issues/5532?email_source=notifications&email_token=AAAIWYN2BEK4A6DP46YN7FTQO44TBA5CNFSM4JBNDBTKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBNCH4A#issuecomment-542778352,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAIWYNZYE6W6YENP2PJQZDQO44TBANCNFSM4JBNDBTA
.

All 14 comments

Hi there! This is related to all the work done to make the cloze functionality in AnkiDroid more usable, but it seems like an unintended side effect.

I just tried to reproduce it and can't though. On 2.9.1 I do this:

  1. open note in reviewer
  2. select edit note from reviewer option menu
  3. long press anywhere with nothing selected (I get options 'Paste' then 'Cloze deletion' in that order, then others...)
  4. select a word with long-press (I get 'Cut' 'Copy' 'Paste' 'Cloze deletion' in that order)

So it seems fine on my phone? (Android 9 + AnkiDroid 2.9.1)

Nice digging! Any suggestion how to untangle this and #5533 based on your findings? Might be an easy PR and - don't tell anyone - but we award tons of internet points to anyone that gets a PR merged :wink: :pray:

Not just internet points, but fame! I had one or two PRs merged and people
stop me on the street now and ask for photographs! :)

On Wed, Oct 16, 2019 at 11:13 AM Mike Hardy notifications@github.com
wrote:

Nice digging! Any suggestion how to untangle this and #5533
https://github.com/ankidroid/Anki-Android/issues/5533 based on your
findings? Might be an easy PR and - don't tell anyone - but we award
tons of internet points to anyone that gets a PR merged ๐Ÿ˜‰ ๐Ÿ™

โ€”
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/ankidroid/Anki-Android/issues/5532?email_source=notifications&email_token=AAAIWYN2BEK4A6DP46YN7FTQO44TBA5CNFSM4JBNDBTKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBNCH4A#issuecomment-542778352,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAIWYNZYE6W6YENP2PJQZDQO44TBANCNFSM4JBNDBTA
.

I imagine that setting the third parameter to menu.size() instead of Menu.NONE would fix it.

I've confirmed that changing that line to:
menu.add(Menu.NONE, mMenuId, menu.size(), R.string.multimedia_editor_popup_cloze);
will move the Cloze deletion menu item to the right.

However, it moves it so far to the right that it moves into the overflow menu on my device. I don't like that - if I'm editing a Cloze note, there are good odds that I want the Cloze deletion.

@rg-software - would you be happy leaving the Cloze deletion menu option where it is, but it ONLY appears if the note type being edited is a Cloze type? That way Basic and other non-Cloze types wouldn't show it at all, which makes more sense anyway.

Oh nice idea

@snoyes, yes, I think so. I fact, I just wanted the copy&paste items back :)

And I can confirm that it is actually back after Anki update to 2.9.1 -- it seems I was still using the 2.9 version. Thanks!

That's unexpected about 2.9.1. All that changed was the support library version.

There were other strange things before the update... I'll keep an eye on them. For example, I didn't know the menu item was called "Cloze deletion", because it didn't respect language settings in Anki , and was always displayed in the device's system language! This was true for some other parts of the UI, too, but now everything looks allright to me.

Okay, so the preferred solution appears to be to have cloze deletion first still but only if it's a cloze deletion note type.

Oh, I think I am onto something after all.
When I switch Anki's UI language to English, everything works fine: there is a "Cloze deletion" and "paste" options side by side.
However, if I switch it to "system default" (Russian in my case), "paste" disappears!

Released in 2.9.2beta2, please test

Released in 2.9.2beta2, please test

I tested and CLOZE DELETION is not more a problem!
Thanks! Thanks! Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

OoDeLally picture OoDeLally  ยท  4Comments

homocomputeris picture homocomputeris  ยท  5Comments

mashinbaz1 picture mashinbaz1  ยท  6Comments

littlefoodt picture littlefoodt  ยท  4Comments

kanjieater picture kanjieater  ยท  4Comments