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/accordion components #48

Merged
merged 30 commits into from
Jul 25, 2022
Merged

Feat/accordion components #48

merged 30 commits into from
Jul 25, 2022

Conversation

AlbyIsCoding
Copy link
Contributor

@AlbyIsCoding AlbyIsCoding commented Jun 21, 2022

Description

This is a controlled accordion component with optional actions in header and arrow icon that rotates 90 degrees when accordion is opened when it's clicked by mouse or space/enter.

Related Issue(s)

Verification

  • Your code builds clean without any errors or warnings
  • Manual testing done (required)
  • Relevant automated test added (if you find this hard, leave it and we'll help out)
  • All tests run green

Documentation

  • User documentation is updated with a separate linked PR in altinn-studio-docs. (if applicable)

src/components/Accordion/Accordion.test.tsx Show resolved Hide resolved
src/components/Accordion/Accordion.test.tsx Outdated Show resolved Hide resolved
src/components/Accordion/Accordion.test.tsx Outdated Show resolved Hide resolved
src/components/Accordion/AccordionContent.module.css Outdated Show resolved Hide resolved
src/components/Accordion/AccordionContent.tsx Outdated Show resolved Hide resolved
src/components/Accordion/AccordionHeader.tsx Outdated Show resolved Hide resolved
src/components/Accordion/AccordionHeader.tsx Outdated Show resolved Hide resolved
@AlbyIsCoding
Copy link
Contributor Author

Had to delete a test for key press with enter because of this bug in testing library: testing-library/user-event#554
It works to open the accordion with enter in the actual solution though.

@haakemon
Copy link
Contributor

haakemon commented Jul 25, 2022

Had to delete a test for key press with enter because of this bug in testing library: testing-library/user-event#554 It works to open the accordion with enter in the actual solution though.

The issueyou linked to is closed, with a resolution in the comment testing-library/user-event#554 (comment)

Please add the test back and try this. If we dont have these types of tests, we cannot guarantee the behavior, and refactoring later on may lead to bugs. We shouldnt investigate other options before just removing tests.

@AlbyIsCoding
Copy link
Contributor Author

Had to delete a test for key press with enter because of this bug in testing library: testing-library/user-event#554 It works to open the accordion with enter in the actual solution though.

The issueyou linked to is closed, with a resolution in the comment testing-library/user-event#554 (comment)

Please add the test back and try this. If we dont have these types of tests, we cannot guarantee the behavior, and refactoring later on may lead to bugs. We shouldnt investigate other options before just removing tests.

The test was added back some weeks ago

@haakemon
Copy link
Contributor

Had to delete a test for key press with enter because of this bug in testing library: testing-library/user-event#554 It works to open the accordion with enter in the actual solution though.

The issueyou linked to is closed, with a resolution in the comment testing-library/user-event#554 (comment)
Please add the test back and try this. If we dont have these types of tests, we cannot guarantee the behavior, and refactoring later on may lead to bugs. We shouldnt investigate other options before just removing tests.

The test was added back some weeks ago

Ah, my bad 😅 looking on mobile, and didnt see this was an old comment..

Looks good now, great work 😁

@haakemon haakemon merged commit ccfe411 into main Jul 25, 2022
@haakemon haakemon deleted the feat/accordion-components branch July 25, 2022 15:31
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.

Accordion component | Commodore
2 participants