Add usage_caps_input slot to project settings page#4729
Open
elias-ba wants to merge 1 commit into
Open
Conversation
Mirrors the existing `concurrency_input` slot pattern: read the
component module from the settings route's metadata, assign it to the
LiveView, render via `<.live_component :if={...}>` when set. Empty by
default in OSS Lightning; downstream apps populate it by attaching
`metadata: %{usage_caps_input: SomeComponent}` to the settings route.
Closes #4725.
|
This PR adds a Security Review ✅
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4729 +/- ##
==========================================
+ Coverage 89.94% 89.95% +0.01%
==========================================
Files 444 444
Lines 21979 21981 +2
==========================================
+ Hits 19768 19772 +4
+ Misses 2211 2209 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a
usage_caps_inputview-extension slot at/projects/:project_id/settings, mirroring the existingconcurrency_inputslot pattern. Downstream apps register a component via route metadata (metadata: %{usage_caps_input: SomeComponent}) and Lightning renders it in the settings view.Closes #4725.
Replaces the now-permanently-closed #4726 (which bundled this slot with the rejected cap-columns-on-Lightning approach from #4724). This PR keeps only the slot wiring; the cap data and cap UI live entirely in Thunderbolt's
thunderbolt.project_capstable per OpenFn/thunderbolt#649.Validation steps
mix test test/lightning_web/live/project_live/settings_test.exs— existing settings tests should pass unchanged.metadata: %{usage_caps_input: SomeStub}and confirm the component renders on the settings page.Additional notes for the reviewer
The diff is three files:
settings.exrefactors the route_metadata read into a single fetch and adds the:usage_caps_inputlookup;settings.html.heexrenders<.live_component :if={...}>when the assign is present;CHANGELOG.mddocuments the slot.AI Usage
Pre-submission checklist
:owner,:admin,:editor,:viewer)