Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add UI support for flag metadata #3717

Draft
wants to merge 34 commits into
base: main
Choose a base branch
from

Conversation

devin-ai-integration[bot]
Copy link

@devin-ai-integration devin-ai-integration bot commented Dec 11, 2024

Implements UI components for flag metadata CRUD operations.

Closes #2682

Link to Devin run: https://app.devin.ai/sessions/d62abd8bc3cb467dba175d847f5b8f07

Metadata entries can be of type primitive, array, or object.
If array or object we render the JSONEditor.
If primitive the user selects a subtype of 'string, number, or boolean'

CleanShot 2024-12-14 at 12 35 40@2x
CleanShot 2024-12-14 at 12 36 11@2x

TODO

  • test with more complicated metadata
  • Fix UI ITs

devin-ai-integration bot and others added 12 commits December 11, 2024 17:22
- Add IFlagMetadata interface to Flag.ts
- Create MetadataForm component with CRUD operations
- Add validation using Yup schema
- Use Radix UI components for accessibility
- Style with TailwindCSS
- Install required type declarations

Co-Authored-By: Mark Phelps <mark@flipt.io>
- Add metadata field to flag form
- Update validation schema for metadata
- Follow existing styling patterns
- Add proper TypeScript types

Co-Authored-By: Mark Phelps <mark@flipt.io>
- Ensure metadata is preserved in updateFlag mutation
- Preserve metadata when copying flags
- Add proper TypeScript types for metadata handling

Co-Authored-By: Mark Phelps <mark@flipt.io>
Co-Authored-By: Mark Phelps <mark@flipt.io>
Co-Authored-By: Mark Phelps <mark@flipt.io>
Co-Authored-By: Mark Phelps <mark@flipt.io>
Co-Authored-By: Mark Phelps <mark@flipt.io>
Co-Authored-By: Mark Phelps <mark@flipt.io>
Co-Authored-By: Mark Phelps <mark@flipt.io>
Co-Authored-By: Mark Phelps <mark@flipt.io>
Co-Authored-By: Mark Phelps <mark@flipt.io>
Co-Authored-By: Mark Phelps <mark@flipt.io>
@devin-ai-integration devin-ai-integration bot added ui enhancement Created by Linear-GitHub Sync labels Dec 11, 2024
devin-ai-integration bot and others added 13 commits December 11, 2024 18:02
Co-Authored-By: Mark Phelps <mark@flipt.io>
Co-Authored-By: Mark Phelps <mark@flipt.io>
Co-Authored-By: Mark Phelps <mark@flipt.io>
Co-Authored-By: Mark Phelps <mark@flipt.io>
Signed-off-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Mark Phelps <mark@flipt.io>
Co-Authored-By: Mark Phelps <mark@flipt.io>
Co-Authored-By: Mark Phelps <mark@flipt.io>
Co-Authored-By: Mark Phelps <mark@flipt.io>
Co-Authored-By: Mark Phelps <mark@flipt.io>
Co-Authored-By: Mark Phelps <mark@flipt.io>
Signed-off-by: Mark Phelps <209477+markphelps@users.noreply.github.com>
Signed-off-by: Mark Phelps <209477+markphelps@users.noreply.github.com>
Signed-off-by: Mark Phelps <209477+markphelps@users.noreply.github.com>
@erka
Copy link
Collaborator

erka commented Dec 11, 2024

The object could be included in the metadata. This is an example what people have https://discord.com/channels/960634591000014878/1309109822657921034/1309120286142107668.

Signed-off-by: Mark Phelps <209477+markphelps@users.noreply.github.com>
Copy link

codecov bot commented Dec 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 64.55%. Comparing base (2e3fd06) to head (973c775).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3717   +/-   ##
=======================================
  Coverage   64.55%   64.55%           
=======================================
  Files         170      170           
  Lines       17163    17163           
=======================================
  Hits        11079    11079           
  Misses       5393     5393           
  Partials      691      691           
Flag Coverage Δ
unittests 64.55% <ø> (ø)

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

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

Signed-off-by: Mark Phelps <209477+markphelps@users.noreply.github.com>
Signed-off-by: Mark Phelps <209477+markphelps@users.noreply.github.com>
Signed-off-by: Mark Phelps <209477+markphelps@users.noreply.github.com>
Signed-off-by: Mark Phelps <209477+markphelps@users.noreply.github.com>
Signed-off-by: Mark Phelps <209477+markphelps@users.noreply.github.com>
@markphelps
Copy link
Collaborator

The object could be included in the metadata. This is an example what people have https://discord.com/channels/960634591000014878/1309109822657921034/1309120286142107668.

im updating it to support nested objects and other types such as arrays

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Created by Linear-GitHub Sync ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FLI-786] Flag Metadata
2 participants