Skip to content

feat: allow uppercase characters in trait keys - #8403

Open
Zaimwa9 wants to merge 1 commit into
mainfrom
feat/allow-uppercase-trait-keys
Open

feat: allow uppercase characters in trait keys#8403
Zaimwa9 wants to merge 1 commit into
mainfrom
feat/allow-uppercase-trait-keys

Conversation

@Zaimwa9

@Zaimwa9 Zaimwa9 commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Thanks for submitting a PR! Please check the boxes below:

  • I have read the Contributing Guide.
  • I have added information to docs/ if required so people know about the feature.
  • I have filled in the "Changes" section below.
  • I have filled in the "How did you test this code" section below.

Changes

  • Stop lowercasing the trait key input — the API and SDKs are case-sensitive,
    so appVersion couldn't be created from the dashboard. Spaces still become underscores.

How did you test this code?

  • Manually: the Trait ID field keeps typed casing and saves it; spaces still convert to underscores.

The trait key input rewrote keys to lowercase as you type, while the API,
Edge, the engine and every SDK store and match trait keys case-sensitively.
Keep replacing spaces with underscores but preserve the casing the user
types, so keys like appVersion can be created and corrected from the
dashboard.
@vercel

vercel Bot commented Aug 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
flagsmith-frontend-preview Ready Ready Preview Aug 28, 2026 3:18pm
flagsmith-frontend-staging Ready Ready Preview Aug 28, 2026 3:18pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Ignored Ignored Aug 28, 2026 3:18pm

Request Review

@Zaimwa9
Zaimwa9 requested a review from a team as a code owner August 28, 2026 15:17
@Zaimwa9
Zaimwa9 requested review from kyle-ssg and removed request for a team August 28, 2026 15:17
@github-actions github-actions Bot added the front-end Issue related to the React Front End Dashboard label Aug 28, 2026
@github-actions github-actions Bot added the feature New feature or request label Aug 28, 2026
@github-actions

github-actions Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Docker builds report

Image Build Status Security report
ghcr.io/flagsmith/flagsmith-api-test:pr-8403 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-e2e:pr-8403 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-api:pr-8403 Finished ✅ Results
ghcr.io/flagsmith/flagsmith:pr-8403 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-private-cloud:pr-8403 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-frontend:pr-8403 Finished ✅ Results

@github-actions

github-actions Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor
✅ private-cloud · depot-ubuntu-latest-arm-16 — run #19935 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  1 minute, 3 seconds
commit  ce728b4
info  🔄 Run: #19935 (attempt 1)

🗂️ Previous results
✅ private-cloud · depot-ubuntu-latest-16 — run #19935 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  3 passed

Details

stats  3 tests across 3 suites
duration  32.9 seconds
commit  ce728b4
info  🔄 Run: #19935 (attempt 1)

✅ oss · depot-ubuntu-latest-arm-16 — run #19935 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  39.4 seconds
commit  ce728b4
info  🔄 Run: #19935 (attempt 1)

✅ oss · depot-ubuntu-latest-16 — run #19935 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  34.6 seconds
commit  ce728b4
info  🔄 Run: #19935 (attempt 1)

@github-actions

Copy link
Copy Markdown
Contributor

Visual Regression

19 screenshots compared. See report for details.
View full report

@talissoncosta talissoncosta 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.

LGTM. What about covering this with a test? createTrait already asserts the key renders exactly, so flipping the age pair in segment-test.pw.ts to ageAny would do it.

Happy for it to be a follow-up if you'd rather keep this one to a single line.

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

Labels

feature New feature or request front-end Issue related to the React Front End Dashboard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants