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(flags): add CTA to flag drawer #87354

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open

feat(flags): add CTA to flag drawer #87354

wants to merge 23 commits into from

Conversation

aliu39
Copy link
Member

@aliu39 aliu39 commented Mar 18, 2025

Closes #87149, branched from #87251
Screenshot 2025-03-18 at 4 35 31 PM

Slack screen recording of behavior

Also updates style for inline CTA (issue details "flags" section):
Screenshot 2025-03-19 at 10 46 24 AM

Adds a missing analytics definition, for an event we were emitting from inline CTA 'flags.setup_sidebar_opened'

@aliu39 aliu39 requested review from a team as code owners March 18, 2025 22:26
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Mar 18, 2025
Copy link

codecov bot commented Mar 18, 2025

❌ 2 Tests Failed:

Tests completed Failed Passed Skipped
9969 2 9967 4
View the top 2 failed test(s) by shortest run time
EventFeatureFlagList renders nothing if event.contexts.flags is not set and should not show cta - no feature flag
Stack Traces | 0.036s run time
Error: expect(element).not.toBeInTheDocument()

expected document not to contain element, found <h3>Feature Flags</h3> instead
    at Object.<anonymous> (.../events/featureFlags/eventFeatureFlagList.spec.tsx:339:74)
EventFeatureFlagList renders nothing if event.contexts.flags is not set and should not show cta - wrong platform
Stack Traces | 0.049s run time
Error: expect(element).not.toBeInTheDocument()

expected document not to contain element, found <h3>Feature Flags</h3> instead
    at Object.<anonymous> (.../events/featureFlags/eventFeatureFlagList.spec.tsx:312:74)

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@aliu39
Copy link
Member Author

aliu39 commented Mar 18, 2025

Base automatically changed from mz/add-flags-audit-log-drawer to master March 19, 2025 17:24
@@ -61,6 +65,18 @@ export default function GroupFeatureFlagsDrawerContent({
return searchedTags;
}, [data, search, tagValues]);

const organization = useOrganization();
const project = useProjectFromSlug({organization, projectSlug: group.project?.slug});
Copy link
Member

Choose a reason for hiding this comment

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

does simply group.project not work for project?

Suggested change
const project = useProjectFromSlug({organization, projectSlug: group.project?.slug});
const project = group.project;

@@ -0,0 +1,107 @@
import styled from '@emotion/styled';
Copy link
Member

Choose a reason for hiding this comment

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

can any of this file & featureFlagInlineCTA.tsx be refactored into a reusable component?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flag distributions: Show CTA when project has not setup flags
4 participants