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

fix(app): remove copy link from context menu #10328

Merged
merged 4 commits into from May 24, 2022

Conversation

koji
Copy link
Contributor

@koji koji commented May 18, 2022

Overview

This will fix #10054
Removed copy link by using the menu function
https://github.com/sindresorhus/electron-context-menu#menu.

There is a kind of issue with electron-context-menu in this project.

The version app-shell uses is 0.15.0 (released in Aug 2019). The current version is 3.1.2.
For safe, I would like to upgrade this package by another PR.

In addition, 0.15.0 has an issue with searchWithGoogle option.

Screen Shot 2022-05-18 at 12 53 29 PM

Screen Shot 2022-05-18 at 12 53 41 PM

Changelog

  • Updated contextMenu option

Review requests

no copy link

Risk assessment

low

@codecov
Copy link

codecov bot commented May 18, 2022

Codecov Report

Merging #10328 (98350d3) into edge (fb4ed1f) will increase coverage by 0.40%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             edge   #10328      +/-   ##
==========================================
+ Coverage   73.97%   74.37%   +0.40%     
==========================================
  Files        2133     2129       -4     
  Lines       56900    56510     -390     
  Branches     5753     5807      +54     
==========================================
- Hits        42090    42031      -59     
+ Misses      13608    13262     -346     
- Partials     1202     1217      +15     
Flag Coverage Δ
app 71.11% <0.00%> (-0.16%) ⬇️
ot3-gravimetric-test ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
app-shell/src/main.ts 0.00% <0.00%> (ø)
app/src/atoms/Slideout/index.tsx 66.66% <0.00%> (-8.34%) ⬇️
...rganisms/ProtocolsLanding/ProtocolOverflowMenu.tsx 81.57% <0.00%> (-8.08%) ⬇️
app/src/organisms/ProtocolDetails/index.tsx 41.02% <0.00%> (-5.65%) ⬇️
...e/hardware_control/motion_planning/move_manager.py 89.36% <0.00%> (-4.26%) ⬇️
...pp/src/organisms/Devices/HistoricalProtocolRun.tsx 45.00% <0.00%> (-2.37%) ⬇️
...are/hardware_control/motion_planning/move_utils.py 89.83% <0.00%> (-1.61%) ⬇️
...ware/opentrons_hardware/hardware_control/motion.py 90.90% <0.00%> (-1.25%) ⬇️
app-shell/src/config/migrate.ts 89.28% <0.00%> (-0.72%) ⬇️
...Devices/RobotSettings/RobotSettingsCalibration.tsx 67.15% <0.00%> (-0.04%) ⬇️
... and 21 more

Comment on lines +70 to +71
actions.copy({}),
actions.lookUpSelection({}),
Copy link
Contributor Author

@koji koji May 18, 2022

Choose a reason for hiding this comment

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

Passing {} because currently, options are not optional.

sindresorhus/electron-context-menu#153

Once fix the above issue, probably we can remove {}

Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps a TODO with that link would be useful for tracking this?

@koji koji marked this pull request as ready for review May 18, 2022 17:05
@koji koji requested a review from a team as a code owner May 18, 2022 17:05
@koji koji requested review from ecormany and removed request for a team May 18, 2022 18:15
@koji koji added the app Affects the `app` project label May 18, 2022
Copy link
Contributor

@ecormany ecormany left a comment

Choose a reason for hiding this comment

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

Looks good in the GUI. I see we decided to keep "Look up…" for compatibility, and it works. No "Copy Link" anywhere.

@koji
Copy link
Contributor Author

koji commented May 18, 2022

Looks good in the GUI. I see we decided to keep "Look up…" for compatibility, and it works. No "Copy Link" anywhere.

@ecormany I keep Look up since the version the app uses is very old (0.1.5 the latest version is 3.1.2 😹) and there is an issue with adding searchWithGoogle as an option. In my opinion, upgrading a package is kind of troublesome. I would like to open another PR for adding searchWithGoogle which is including upgrading the package.

@ecormany
Copy link
Contributor

the version the app uses is very old (0.1.5 the latest version is 3.1.2 😹)

glad we pin our dependencies 🤣

@koji koji requested a review from jerader May 19, 2022 20:28
koji added 2 commits May 20, 2022 18:13
Merge branch 'edge' into app_fix-contextmenu-remove-copyLink
@koji koji merged commit 4237331 into edge May 24, 2022
@koji koji deleted the app_fix-contextmenu-remove-copyLink branch May 29, 2022 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app Affects the `app` project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6.0 Feedback: many UI elements offer "Copy Link" contextual menu item
3 participants