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

[BUG] - SfAccordion is not showing active list on SSR #2449

Open
dawid-ziobro opened this issue Jun 15, 2022 · 0 comments
Open

[BUG] - SfAccordion is not showing active list on SSR #2449

dawid-ziobro opened this issue Jun 15, 2022 · 0 comments
Assignees
Labels
bug Something isn't working v1.x.x Issues regarding SFUI 1.x.x

Comments

@dawid-ziobro
Copy link

dawid-ziobro commented Jun 15, 2022

Describe the bug
SfAccordion by default has all children hidden. With a prop open passed, selected child list is opening, but this is done on mounting, which is done on client side.
This leads to increasing CLS due to moving next element down after opening selected child list.
This can also have inpact on SEO, as links for child elements are not present in response from the server.

How to reproduce
Steps to reproduce the behavior:

  1. Go to https://demo-ct.vuestorefront.io/c/men
  2. Refresh page.
  3. Accordion is closed on init.

Expected behavior
On page load, list should be already opened.

Actual behavior
On page load, list list closed and is opening after a while.

Screenshots
On page load:
Zrzut ekranu 2022-06-15 o 13 18 05

After a while list is opening:
Zrzut ekranu 2022-06-15 o 17 09 15

Proposed solution
SfAccordionItem should accept a new prop like openOnInit that works similarly and in pair with open prop. It could indicate the component if it should be opened on closed on init (SSR).

┆Issue is synchronized with this Jira Zadanie by Unito

@dawid-ziobro dawid-ziobro added the bug Something isn't working label Jun 15, 2022
@AdamPawlinski AdamPawlinski self-assigned this Oct 31, 2022
@FRSgit FRSgit added the v1.x.x Issues regarding SFUI 1.x.x label Mar 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v1.x.x Issues regarding SFUI 1.x.x
Projects
None yet
Development

No branches or pull requests

3 participants