fix(accordion): expand/collapse through isOpen prop
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
It fixes #735
Fixes # (735)
Type of change
Please delete options that are not relevant.
- [x] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [x] This change contains documentation update
Breaking changes
Please document the breaking changes if suitable.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
- [ ] Test A
- [ ] Test B
Test Configuration:
- Firmware version:
- Hardware:
- Toolchain:
- SDK:
Checklist:
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my feature works
- [x] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules
- [x] I have checked my code and corrected any misspellings
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| flowbite-react | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jun 16, 2023 8:56am |
@rluders , I worked on this one but now I'm thinking: seems that Flowbite-React never wanted to expose isOpen and setOpen properties directly, based on what I saw in the code. Maybe this one can be treated as a feature instead of a bug? Up to discussion.
Marked as bug and feature. @tulup-conner , what you think about this one?
Thank you @tulup-conner and sorry for replying after so long. Was kinda busy during last weeks. I checked and you were right. I had some custom configs on my VSCode. I have also analysed every point you've mentioned.
Codecov Report
Patch coverage: 100.00% and project coverage change: -0.01 :warning:
Comparison is base (
470c359) 99.54% compared to head (35990cd) 99.54%.
:exclamation: Current head 35990cd differs from pull request most recent head eae1d7c. Consider uploading reports for the commit eae1d7c to get more accurate results
Additional details and impacted files
@@ Coverage Diff @@
## main #775 +/- ##
==========================================
- Coverage 99.54% 99.54% -0.01%
==========================================
Files 129 129
Lines 6539 6538 -1
Branches 391 392 +1
==========================================
- Hits 6509 6508 -1
Misses 30 30
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/components/Accordion/Accordion.tsx | 100.00% <100.00%> (ø) |
|
| src/components/Accordion/AccordionPanel.tsx | 100.00% <100.00%> (ø) |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
@tulup-conner also sorry for bad commiting type. I will be more precise and I'll re-read again the contribution guide to give the best following the contribuition rules.
@IuriPires could you please, instead merge the main use rebase instead? It is better for history tracking on git.
@IuriPires could you please, instead merge the
mainuse rebase instead? It is better for history tracking on git.
Done :)
@IuriPires I think that it isn't actually working as expected, or there is something wrong, check it here: https://flowbite-react-3hzdjhhhs-themesberg.vercel.app/docs/components/accordion (ps: also the docs sidebar isn't working after the change)
@IuriPires I think that it isn't actually working as expected, or there is something wrong, check it here: https://flowbite-react-3hzdjhhhs-themesberg.vercel.app/docs/components/accordion (ps: also the docs sidebar isn't working after the change)
Hi there @rluders , could you confirm a thing? Main isn't work on my local env. I'm currently using node v18.15.0 (not building/serving Storybook) could you confirm this please? I've checkout older branches and it worked fine.
This is main:
This is a 3 week old branch
Sorry, @IuriPires just had time to reply to you now. So... Not sure what is happening. I'm using node v19.2.0 and I don't have any issues with the storybook.
@IuriPires I think that this one just needs a rebase, right?
@IuriPires I think that it isn't actually working as expected, or there is something wrong, check it here: https://flowbite-react-3hzdjhhhs-themesberg.vercel.app/docs/components/accordion (ps: also the docs sidebar isn't working after the change)
Or maybe not... 🤔
any progress on this?