fix(variables): improve empty state#2740
Open
rmnbrd wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves the “External secrets” tab UX by ensuring the empty state offers both creation paths (“Add secret as variable” and “Add secret as file”), aligning it with the non-empty state behavior.
Changes:
- Extracted an
AddSecretDropdowncomponent to reuse the “Add secret” dropdown UI. - Updated the empty state to use the dropdown instead of a single “Add secret” button.
- Updated/added unit tests to select specific dropdown actions and assert the
isFilemodal prop.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| libs/domains/variables/feature/src/lib/external-secrets/external-secrets-tab.tsx | Replaces empty state action button with a reusable “Add secret” dropdown component. |
| libs/domains/variables/feature/src/lib/external-secrets/external-secrets-tab.spec.tsx | Updates tests to interact with dropdown menu items and adds coverage for “Add secret as file” from empty state. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## staging #2740 +/- ##
===========================================
- Coverage 45.74% 42.08% -3.67%
===========================================
Files 1129 468 -661
Lines 24383 12566 -11817
Branches 7251 3913 -3338
===========================================
- Hits 11154 5288 -5866
+ Misses 11281 6264 -5017
+ Partials 1948 1014 -934
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Add type attribute to Button
bacb127 to
e900482
Compare
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.
Summary
Issue:
This PR improves the empty state of the "External secrets" tab. We used to have a single "Add secret" button, but we were missing the "Add secret as file" option. This PR adds it.
Screenshots / Recordings
Testing
yarn testoryarn test -u(if you need to regenerate snapshots)yarn formatyarn lintPR Checklist
.cursor/rules)feat(service): add new Terraform service) - required for semantic-release