Skip to content

Conversation

@B-2U
Copy link

@B-2U B-2U commented Feb 24, 2025

Motivation:

In current interaction with the widget, user has to tap the row first, then tap the tiny copy icon, which is kind of small and hard to reach compare with the first move
also the copy icon would be omitted and unable to be accessed when the widget's width is smaller than 3 columns
image

What changed

I add a new ActionCallback named CopyAndToggleAction, so the callback become,

  • when the code is hidden (aka !revealed) : reveal it, as before
  • when revealed: copy code to clipboard and hide it again

The CopyToClipboardAction.kt and the copy icon when revealed are removed

Tests

I saw the guideline requires tests for the changes and test manually on my Pixel 4a 5G and Pixel 9, please let me know if it has to be tested more thoroughly

Request for Comments

well this might should be a independent bug report, but I want to bring it up since this PR might deal with it at the same time

screen-20250224-172740.4.mp4

Even in the current release version, the widget would redrawn entirely sometime, so the users have to scroll down to the code they again which is a bit annoying.
I'm thinking maybe I can swap the action when tapping on the row, so it will copy on reveal, it makes the steps user require even less, but con is for users who just want to check codes on phone and enter it in his laptop this might be a bit rude.

Please let me know if anything need me to fix, or I missed something in the guideline, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants