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

[DDW-501] Hide copy and paste context menu items on some scenarios #2300

Conversation

topseniors
Copy link
Contributor

@topseniors topseniors commented Jan 12, 2021

This PR hided copy and paste context menu items on some scenarios
Jira Ticket

Todos

  • Hide copy context menu item when there is no selected text
  • Hide paste context menu item when the current node is not input field to paste content

Testing Checklist

App

  • Access to Wallet - Transactions/Settings/Send/Summary or Stake Pools - Stake Pool tooltip and make sure copy and paste context menu items are hided on the scenarios mentioned above

Test Cases

Scenario 1:
Given that I have a Shelley wallet fully synced
And the wallet has transactions
And I am on the transactions Tab
And I navigate to a recieved transaction
When I right click on the text "Open this transaction in Cardano Explorer" with no text highlighted
Then the tooltip text should have no copy and paste options present

Scenario 2:
Given that I have a Shelley wallet fully synced
And the wallet has transactions
And I am on the transactions Tab
And I navigate to a received transaction
And I highlight the text "addresses" in the From Address section
When I right click/control click on the text "addresses" with the text highlighted
Then I should see the tooltip display the options "copy" only

Scenario 3:
Given that I have a Shelley wallet fully synced
And I am on the Send Tab
And the wallet has transactions
And I highlight the address in the receiver box
And I have text/numeric input copied to my clipboard
When I right click/control click on the highlighted receiver address text
Then the tooltip should display the options "Copy" and "Paste"

Scenario 4:
Given that I have a Shelley wallet fully synced
And I am on the Send Tab
And the wallet has transactions
And I highlight the address in the receiver box
And my clipboard is empty
When I right click/control click on the highlighted receiver address text
Then the tooltip should display the options "Copy" only

Scenario 5:
Given that I have a Shelley wallet fully synced
And the wallet has transactions
And I am on the Summary Tab
When I right click/control click on the wallet balance with no text highlighted
Then the tooltip text should not have "copy" or "paste" options available

Scenario 6:
Given that I have a Shelley wallet fully synced
And the wallet has transactions
And I am on the Summary Tab
When I right click/control click on the wallet balance with all of the wallet balance text highlighted
Then the tooltip text should read "copy" with no paste option available

Scenario 7:
Given that I have the node fully synced
And I am on the stake pools screen
And I click on a stake pool to open the stake pool information popup
Then if there is no text highlighted
And I right click/control click
Then the "copy" and "paste" option is not visible

Scenario 8:
Given that I have the node fully synced
And I am on the stake pools screen
And I click on a stake pool to open the stake pool information popup
And I highlight some text
And there is no input box present
And I right click/control click
Then the paste option should not be visible
And the "copy" option is visible

Testing Summary

English
image
image
image

Japanese
image
image
image

Review Checklist

Basics

  • PR has been assigned and has appropriate labels (feature/bug/chore, release-x.x.x)
  • PR is updated to the most recent version of the target branch (and there are no conflicts)
  • PR has a good description that summarizes all changes and shows some screenshots or animated GIFs of important UI changes
  • CHANGELOG entry has been added to the top of the appropriate section (Features, Fixes, Chores) and is linked to the correct PR on GitHub
  • Automated tests: All acceptance and unit tests are passing (yarn test)
  • Manual tests (minimum tests should cover newly added feature/fix): App works correctly in development build (yarn dev)
  • Manual tests (minimum tests should cover newly added feature/fix): App works correctly in production build (yarn package / CI builds)
  • There are no flow errors or warnings (yarn flow:test)
  • There are no lint errors or warnings (yarn lint)
  • There are no prettier errors or warnings (yarn prettier:check)
  • There are no missing translations (running yarn manage:translations produces no changes)
  • Text changes are proofread and approved (Jane Wild / Amy Reeve)
  • Japanese text changes are proofread and approved (Junko Oda)
  • UI changes look good in all themes (Alexander Rukin)
  • Storybook works and no stories are broken (yarn storybook)
  • In case of dependency changes yarn.lock file is updated

Code Quality

  • Important parts of the code are properly commented and documented
  • Code is properly typed with flow
  • React components are split-up enough to avoid unnecessary re-renderings
  • Any code that only works in main process is neatly separated from components

Testing

  • New feature/change is covered by acceptance tests
  • New feature/change is manually tested and approved by QA team
  • All existing acceptance tests are still up-to-date
  • New feature/change is covered by Daedalus Testing scenario
  • All existing Daedalus Testing scenarios are still up-to-date

After Review

  • Merge the PR
  • Delete the source branch
  • Move the ticket to done column on the YouTrack board
  • Update Slack QA thread by marking it with a green checkmark

@topseniors topseniors changed the title [DDW-501] Disable and hide copy and paste context menu items on some scenarios [DDW-501] Hide copy and paste context menu items on some scenarios Jan 13, 2021
@topseniors topseniors removed the WIP label Jan 13, 2021
@topseniors
Copy link
Contributor Author

@nikolaglumac @gnpf @mioriohk @ManusMcCole @DeeJayElly This is ready for review/test.
FYI, menu item was hided instead of being disabled when it was not needed - approved by Nikola. ;)

@ManusMcCole
Copy link

ManusMcCole commented Jan 13, 2021

Hi @yakovkaravelov. Tested on build 15864

Test case Status Comments
Scenario 1 Failed On windows inspect element is not visible it reads "Empty".Is inspect element only expected in Daedalus dev mode or what should I be seeing on my end when no options are available ? See screenshot. On Mac it highlights text automatically when control and the text is clicked. See screenshot
Scenario 4 Failed On Mac when no text is highlighted and the user control clicks the text is automatically highlighted. What should I see when both copy and paste elements are correctly not available ? See video . On windows it shows up as empty as in scenario 1. See screenshot

@topseniors
Copy link
Contributor Author

Hi @yakovkaravelov. Tested on build 15864

Test case Status Comments
Scenario 1 Failed On windows inspect element is not visible it reads "Empty".Is inspect element only expected in Daedalus dev mode or what should I be seeing on my end when no options are available ? See screenshot. On Mac it highlights text automatically when control and the text is clicked. See screenshot
Scenario 4 Failed On Mac when no text is highlighted and the user control clicks the text is automatically highlighted. What should I see when both copy and paste elements are correctly not available ? See video . On windows it shows up as empty as in scenario 1. See screenshot

@ManusMcCole Automatic selection of text is not a bug.
Also, just fixed Empty menu issue.

@miorsufianiohk
Copy link

@yakovkaravelov All scenarios passed on build 15867 when tested on Linux. Will continue on Windows/Mac tomorrow.

@nikolaglumac
Copy link
Contributor

@yakovkaravelov please post screenshots from the installer as there we do not show the "inspect" item.

@miorsufianiohk
Copy link

@yakovkaravelov All scenarios passed on build 15867 when tested on Windows/Mac

Copy link

@miorsufianiohk miorsufianiohk left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Copy link
Contributor

@nikolaglumac nikolaglumac left a comment

Choose a reason for hiding this comment

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

Great fix @yakovkaravelov 💯

@nikolaglumac nikolaglumac merged commit fe2321b into develop Jan 14, 2021
@iohk-bors iohk-bors bot deleted the chore/ddw-501-disable-copy-paste-options-on-some-scenarios branch January 14, 2021 10:27
@nikolaglumac nikolaglumac added the release-3.2.0-FC1 Daedalus Flight label Jan 21, 2021
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.

None yet

4 participants