Skip to content

Update storybook entries to new API - #49149

Merged
bethanyaconnor merged 3 commits into
stagingfrom
bethany/storybook-updates
Nov 23, 2022
Merged

Update storybook entries to new API#49149
bethanyaconnor merged 3 commits into
stagingfrom
bethany/storybook-updates

Conversation

@bethanyaconnor

@bethanyaconnor bethanyaconnor commented Nov 15, 2022

Copy link
Copy Markdown
Contributor

Updates for several components:

  • AssignButton.story.jsx is refactored as it is reusable and also doesn't have a test covering the render behavior.
  • SectionAssigner.story.jsx is being removed as it isn't testing different scenarios and we have an almost identical "it renders" test
  • SignInInstruction.story.jsx is being refactored as it tests multiple scenarios and doesn't have a test covering the render behavior
  • TeacherDashboardNavigation.story.jsx is being refactored as it tests a visual scenario and also doesn't have a unit test covering it.
  • TeacherSectionSelector.story.jsx is being refactored as it doesn't have corresponding test coverage (which should change soon!)

@bethanyaconnor
bethanyaconnor marked this pull request as ready for review November 16, 2022 16:34
@bethanyaconnor
bethanyaconnor requested a review from a team November 16, 2022 16:35
}
]);
export default {
title: 'Buttons/AssignButton',

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I preserved the title nesting on a previous refactor and got the following comment: #48043 (comment). I ended up removing the title nesting in my final commit. Something to consider here!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks -- I'll remove!

export const ScrollableNavigation = () => {
const links = [];

for (let i = 0; i < 20; i++) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I can't find a corresponding set of 20 links in the original storybook story. Is this just giving us something to scroll through?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

oh oops, meant to add a comment. the reason I added this is because the old Scrollable navigation test didn't actually have enough tabs to scroll through. So I dynamically added 20 to ensure that we could scroll (like you intuited). I'll add a comment here but also open to suggestions on how to do this better!

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Comment is perfect - I just wanted to make sure I wasn't missing something with this transition!

@epeach epeach left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks great!

@bethanyaconnor
bethanyaconnor merged commit 982bd54 into staging Nov 23, 2022
@bethanyaconnor
bethanyaconnor deleted the bethany/storybook-updates branch November 23, 2022 17:27
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