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

fix: OR button hiding and empty condtions #3269

Conversation

MatheusLasserre
Copy link
Contributor

@MatheusLasserre MatheusLasserre commented Jan 10, 2024

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

  • I have run pre-commit to check linting
  • 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

  • I've changed how the last index of the Condition Row is calculated, so it doesn't count the deleted ones, making the OR button show on the last visible row.
  • I've changed the setRuleProperty function so it sets a default deletion value and property: "deleted", as @kyle-ssg suggested.

How did you test this code?

I've created all conditions types inside the segment overrides, filled it with dummy values, deleted it all and then tried to save the new segment. The API didn't complain about the default deletion values, and the OR button was there all the time.

fixes #3244

Copy link

vercel bot commented Jan 10, 2024

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

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 11, 2024 9:43am
flagsmith-frontend-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 11, 2024 9:43am
flagsmith-frontend-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 11, 2024 9:43am

Copy link

vercel bot commented Jan 10, 2024

@MatheusLasserre is attempting to deploy a commit to the Flagsmith Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions bot added the front-end Issue related to the React Front End Dashboard label Jan 10, 2024
@MatheusLasserre MatheusLasserre changed the title fix:OR button hiding and empty condtions fix: OR button hiding and empty condtions Jan 10, 2024
Copy link
Contributor

github-actions bot commented Jan 10, 2024

Uffizzi Preview deployment-44123 was deleted.

@kyle-ssg
Copy link
Member

Awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
front-end Issue related to the React Front End Dashboard
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't save after deleting condition on "Segment Overrides" screen and OR button disappears
2 participants