Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Accordion does not re-adjust AccordionContent height on window width change #467

Closed
maiieul opened this issue Oct 26, 2023 · 4 comments
Closed
Assignees
Labels
PKG: headless Related to the headless kit TYPE: bug Something isn't working

Comments

@maiieul
Copy link
Contributor

maiieul commented Oct 26, 2023

Not urgent because it only happens when manually resizing the window. But still good to have imo.

When the width of the window changes, which to my understanding can be done manually on desktop or can happen when changing orientation on mobile, the AccordionContent height does not re-adjust itself for the content inside to fit in.

Potentially useful input from @thejackshelton :

[...] we're currently calculating the children content for the height animation. My understanding is we can't calculate the content component height because it starts at 0px and so the method defaults to null or 0px
seems like some refactoring needs to be done there
but if you're talking about calculating height based on resizing the window, yes we'd want an onresize event.

Radix/ui's Accordion does it automatically. Could be worth looking into their code or their Accordion behavior to see what needs to be done.

@maiieul maiieul added TYPE: bug Something isn't working PKG: headless Related to the headless kit labels Jul 18, 2024
@cwoolum
Copy link
Contributor

cwoolum commented Oct 3, 2024

@maiieul , I believe you fixed this in #605 with useOnWindow('resize', context.getContentDimensions$);. Can you confirm if this is still a problem for you?

@cwoolum cwoolum self-assigned this Oct 3, 2024
@maiieul
Copy link
Contributor Author

maiieul commented Oct 20, 2024

Yup, seems to be working now thanks 👍

@maiieul maiieul closed this as completed Oct 20, 2024
@github-project-automation github-project-automation bot moved this from In Review to Done in Qwik UI Development Oct 20, 2024
@shairez
Copy link
Contributor

shairez commented Nov 27, 2024

@maiieul said to reopen it 😅

@shairez shairez reopened this Nov 27, 2024
@shairez shairez assigned maiieul and unassigned cwoolum Nov 27, 2024
@shairez shairez moved this from Done to In Progress in Qwik UI Development Nov 27, 2024
@maiieul
Copy link
Contributor Author

maiieul commented Nov 27, 2024

Ah no this is fixed i think sorry

@maiieul maiieul closed this as completed Nov 27, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in Qwik UI Development Nov 27, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
PKG: headless Related to the headless kit TYPE: bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

3 participants