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 default rule for segments #4095

Merged
merged 4 commits into from
Jun 11, 2024
Merged

Conversation

kyle-ssg
Copy link
Member

@kyle-ssg kyle-ssg commented Jun 4, 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

Adds placeholder rule for segments

How did you test this code?

Click create segment

Copy link

vercel bot commented Jun 4, 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 Jun 5, 2024 8:38am
flagsmith-frontend-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 5, 2024 8:38am
flagsmith-frontend-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 5, 2024 8:38am

Copy link
Contributor

github-actions bot commented Jun 4, 2024

Uffizzi Preview deployment-52600 was deleted.

@matthewelwell
Copy link
Contributor

@kyle-ssg I think E2E is legitimately broken here.

@kyle-ssg
Copy link
Member Author

kyle-ssg commented Jun 4, 2024

Ah, yep I bet I adjusted tests when I originally removed this

@kyle-ssg kyle-ssg linked an issue Jun 5, 2024 that may be closed by this pull request
4 tasks
@github-actions github-actions bot added the feature New feature or request label Jun 5, 2024
@kyle-ssg
Copy link
Member Author

kyle-ssg commented Jun 5, 2024

@rolodato could you re-test this since it now also fixes the linked buggy segment rules

Copy link
Member

@rolodato rolodato left a comment

Choose a reason for hiding this comment

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

Works great thanks! Left a minor comment, don't even take the time to reply if it doesn't apply :D

@@ -319,49 +319,51 @@ const CreateSegment: FC<CreateSegmentType> = ({
}, [operators, rules])
//Find any non-deleted rules
const hasNoRules = !rules[0]?.rules?.find((v) => !v.delete)

const rulesToShow = rules[0].rules.filter((v) => !v.delete)
Copy link
Member

Choose a reason for hiding this comment

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

Feel free to ignore this if I'm wrong - it just caught my attention that we're guarding against rules[0] being undefined or null on the line above, but not this one.

@kyle-ssg kyle-ssg added this pull request to the merge queue Jun 11, 2024
Merged via the queue into main with commit c3bf3bf Jun 11, 2024
21 checks passed
@kyle-ssg kyle-ssg deleted the feat/add-default-rule-for-segments branch June 11, 2024 07:39
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
3 participants