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

Merged
merged 6 commits into from
Jan 15, 2025

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

(DARK MODE)
Screenshot 2025-01-13 at 11 43 29

(LIGHT MODE)
Screenshot 2025-01-13 at 11 43 20

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 15, 2025 5:47pm
flagsmith-frontend-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 15, 2025 5:47pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
docs ⬜️ Ignored (Inspect) Visit Preview Jan 15, 2025 5:47pm

@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:pr-4975 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-private-cloud:pr-4975 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-frontend:pr-4975 Finished ✅ Results

Copy link
Contributor

github-actions bot commented Jan 7, 2025

Uffizzi Preview deployment-59594 was deleted.

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.

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 great! I have a feeling this is going to be super helpful for a lot of our customers. It also allows us to add more validation / code highlighting options in the future.

One minor point, is that I'd prefer the icon to look something slightly more like a traditional expand icon (the one in the current implementation looks more like a scroll icon). Something like this would be better, if we can make it work.

@tiagoapolo tiagoapolo force-pushed the feat/3920--condition-text-input-ui branch from 60187ce to 3a7394c Compare January 13, 2025 14:49
@github-actions github-actions bot added feature New feature or request and removed feature New feature or request labels Jan 13, 2025
@github-actions github-actions bot added feature New feature or request and removed feature New feature or request labels Jan 13, 2025
@github-actions github-actions bot added feature New feature or request and removed feature New feature or request labels Jan 15, 2025
@tiagoapolo tiagoapolo merged commit 8db1a3d into main Jan 15, 2025
31 checks passed
@tiagoapolo tiagoapolo deleted the feat/3920--condition-text-input-ui branch January 15, 2025 18:11
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