Skip to content

Re-add Storybook entries for ProjectsList - #49129

Merged
bencodeorg merged 5 commits into
stagingfrom
ben/projects-list-story
Nov 15, 2022
Merged

Re-add Storybook entries for ProjectsList#49129
bencodeorg merged 5 commits into
stagingfrom
ben/projects-list-story

Conversation

@bencodeorg

Copy link
Copy Markdown
Contributor

Re-enable a Storybook entry for a component that shows a table of student projects on the teacher dashboard. Remove a entries for a parent component (SectionProjectsList), which a) has unit tests and b) basically just renders the ProjectsList component and a dropdown above it to select a student.

Testing story

New Storybook entries:

image

With Thumbnails

image

Without Thumbnails

image

@bencodeorg
bencodeorg requested review from a team November 14, 2022 23:00

@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.

I agree with your call to remove the story for SectionProjectsList. I left a feed comments on the ProjectsList translation. Let me know if you have any questions!

)
}
]);
const DEFAULT_ARGS = {

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'm curious if there is a benefit to having these DEFAULT_ARGS or if we can just put them in the template itself, like

<ProjectsList
  projectsData: STUB_PROJECTS_DATA,
  studioUrlPrefix: 'https://studio.code.org',
  showProjectThumbnails: true
  {...args}
/>

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.

What I had was closer to the Storybook docs, but I like yours better. Updated!


const Template = args => <ProjectsList {...args} />;

// Name of export determines what is shown in storybook entry

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Intentionally left in?

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.

Nope, but with the refactor I now need it. So, now, yes!

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 nvm, just saw in this PR a similar thing without the linting exception. Turns out my editor was complaining but it committed without issue. Removed!

@bencodeorg bencodeorg mentioned this pull request Nov 15, 2022
8 tasks

@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.

LGTM!

@bencodeorg
bencodeorg merged commit 78275fd into staging Nov 15, 2022
@bencodeorg
bencodeorg deleted the ben/projects-list-story branch November 15, 2022 18:58
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