Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

is-loading class is always attached to the filters #7980

Open
kmanijak opened this issue Dec 19, 2022 · 0 comments
Open

is-loading class is always attached to the filters #7980

kmanijak opened this issue Dec 19, 2022 · 0 comments
Labels
block-type: filter blocks Issues related to all of the filter blocks. team: Kirigami & Origami type: bug The issue/PR concerns a confirmed bug. type: cooldown Things that are queued for a cooldown period (assists with planning). type: technical debt This issue/PR represents/solves the technical debt of the project.

Comments

@kmanijak
Copy link
Contributor

kmanijak commented Dec 19, 2022

Steps to reproduce:

  1. Go to Editor
  2. Add "Filters" pattern
  3. Save
  4. Go to the frontend
  5. Check HTML structure

Actual:
There's is-loading class attached to the filters (check the screenshot)

Expected:
There's no is-loading class attached to the filters

Screenshot
Screen Shot 2022-12-19 at 16 55 25 PM

Investigation:
The class is added in the save method in index.tsx files of the filters, e.g:

You can find it in filters patterns as well, so the rendered markup reflects the saved one.

This class is supposed to be removed by renderBlock function, however the container that comes in to this function is a filter wrapper, not the node to which the is-loading class is assigned in the first place, hence it stays in there.

Notes

  • while removing the class, keep in mind it doesn't invalidate the block that were added before the change
  • while moving the is-loading class to the wrapper it influences the editor as well (class is not removed there)
  • after fixing this, these two classes that narrow down showing the Rating placeholder can be removed
@kmanijak kmanijak added type: bug The issue/PR concerns a confirmed bug. type: cooldown Things that are queued for a cooldown period (assists with planning). block-type: filter blocks Issues related to all of the filter blocks. type: technical debt This issue/PR represents/solves the technical debt of the project. labels Dec 19, 2022
@kmanijak kmanijak changed the title is-loading class always attached to the filters is-loading class is always attached to the filters Dec 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
block-type: filter blocks Issues related to all of the filter blocks. team: Kirigami & Origami type: bug The issue/PR concerns a confirmed bug. type: cooldown Things that are queued for a cooldown period (assists with planning). type: technical debt This issue/PR represents/solves the technical debt of the project.
Projects
None yet
Development

No branches or pull requests

2 participants