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: Improves segment rule value validation and feedback #4975

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

tiagoapolo
Copy link
Contributor

@tiagoapolo tiagoapolo commented Jan 7, 2025

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

  • 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?
  • I have used a Conventional Commit title for this Pull Request

Changes

Ref: #3920
This pull request includes changes to the Tooltip component and the Rule component in the frontend. The Tooltip component has been enhanced with additional properties, while the Rule component now utilizes a new RuleInputValue component to handle long text editing in a new modal and validates leading and trailing whitespaces

  1. Only whitespaces check
Screenshot 2025-01-09 at 10 36 09
  1. Trailing whitespace check
Screenshot 2025-01-09 at 10 36 02
  1. Leading whitespace check
Screenshot 2025-01-09 at 10 35 48
  1. Trailing and Leading whitespace check
Screenshot 2025-01-09 at 10 35 55
  1. Long text editing
Screenshot 2025-01-09 at 10 35 38 Screenshot 2025-01-09 at 10 35 32

How did you test this code?

Manually tested

  1. Create/Edit Segment
  2. Add rules
  3. change rule value

@tiagoapolo tiagoapolo self-assigned this Jan 7, 2025
@tiagoapolo tiagoapolo requested a review from a team as a code owner January 7, 2025 01:07
@tiagoapolo tiagoapolo requested review from kyle-ssg and removed request for a team January 7, 2025 01:07
Copy link

vercel bot commented Jan 7, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
flagsmith-frontend-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 10, 2025 4:06am
flagsmith-frontend-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 10, 2025 4:06am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
docs ⬜️ Ignored (Inspect) Visit Preview Jan 10, 2025 4:06am

@github-actions github-actions bot added front-end Issue related to the React Front End Dashboard feature New feature or request labels Jan 7, 2025
Copy link
Contributor

github-actions bot commented Jan 7, 2025

Docker builds report

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

Copy link
Contributor

github-actions bot commented Jan 7, 2025

Uffizzi Ephemeral Environment deployment-59594

☁️ https://app.uffizzi.com/github.com/Flagsmith/flagsmith/pull/4975

📄 View Application Logs etc.

What is Uffizzi? Learn more!

Copy link
Contributor

@matthewelwell matthewelwell left a comment

Choose a reason for hiding this comment

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

This is definitely an improvement, and it works for some use cases. But there are some use cases it doesn't handle very well, e.g. the following:

image

I guess, if we want to continue with this approach, we can try to add an ellipsis after a certain number of characters or lines?

But in general, I think the above use case is one that we really do want to try and solve for (long lists of e.g. uuids). the only way I can really think of doing it, is having some kind of modal overlay for editing the value, but I know that can be tricky with the UI architecture as it is currently. Perhaps let's discuss with @kyle-ssg when he's back tomorrow.

@github-actions github-actions bot removed the feature New feature or request label Jan 10, 2025
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.

3 participants