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

feat(protocol-designer): make timeline responsive #17109

Open
wants to merge 22 commits into
base: edge
Choose a base branch
from

Conversation

koji
Copy link
Contributor

@koji koji commented Dec 13, 2024

Overview

make timeline responsive

close AUTH-877

Test Plan and Hands on Testing

Changelog

  • add DraggableSidebar component to make the sidebar draggable/resizable
  • update AddStepButton to align with the design (remove + text and add + icon)

Review requests

Risk assessment

low

} from '@opentrons/components'
import { TimelineToolbox } from './Timeline/TimelineToolbox'

const INITIAL_SIDEBAR_WIDTH = 350
Copy link
Contributor Author

Choose a reason for hiding this comment

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

i'll get the right value from Mel next week

@@ -56,6 +59,7 @@ export function ProtocolSteps(): JSX.Element {
const [deckView, setDeckView] = useState<
typeof leftString | typeof rightString
>(leftString)
const [targetWidth, setTargetWidth] = useState<number>(350)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

the initial value will be updated.

@koji
Copy link
Contributor Author

koji commented Dec 13, 2024

  • fix check-js and lint-js errors
  • fix test errors
  • add test for DraggableSidebar

@koji koji requested review from ncdiehl11 and jerader December 13, 2024 22:44
@koji koji marked this pull request as ready for review December 14, 2024 04:56
@koji koji requested a review from a team as a code owner December 14, 2024 04:56
@koji koji removed the request for review from a team December 14, 2024 04:56
@ncdiehl11
Copy link
Collaborator

Whoa, looks really slick. I do see some highlighting when dragging the timeline toolbox (see "Ending deck"). Not sure if this is blocking, though.

Screen.Recording.2024-12-17.at.10.18.12.AM.mov

@ncdiehl11
Copy link
Collaborator

I think the add step menu is being contained by the timeline toolbox container
Screenshot 2024-12-17 at 10 21 02 AM

Copy link
Collaborator

@ncdiehl11 ncdiehl11 left a comment

Choose a reason for hiding this comment

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

Left some comments but generally looking good

const addStep = (stepType: StepType): ReturnType<any> =>
dispatch(stepsActions.addAndSelectStep({ stepType }))

const items = getSupportedSteps()
.filter(stepType => isStepTypeEnabled[stepType])
const items = getSupportedSteps(enableComment)
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe

Suggested change
const items = getSupportedSteps(enableComment)
getSupportedSteps(enableComment).
reduce<JSX.Element[]>((acc, stepType) => {
return getIsStepTypeEnabled(enableComment, modules)[stepType]
? [...acc, <AddOverflowButton ... />]
: acc
}, [])

white-space: ${NO_WRAP};
bottom: 4.2rem;
border-radius: ${BORDERS.borderRadius8};
box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.2);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we have a constant for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

you mean box-shadow or the entire style?
i think we don't have the constant for this part.

@koji
Copy link
Contributor Author

koji commented Dec 18, 2024

I think the add step menu is being contained by the timeline toolbox container Screenshot 2024-12-17 at 10 21 02 AM

@ncdiehl11 thank you for catching this.
finally, I could figure out what the issue is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants