Component list for UI Library should return auto-saved code components if any

Created on 13 May 2025, 2 months ago

Overview

๐Ÿ› JS component slots don't appear in the preview canvas until published Active could be solved by having the route that componentAndLayout.ts calls to get the components factor in auto-saved Javascript code components if there any. That way add back the client side changes from ๐Ÿ“Œ Add a route for PATCHing both a config entity and its auto-saved version together Active that we reverted in ๐Ÿ› Hovered preview for JS components in library not working Active
The component entities themselves are auto-saved but if they have a JSComponent source then the JavascriptComponent might be auto-saved

Proposed resolution

Create a new route that uses will use the auto-saved version of JavascriptComponent entities

User interface changes

๐Ÿ› Bug report
Status

Active

Version

0.0

Component

Auto-save

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States tedbow Ithaca, NY, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @tedbow
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States tedbow Ithaca, NY, USA
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States tedbow Ithaca, NY, USA

    This is rough POC but I think it solves the problem in ๐Ÿ› JS component slots don't appear in the preview canvas until published Active while allowing the client to only send status: true when adding the code component to the library.

    the other thing this would allow is adding new props and slots after a component has been added to the library. there are probably other hurdles to overcome for this but this does allow the component list use the auto-save version of code components which would not affect currently published pages with published code components in them

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States hooroomoo

    Adding related issue. Added todos in there to point to this one.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States hooroomoo

    Marking as stable blocker to remove the band-aid that currently covers up a bug.

  • ๐Ÿ‡ง๐Ÿ‡ชBelgium wim leers Ghent ๐Ÿ‡ง๐Ÿ‡ช๐Ÿ‡ช๐Ÿ‡บ

    ๐Ÿค” Iโ€™m not sure I follow whatโ€™s going on here, what exactly is proposed, and why the draft MRโ€™s direction is the right one.

    AFAICT the draft MR is making the API returning the list of config entities of some type to no longer return whatโ€™s actually stored, but instead making it return the auto-saved (not really saved/live) config entity.

    That means it becomes impossible to retrieve the non-auto-saved-but-actual config entity.

    If I ignore that and try to follow this MRโ€™s rationale then it seems like this argues ๐Ÿ“Œ Add a route for PATCHing both a config entity and its auto-saved version together Active was wrong, because when sending

    PATCH 
    status: true

    , youโ€™d want to use the auto-save entry, not the live data?

    But if so, why is this MR only modifying ::list(), not ::get() and ::patch()?

  • ๐Ÿ‡ง๐Ÿ‡ชBelgium wim leers Ghent ๐Ÿ‡ง๐Ÿ‡ช๐Ÿ‡ช๐Ÿ‡บ

    Given the above, I donโ€™t understand how this can be a bug report. The โ€œlist config entities of typeโ€ internal HTTP API works as intended? ๐Ÿซฃ

    Perhaps an issue update will illuminate me ๐Ÿ˜‡

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States tedbow Ithaca, NY, USA

    I will update the summary.

Production build 0.71.5 2024