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: separate PropertyValue component for feature flags #28125

Merged
merged 6 commits into from
Feb 1, 2025

Conversation

lucasheriques
Copy link
Contributor

Problem

Prevents the duplicate is set/is not set from showing up in feature flag conditions

Tagging the feature flags team as well as it affect both surveys and FFs

Changes

Header After
CleanShot 2025-01-30 at 16 30 25@2x CleanShot 2025-01-30 at 16 30 06@2x

Does this work well for both Cloud and self-hosted?

N/A

How did you test this code?

Tested locally if component matches what is expected

@lucasheriques lucasheriques requested review from a team January 31, 2025 00:31
@lucasheriques lucasheriques self-assigned this Jan 31, 2025
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

Extracted property value rendering logic into a dedicated PropertyValueComponent in FeatureFlagReleaseConditions.tsx to improve code organization and fix duplicate operator text display.

  • Created new PropertyValueComponent to handle rendering of cohort links, date filters, and property values
  • Fixed duplicate "is set"/"is not set" operator text by handling these cases explicitly in the component
  • Added proper date formatting for relative date filters with customizable format strings
  • Improved cohort value display by showing cohort name with external link when available

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

Comment on lines +56 to +58
if (property.value === PropertyOperator.IsNotSet || property.value === PropertyOperator.IsSet) {
return <></>
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

only logic changes on the PR, otherwise I just moved the lines into a new function for easier readability

Copy link
Contributor

github-actions bot commented Jan 31, 2025

Size Change: +5 B (0%)

Total Size: 1.16 MB

ℹ️ View Unchanged
Filename Size Change
frontend/dist/toolbar.js 1.16 MB +5 B (0%)

compressed-size-action

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

1 snapshot changes in total. 0 added, 1 modified, 0 deleted:

  • chromium: 0 added, 1 modified, 0 deleted (diff for shard 2)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

2 snapshot changes in total. 0 added, 2 modified, 0 deleted:

  • chromium: 0 added, 2 modified, 0 deleted (diff for shard 2)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@marandaneto
Copy link
Member

@lucasheriques the PR title should be about the bug fix though, its a fix

@lucasheriques lucasheriques changed the title chore: separate PropertyValue component for feature flags fix: separate PropertyValue component for feature flags Jan 31, 2025
@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

2 snapshot changes in total. 0 added, 2 modified, 0 deleted:

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

1 snapshot changes in total. 0 added, 1 modified, 0 deleted:

  • chromium: 0 added, 1 modified, 0 deleted (diff for shard 1)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@lucasheriques lucasheriques merged commit 3969faa into master Feb 1, 2025
99 checks passed
@lucasheriques lucasheriques deleted the chore/separate-propery-value-component branch February 1, 2025 00:15
thmsobrmlr pushed a commit that referenced this pull request Feb 3, 2025
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants