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: Display source environment in LaunchDevly UI #418

Conversation

cdelst
Copy link
Contributor

@cdelst cdelst commented Sep 4, 2024

Requirements

image

@cdelst cdelst changed the title Display source environment in LaunchDevly UI [feat] Display source environment in LaunchDevly UI Sep 4, 2024
@cdelst cdelst changed the title [feat] Display source environment in LaunchDevly UI feat: Display source environment in LaunchDevly UI Sep 4, 2024
@@ -23,61 +29,70 @@ function Flags({ selectedProject, flags, setFlags }: FlagProps) {
Record<string, FlagVariation[]>
>({});

const overridesPresent = overrides && Object.keys(overrides).length > 0;
const overridesPresent = useMemo(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

best practice to not recalculate these every time

...{
[flagKey]: {
value: overrideValue,
const updateOverride = useCallback(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

useCallback lets us cache this func definition between renders

Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want that though? We closure in the override state...

Copy link
Contributor

Choose a reason for hiding this comment

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

ohhh, I see you also pass in the deps.

@cdelst cdelst merged commit 1e92281 into mikezorn/sc-254693/validate-overrides-against-what-s-in-the Sep 4, 2024
7 of 8 checks passed
@cdelst cdelst deleted the cdelst/sc-254687/display-source-environment-in-ui branch September 4, 2024 01:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants