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

ctrl+click opens new tab when using Clickable #150

Merged
merged 1 commit into from
Oct 6, 2023
Merged

Conversation

wllgrnt
Copy link
Contributor

@wllgrnt wllgrnt commented Sep 22, 2023

Motivation and Context

Elsewhere on the web ctrl+click will open whatever you click in a new tab, and for some usecases (e.g. testlooper) this would be useful to have in Cells - this PR adds that functionality. With thanks to @bokyoungkim-ap for pointers.

Approach

The changes on line 69 of Clickable.js are sufficient when the onClick function is standard and returning a string. When onClick is more complicated (e.g. check the object, make it if required, then link to it) you need the ctrlClick message.

How Has This Been Tested?

Ran on testlooper and clicked around + standard unit test battery.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@wllgrnt
Copy link
Contributor Author

wllgrnt commented Sep 22, 2023

NB: tests are failing for curl reasons, addressed in #149

@atzannes
Copy link
Contributor

That's great!
Is it possible to get some unit-testing of this?
Are test failing because of the chrome driver stuff (fixed by PR #149 )?

@wllgrnt
Copy link
Contributor Author

wllgrnt commented Oct 4, 2023

That's great! Is it possible to get some unit-testing of this? Are test failing because of the chrome driver stuff (fixed by PR #149 )?

Done - added two unit tests and an object_database_webtest entry

@wllgrnt
Copy link
Contributor Author

wllgrnt commented Oct 4, 2023

(also version pinned werkzeug as the build was failing due to a deprecation)

@atzannes atzannes merged commit 6f7a374 into dev Oct 6, 2023
9 checks passed
@atzannes atzannes deleted the will-add-ctrl-click branch October 6, 2023 17:44
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