flowbite-react icon indicating copy to clipboard operation
flowbite-react copied to clipboard

fix(accordion): expand/collapse through isOpen prop

Open IuriPires opened this issue 2 years ago • 14 comments

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

IuriPires avatar May 27 '23 17:05 IuriPires

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

vercel[bot] avatar May 27 '23 17:05 vercel[bot]

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

IuriPires avatar May 27 '23 17:05 IuriPires

Marked as bug and feature. @tulup-conner , what you think about this one?

IuriPires avatar May 27 '23 17:05 IuriPires

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.

IuriPires avatar Jun 09 '23 10:06 IuriPires

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%> (ø)

... and 1 file with indirect coverage changes

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Jun 09 '23 10:06 codecov[bot]

@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 avatar Jun 09 '23 10:06 IuriPires

@IuriPires could you please, instead merge the main use rebase instead? It is better for history tracking on git.

rluders avatar Jun 11 '23 14:06 rluders

@IuriPires could you please, instead merge the main use rebase instead? It is better for history tracking on git.

Done :)

IuriPires avatar Jun 12 '23 21:06 IuriPires

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

rluders avatar Jun 16 '23 11:06 rluders

@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: Captura de ecrã 2023-06-16, às 12 08 29

This is a 3 week old branch Captura de ecrã 2023-06-16, às 12 16 11

IuriPires avatar Jun 16 '23 11:06 IuriPires

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.

rluders avatar Jun 29 '23 13:06 rluders

@IuriPires I think that this one just needs a rebase, right?

rluders avatar Jul 04 '23 12:07 rluders

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

rluders avatar Jul 04 '23 12:07 rluders

any progress on this?

dima-kov avatar Dec 22 '23 16:12 dima-kov