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

#4455 - 'Update sequence' modal window: display the number of nucleotides to be changed #4457

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ describe('UpdateSequenceInRNABuilder modal component', () => {
<UpdateSequenceInRNABuilder {...mockProps} />,
{
rnaBuilder: {
sequenceSelection: [labeledNucleotide],
sequenceSelection: [labeledNucleotide, labeledNucleotide],
},
},
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ const UpdateSequenceInRNABuilder = ({ isModalOpen, onClose }: Props) => {
const dispatch = useAppDispatch();
const sequenceSelection = useAppSelector(selectSequenceSelection);
const editor = useAppSelector(selectEditor);
const countOfSequenceSelection = sequenceSelection.length;
const onCloseCallback = useCallback(() => {
onClose();
}, [onClose]);
Expand Down Expand Up @@ -69,7 +70,8 @@ const UpdateSequenceInRNABuilder = ({ isModalOpen, onClose }: Props) => {
>
<Modal.Content>
<TextWrapper>
You are going to make multiple changes in your sequence. Are you sure?
You are going to modify {countOfSequenceSelection} nucleotides. Are
you sure?
</TextWrapper>
</Modal.Content>
<Modal.Footer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ Object {
<div
class="css-pp7hf1"
>
You are going to make multiple changes in your sequence. Are you sure?
You are going to modify
2
nucleotides. Are you sure?
</div>
</div>
<div
Expand Down
Loading