- Issue created by @lauriii
- First commit to issue fork.
- Merge request !676Issue #3507858: Don't show disabled components/patterns → (Merged) created by larowlan
- 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10
This was introduced by https://git.drupalcode.org/project/experience_builder/-/commit/8c961df3c...
Which added support for the listing showing disabled config entities - needed for code components.
The status entity key has been in components since https://git.drupalcode.org/project/experience_builder/-/commit/5c1c06641...
We had coverage for JS, but not for the converse on components and patterns, so I've added that.
- 🇺🇸United States tedbow Ithaca, NY, USA
Testing I noticed in the MR UI you can only delete components
But in 0.x you can disable or delete.
- 🇫🇮Finland lauriii Finland
Why would we allow deleting these? If you delete the components, they simply come back after clearing caches. It seems only disabling and enabling make sense 🤔
- 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10
Either way we need a custom list builder to support disabling via the UI but preventing from showing up in the UI
- 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10
Made sure we have enable/disable without the status key _and_ removed the delete operation
Added tests for both - First commit to issue fork.
- 🇬🇧United Kingdom longwave UK
Made some minor changes and extended the test, otherwise this looks good to me.
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
@longwave in chat:
i do wonder if
if (!$entity->status() && $xb_config_entity_type->getKey('status') === FALSE) {
is a bit opaque and a specific interface on the config entity type would be clearer
Agreed!
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
- #13: implemented in https://git.drupalcode.org/project/experience_builder/-/merge_requests/6... — with rationale for that choice at https://git.drupalcode.org/project/experience_builder/-/merge_requests/6....
FYI: in that, I also switched to a config query because that seemed clearer and is certainly more performant than ignoring lots of (expensive!) config entity objects.
- Also was able to get rid of all the list builder/operation complexity, by instead fixing it at the root: https://git.drupalcode.org/project/experience_builder/-/merge_requests/6...
- #13: implemented in https://git.drupalcode.org/project/experience_builder/-/merge_requests/6... — with rationale for that choice at https://git.drupalcode.org/project/experience_builder/-/merge_requests/6....
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
@balintbrews also expressed concerns that this change might break the "internal" vs "exposed" breakdown for 🌱 [Meta] Plan for code components Active . I explained in more detail in chat than what is in the current docs. So added that to the docs: https://git.drupalcode.org/project/experience_builder/-/merge_requests/6...
Crediting @balintbrews for the diagram, which he previously posted at #3500386-10: Code Components should render with their auto-saved state (if any) when rendered in the XB UI → , but he provided me with a lossless version :)
- 🇬🇧United Kingdom longwave UK
Simplified the check for visible-when-disabled and fixed a nit in the docs, the rest of this looks ready to me.
-
wim leers →
committed 38124994 on 0.x authored by
larowlan →
Issue #3507858 by longwave, larowlan, wim leers, lauriii, tedbow,...
-
wim leers →
committed 38124994 on 0.x authored by
larowlan →
Automatically closed - issue fixed for 2 weeks with no activity.