-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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(schedule flag changes): tweak frontend #19488
Conversation
…/schedule-feature-flag
…/schedule-feature-flag
…og/posthog into feat/schedule-feature-flag
…og/posthog into feat/schedule-feature-flag
…/schedule-feature-flag
…/schedule-feature-flag
📸 UI snapshots have been updated1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
Triggered by this commit. |
…og/posthog into feat/schedule-feature-flag
…/schedule-feature-flag
📸 UI snapshots have been updated2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
Triggered by this commit. |
I think this is all a side effect of the way we're dealing with the flaglogic keyed schedule, which I mentioned in a previous PR. Resolving that somehow should resolve these too, but also ok to just fix it here, I will look into a broader refactor of that thing next week 😅 |
📸 UI snapshots have been updated3 snapshot changes in total. 0 added, 3 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated5 snapshot changes in total. 0 added, 5 modified, 0 deleted:
Triggered by this commit. |
oh wait, this problem has nothing to do with that refactor, it's this line, it's overriding everything in filters 😰 |
This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the |
Changes:
Follow-up:
|
} = useActions(featureFlagScheduleLogic) | ||
const { aggregationLabel } = useValues(groupsModel) | ||
|
||
const featureFlagId = useValues(featureFlagLogic).featureFlag.id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keeping consistent, easier to read 😅
const { featureFlag } = useValues(featureFlagLogic)
const featureFlagId = featureFlagId
const aggregationGroupTypeIndex = ....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is featureFlag
is already destructured from featureFlagScheduleLogic
, hence accessing the id here directly with the dot notation 😬
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahh, I see, minor nit, you can rename it when destructuring to prevent conflicts
const { featureFlag: originalFlag } = useValues(...)
const id = originalFlag.id
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh I didn't know this was possible, thanks!
@@ -873,6 +878,11 @@ export const featureFlagLogic = kea<featureFlagLogicType>([ | |||
if (scheduledChange && scheduledChange) { | |||
lemonToast.success('Change scheduled successfully') | |||
actions.loadScheduledChanges() | |||
actions.setFeatureFlag({ | |||
...values.featureFlag, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this happens only on the keyed logic with id 'schedule' right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
correct!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's get this in and test in prod :D
Changes
UI follow-ups
How did you test this code?
👀