Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Being able to copy the barcode from the edit mode #2705

Closed
teolemon opened this issue Aug 1, 2022 · 5 comments · Fixed by #2709
Closed

Being able to copy the barcode from the edit mode #2705

teolemon opened this issue Aug 1, 2022 · 5 comments · Fixed by #2709
Assignees

Comments

@teolemon
Copy link
Member

teolemon commented Aug 1, 2022

Problem

  • Before the barcode was turned into a visual barcode, it used to be possible to press to select (and thus get the menu to copy it)
  • Can we bring that back ? It does not have to be a fancy auto-copy to clipboard, just selectability is enough (the OS then takes the relay)
@monsieurtanuki
Copy link
Contributor

You mean like a selectable text?

Actually the BarcodeWidget includes the text:
Capture d’écran 2022-08-01 à 12 48 44

We can tell it not to display the text and add it ourselves, but that doesn't look as good:
Capture d’écran 2022-08-01 à 12 52 56

@teolemon Please confirm if we should add that "select text" feature at the detriment of the visual aspect, and I'll be able to PR today.

@teolemon
Copy link
Member Author

teolemon commented Aug 1, 2022

What about long press to copy to clipboard then ? We can keep the visual aspect, and get the feature.

@monsieurtanuki
Copy link
Contributor

Or something more explicit:
Capture d’écran 2022-08-01 à 13 06 44

@AshAman999
Copy link
Member

You mean like a selectable text?

Actually the BarcodeWidget includes the text: Capture d’écran 2022-08-01 à 12 48 44

We can tell it not to display the text and add it ourselves, but that doesn't look as good: Capture d’écran 2022-08-01 à 12 52 56

@teolemon Please confirm if we should add that "select text" feature at the detriment of the visual aspect, and I'll be able to PR today.

We can hide the default barcode and show our own selectable text with some letter spacing
image

@VaiTon
Copy link
Member

VaiTon commented Aug 1, 2022

Or maybe we could leave the actual barcode with the text under it and then:

  • On a short press we display a toast: "Long press to copy barcode"
  • On a long press we copy the barcode into the clipboard

@monsieurtanuki monsieurtanuki self-assigned this Aug 1, 2022
monsieurtanuki added a commit to monsieurtanuki/smooth-app that referenced this issue Aug 1, 2022
Impacted files:
* `edit_product_page.dart`: added a "Copy" button close to the barcode, and a `Snackbar` after the copy to clipboard
* `app_en.arb`: added 1 snackbar label to acknowlegde the barcode copy
monsieurtanuki added a commit to monsieurtanuki/smooth-app that referenced this issue Aug 1, 2022
monsieurtanuki added a commit to monsieurtanuki/smooth-app that referenced this issue Aug 1, 2022
monsieurtanuki added a commit that referenced this issue Aug 1, 2022
Impacted files:
* `edit_product_page.dart`: added a "Copy" button close to the barcode, and a `Snackbar` after the copy to clipboard
* `app_en.arb`: added 1 snackbar label to acknowlegde the barcode copy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

4 participants