Skip to content

Commit

Permalink
fix(protocol-designer): add hover state to buttons (#16277)
Browse files Browse the repository at this point in the history
fixes RQA-3190

<!--
Thanks for taking the time to open a Pull Request (PR)! Please make sure
you've read the "Opening Pull Requests" section of our Contributing
Guide:


https://github.com/Opentrons/opentrons/blob/edge/CONTRIBUTING.md#opening-pull-requests

GitHub provides robust markdown to format your PR. Links, diagrams,
pictures, and videos along with text formatting make it possible to
create a rich and informative PR. For more information on GitHub
markdown, see:


https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax

To ensure your code is reviewed quickly and thoroughly, please fill out
the sections below to the best of your ability!
-->

# Overview

<!--
Describe your PR at a high level. State acceptance criteria and how this
PR fits into other work. Link issues, PRs, and other relevant resources.
-->

Adding a hover state to the Swap Pipettes and Remove buttons on the
`EditInstrumentsModal` so that when the mouse hovers over the buttons,
the color changes to light grey.

## Test Plan and Hands on Testing

<!--
Describe your testing of the PR. Emphasize testing not reflected in the
code. Attach protocols, logs, screenshots and any other assets that
support your testing.
-->

![Screenshot 2024-09-17 at 4 18
08 PM](https://github.com/user-attachments/assets/f65af8df-4c48-47e2-8e94-93c95dc1028a)

## Changelog

<!--
List changes introduced by this PR considering future developers and the
end user. Give careful thought and clear documentation to breaking
changes.
-->

- Added the `BUTTON_LINK_STYLE` css const to Swap pipettes and Remove
buttons.

## Review requests

<!--
- What do you need from reviewers to feel confident this PR is ready to
merge?
- Ask questions.
-->

## Risk assessment

<!--
- Indicate the level of attention this PR needs.
- Provide context to guide reviewers.
- Discuss trade-offs, coupling, and side effects.
- Look for the possibility, even if you think it's small, that your
change may affect some other part of the system.
- For instance, changing return tip behavior may also change the
behavior of labware calibration.
- How do your unit tests and on hands on testing mitigate this PR's
risks and the risk of future regressions?
- Especially in high risk PRs, explain how you know your testing is
enough.
-->

---------

Co-authored-by: shiyaochen <[email protected]>
  • Loading branch information
syao1226 and shiyaochen authored Sep 18, 2024
1 parent 3947d4b commit 4427fdd
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions protocol-designer/src/organisms/EditInstrumentsModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ import { setFeatureFlags } from '../../feature-flags/actions'
import { createCustomTiprackDef } from '../../labware-defs/actions'
import { deleteContainer } from '../../labware-ingred/actions'
import { selectors as stepFormSelectors } from '../../step-forms'
import { BUTTON_LINK_STYLE } from '../../atoms'
import { getSectionsFromPipetteName } from './utils'
import { editPipettes } from './editPipettes'
import type { PipetteMount, PipetteName } from '@opentrons/shared-data'
Expand Down Expand Up @@ -209,6 +210,7 @@ export function EditInstrumentsModal(
</StyledText>
{has96Channel ? null : (
<Btn
css={BUTTON_LINK_STYLE}
onClick={() =>
dispatch(
changeSavedStepForm({
Expand All @@ -220,7 +222,7 @@ export function EditInstrumentsModal(
)
}
>
<Flex color={COLORS.grey60} flexDirection={DIRECTION_ROW}>
<Flex flexDirection={DIRECTION_ROW}>
<Icon
name="swap-horizontal"
size="1rem"
Expand Down Expand Up @@ -343,17 +345,17 @@ export function EditInstrumentsModal(
{t('gripper')}
</StyledText>
</Flex>
<Flex textDecoration={TYPOGRAPHY.textDecorationUnderline}>
<Btn
onClick={() => {
dispatch(toggleIsGripperRequired())
}}
>
<StyledText desktopStyle="bodyDefaultRegular">
{t('remove')}
</StyledText>
</Btn>
</Flex>
<Btn
css={BUTTON_LINK_STYLE}
textDecoration={TYPOGRAPHY.textDecorationUnderline}
onClick={() => {
dispatch(toggleIsGripperRequired())
}}
>
<StyledText desktopStyle="bodyDefaultRegular">
{t('remove')}
</StyledText>
</Btn>
</Flex>
</ListItem>
) : (
Expand Down

0 comments on commit 4427fdd

Please sign in to comment.