Skip to content

Added shift select for amino acids, added copy feature for AA#247

Open
digithed wants to merge 6 commits into
developfrom
bug/amino_acid
Open

Added shift select for amino acids, added copy feature for AA#247
digithed wants to merge 6 commits into
developfrom
bug/amino_acid

Conversation

@digithed

Copy link
Copy Markdown
Collaborator

Addresses part of issue #213 specifically the following quote:

Shift-clicking a second amino acid selects every nucleotide between the current selection point and the end of the second amino acid.

Now when a user holds down shift and selects an amino acid they can keep selecting amino acids and SeqViz will create a selection range for the selected AAs.

Additionally I added support for copying the amino acid selection to the clipboard.

I suppose this is more of a feature add than a bug fix, regardless I figured it would be useful.

@digithed digithed requested a review from jjti November 22, 2023 22:25

@jjti jjti left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I don't think we've addressed the feature request in:

Shift-clicking a second amino acid selects every nucleotide between the current selection point and the end of the second amino acid.

AFAICT we've added: after Shift-clicking the first amino acid, subsequent clicks extend the length and range of selection. But only if already holding shift on the first click. Can we change this so it also works if you just click (no shift) the first AA?

Comment thread src/EventHandler.tsx
const { handleMouseEvent } = this.props;

if (e.shiftKey) {
this.handleCopy();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'm confused by this bit, why does it copy every time the cursor moves when shift selecting? I feel like I'd never expect that + doesn't cmd + c work just as well? I also find it surprising to click a single amino acid but have the entire translation copied

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yea this wasn't the best implementation for copying the highlighted aa sequence. For some reason a normal cmd + c doesn't work with a highlighted aa sequence (selecting using the click + shift method, not drag select). I tried a work around but for now I'm going to remove that

@digithed digithed requested a review from jjti December 1, 2023 23:36
@digithed

digithed commented Dec 1, 2023

Copy link
Copy Markdown
Collaborator Author

@jjti I updated this for click + shift selecting the amino acids

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