Skip to content

fix(variables): improve empty state#2740

Open
rmnbrd wants to merge 1 commit into
stagingfrom
impr/secret-manager/variables-empty-state-improvements
Open

fix(variables): improve empty state#2740
rmnbrd wants to merge 1 commit into
stagingfrom
impr/secret-manager/variables-empty-state-improvements

Conversation

@rmnbrd

@rmnbrd rmnbrd commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

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

image

Testing

  • Changes tested locally in the relevant Console's pages and Storybooks
  • yarn test or yarn test -u (if you need to regenerate snapshots)
  • yarn format
  • yarn lint

PR Checklist

  • I followed naming, styling, and TypeScript rules (see .cursor/rules)
  • I performed a self-review (diff inspected, dead code removed)
  • I titled the PR using Conventional Commits with a scope when possible (e.g. feat(service): add new Terraform service) - required for semantic-release
  • I only kept necessary comments, written in English (watch for useless AI comments)
  • I involved a designer to validate UI changes if I am not a designer
  • I covered new business logic with tests (unit)
  • I confirmed CI is green (Codecov red can be accepted)
  • I reviewed and executed locally any AI-assisted code

@rmnbrd rmnbrd self-assigned this Jun 5, 2026
@rmnbrd rmnbrd marked this pull request as ready for review June 5, 2026 14:12
Copilot AI review requested due to automatic review settings June 5, 2026 14:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 AddSecretDropdown component 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 isFile modal 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

codecov Bot commented Jun 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 42.08%. Comparing base (fc50120) to head (e900482).

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     
Flag Coverage Δ
unittests 42.08% <100.00%> (-3.67%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@rmnbrd rmnbrd changed the title impr(variables): improve empty state chore(variables): improve empty state Jun 5, 2026
@rmnbrd rmnbrd changed the title chore(variables): improve empty state fix(variables): improve empty state Jun 5, 2026
Add type attribute to Button
@rmnbrd rmnbrd force-pushed the impr/secret-manager/variables-empty-state-improvements branch from bacb127 to e900482 Compare June 5, 2026 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants