Add a usage_caps_input view-extension slot to the project settings page. Same pattern as the existing concurrency_input slot.
What's being added
In LightningWeb.ProjectLive.Settings.apply_action(:edit, ...), read the component from route metadata next to the existing concurrency_input_component lookup:
usage_caps_input_component =
socket.router
|> Phoenix.Router.route_info("GET", ~p"/projects/:project_id/settings", nil)
|> Map.get(:usage_caps_input)
Assign it to usage_caps_input_component and render it from settings.html.heex:
<.live_component
:if={assigns[:usage_caps_input_component]}
module={assigns[:usage_caps_input_component]}
id="usage-caps-input"
project={@project}
current_user={@current_user}
/>
Downstream apps populate the slot by attaching metadata: %{usage_caps_input: SomeComponent} to the settings route. The component receives project and current_user.
Acceptance criteria
/projects/:project_id/settings reads :usage_caps_input from its route metadata and exposes it as @usage_caps_input_component.
- The template renders the component when set, nothing when not.
- The component receives
project and current_user.
- No new UI in OSS Lightning by default.
concurrency_input keeps working unchanged.
Add a
usage_caps_inputview-extension slot to the project settings page. Same pattern as the existingconcurrency_inputslot.What's being added
In
LightningWeb.ProjectLive.Settings.apply_action(:edit, ...), read the component from route metadata next to the existingconcurrency_input_componentlookup:Assign it to
usage_caps_input_componentand render it fromsettings.html.heex:Downstream apps populate the slot by attaching
metadata: %{usage_caps_input: SomeComponent}to the settings route. The component receivesprojectandcurrent_user.Acceptance criteria
/projects/:project_id/settingsreads:usage_caps_inputfrom its route metadata and exposes it as@usage_caps_input_component.projectandcurrent_user.concurrency_inputkeeps working unchanged.