Skip to content

feat(KeyValueInput): new component - #6639

Open
lisalupi wants to merge 6 commits into
mainfrom
feat/key-value-field
Open

feat(KeyValueInput): new component#6639
lisalupi wants to merge 6 commits into
mainfrom
feat/key-value-field

Conversation

@lisalupi

@lisalupi lisalupi commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

Type

  • Feature
  • Enhancement

Summarize concisely:

The following changes were made:

  1. New component KeyValueInput, inspired by KeyValueField
  2. Use KeyValueInput to define KeyValueField (like other form components) instead of having a custom stand-alone component
  3. Improvements: prop size supported, can have a select variant (instead of always being text)

@lisalupi lisalupi self-assigned this Jul 6, 2026
@lisalupi lisalupi added the enhancement New feature or request label Jul 6, 2026
@changeset-bot

changeset-bot Bot commented Jul 6, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 50bbae7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@ultraviolet/form Patch
@ultraviolet/ui Patch
@ultraviolet/nextjs Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codecov

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.00000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.07%. Comparing base (7a4e1a4) to head (50bbae7).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
packages/ui/src/components/KeyValueInput/index.tsx 94.23% 3 Missing ⚠️
packages/form/src/utils/validateRegex.ts 50.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #6639      +/-   ##
==========================================
+ Coverage   91.06%   91.07%   +0.01%     
==========================================
  Files         560      563       +3     
  Lines       10253    10336      +83     
  Branches     3692     3762      +70     
==========================================
+ Hits         9337     9414      +77     
- Misses        916      922       +6     
Files with missing lines Coverage Δ
...ckages/form/src/components/KeyValueField/index.tsx 100.00% <100.00%> (ø)
...ages/ui/src/components/KeyValueInput/styles.css.ts 100.00% <100.00%> (ø)
packages/form/src/utils/validateRegex.ts 83.33% <50.00%> (-16.67%) ⬇️
packages/ui/src/components/KeyValueInput/index.tsx 94.23% <94.23%> (ø)

... and 2 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0a49bf6...50bbae7. Read the comment docs.

🚀 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.

@lisalupi
lisalupi force-pushed the feat/key-value-field branch from 387c4e6 to a3bd9fe Compare July 7, 2026 14:23
@lisalupi
lisalupi marked this pull request as ready for review July 7, 2026 14:23
@lisalupi
lisalupi requested a review from jsulpis as a code owner July 7, 2026 14:23
@lisalupi
lisalupi requested review from a team, Echo-IV and mhervouet and removed request for a team July 7, 2026 14:23
/**
* KeyValuenput allow user to add key-value pairs
*/
export const KeyValueInput = ({

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should we have a KeyValueInputField also ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

We already have KeyValueField and I updated it in this PR to use KeyValueInput

Comment thread packages/ui/src/components/KeyValueInput/__stories__/index.stories.tsx Outdated
Comment thread packages/ui/src/components/KeyValueInput/index.tsx Outdated
Comment thread packages/ui/src/components/KeyValueInput/index.tsx Outdated
Comment thread packages/ui/src/components/KeyValueInput/index.tsx Outdated
Comment thread packages/ui/src/components/KeyValueInput/index.tsx Outdated
Comment thread packages/ui/src/components/KeyValueInput/index.tsx Outdated
Comment thread packages/ui/src/components/KeyValueInput/__tests__/index.test.tsx Outdated
Comment thread packages/ui/src/components/KeyValueInput/__tests__/index.test.tsx Outdated
Comment thread packages/ui/src/components/KeyValueInput/__tests__/index.test.tsx
Comment thread packages/form/src/components/KeyValueField/__tests__/index.test.tsx Outdated
Comment thread packages/ui/src/components/KeyValueInput/index.tsx Outdated
Comment thread packages/form/src/components/KeyValueField/index.tsx Outdated
Comment thread packages/form/src/components/KeyValueField/index.tsx
Comment thread packages/form/src/components/KeyValueField/index.tsx
Comment thread packages/ui/src/components/KeyValueInput/styles.css.ts Outdated

@jsulpis jsulpis left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

almost there 💪

Comment thread packages/form/src/components/KeyValueField/index.tsx
Comment thread packages/form/src/components/KeyValueField/index.tsx

@jsulpis jsulpis left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

well done 👏 👏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants