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

Added Accordion Component #23

Merged
merged 13 commits into from
Oct 1, 2024

Conversation

Ashwathi23
Copy link
Contributor

@Ashwathi23 Ashwathi23 commented Sep 8, 2024

Summary

What is the nature of this pull request?

  • New feature
  • Enhancement to an existing feature
  • Bug fix
  • Configuration update
  • Dependency update

Description of change

Added a new component accordion and updated the files to solve the error during git action.

Planner card link

https://teams.microsoft.com/l/entity/com.microsoft.teamspace.tab.planner/tt.c_19:[email protected]_p_TOGdCftBI0mZ937fEIW0jsgAHPsL_h_1710632381880?tenantId=d02378ec-1688-46d5-8540-1c28b5f470f6&webUrl=https%3A%2F%2Ftasks.teams.microsoft.com%2Fteamsui%2FpersonalApp%2Falltasklists&context=%7B%22subEntityId%22%3A%22%2Fv1%2Fplan%2FTOGdCftBI0mZ937fEIW0jsgAHPsL%2Ftask%2FNoIex0qPVU-TaNCSasyjM8gAKRdm%22%2C%22channelId%22%3A%2219%3Ac1b94839a3db4c6e8bf052aeadb33d9b%40thread.tacv2%22%7D

Readiness

  • The application runs successfully with my change.
  • I have included code comments where appropriate.
  • Where I have copied and pasted code from other sources, I have included a comment with a link to the original source.
  • I have read and followed the principles and guidelines about submitting code.
  • I have added unit tests for new components and/or functionality.
  • All existing and new unit tests pass (including updating tests for any necessary breaking changes).

@Ashwathi23 Ashwathi23 requested review from doubleedesign and a team as code owners September 8, 2024 01:44
@doubleedesign
Copy link
Contributor

Thank you for your PR @Ashwathi23! Please ensure you fill in all fields in the description template above.

@Ashwathi23
Copy link
Contributor Author

Thank you for your PR @Ashwathi23! Please ensure you fill in all fields in the description template above.

Sure,i have updated the template.

@doubleedesign
Copy link
Contributor

Thank you @Ashwathi23! I don't agree that unit tests are N/A here - all new components should have unit tests - but I am happy for that to be addressed in a separate PR.

} from './Accordion.style';

type AccordionProps = {
items: { title: string; content: string }[];
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion: Content could be a ReactNode rather than a string, to allow for more complex content to be displayed in an accordion (such as tables, images, text with headings and lists).

@@ -0,0 +1,25 @@
import styled from 'styled-components';
Copy link
Contributor

Choose a reason for hiding this comment

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

Really nice work on the styled components structure here!

import { renderWithDeps } from '../../../jest.utils';
import { Accordion } from './Accordion';

describe('<Accordion />', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add an accessibility test here. You can find an example of how to do this in the updated testing template.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added the accessibility test in Accordion.test.tsx

@doubleedesign doubleedesign merged commit d9b5aee into Redback-Operations:main Oct 1, 2024
1 check passed
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