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

Add accordion element of the design system #79

Merged
merged 6 commits into from
May 3, 2023

Conversation

ekraffmiller
Copy link
Contributor

What this PR does / why we need it:

Adds an Accordion UI element

Which issue(s) this PR closes:

Special notes for your reviewer:

Suggestions on how to test this:

npm run storybook

Does this PR introduce a user interface change? If mockups are available, please link/include them here:

no

Is there a release notes update needed for this change?:

no

Additional documentation:

@ekraffmiller ekraffmiller requested a review from MellyGray April 27, 2023 23:35
@MellyGray MellyGray added the Size: 10 A percentage of a sprint. 7 hours. label Apr 28, 2023
Copy link
Member

@pdurbin pdurbin left a comment

Choose a reason for hiding this comment

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

A little jsdoc, please.

import type { Meta, StoryObj } from '@storybook/react'
import { Accordion } from '../../../sections/ui/accordion/Accordion'

const meta: Meta<typeof Accordion> = {
Copy link
Member

Choose a reason for hiding this comment

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

Please add a little jsdoc like a073464

That way we get the nice docs from Storybook for free. 😄

Copy link
Contributor

Choose a reason for hiding this comment

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

@ekraffmiller can you take a look at this? I think is the only thing left in the review

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, I added that in my latest commit

@MellyGray MellyGray self-assigned this May 1, 2023
Copy link
Contributor

@MellyGray MellyGray left a comment

Choose a reason for hiding this comment

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

Looks good, I just left a few comments about the tests

@ekraffmiller
Copy link
Contributor Author

Hi @MellyGray I added the tests you suggested - I had to add the ThemeProvider to the rendered component, we can remove that when we merge with the code that has cy.customMount(). Also I realized the alwaysOpen behavior wasn't working exactly as expected - in order to fix it, I had to set the defaultActiveKey with an array object, rather than a string. It's a little strange, but that's exactly how the underlying bootstrap component works. Let me know what you think.

@MellyGray
Copy link
Contributor

Hi @MellyGray I added the tests you suggested - I had to add the ThemeProvider to the rendered component, we can remove that when we merge with the code that has cy.customMount(). Also I realized the alwaysOpen behavior wasn't working exactly as expected - in order to fix it, I had to set the defaultActiveKey with an array object, rather than a string. It's a little strange, but that's exactly how the underlying bootstrap component works. Let me know what you think.

Look goods to me. I saw you added the defaultActiveKey array explanation in the jsdoc so it should be easy to use the component as described there.

Copy link
Contributor

@MellyGray MellyGray left a comment

Choose a reason for hiding this comment

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

LGTM

@kcondon kcondon self-assigned this May 3, 2023
@kcondon
Copy link
Contributor

kcondon commented May 3, 2023

@ekraffmiller There merge conflicts, can you please resolve? Thanks!

@ekraffmiller
Copy link
Contributor Author

@kcondon merged with develop

@kcondon kcondon merged commit c78d58e into develop May 3, 2023
@kcondon kcondon deleted the add-accordion-element-of-the-design-system branch May 3, 2023 14:03
jayanthkomarraju pushed a commit to jayanthkomarraju/dataverse-frontend that referenced this pull request May 31, 2024
…ign-system

Add accordion element of the design system
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Size: 10 A percentage of a sprint. 7 hours.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create the accordion of the design system
4 participants