Skip to content

Conversation

@michellewzhang
Copy link
Member

rm the feature flag CTA (was only ever shown to LD users)

@michellewzhang michellewzhang requested review from a team as code owners October 6, 2025 20:19
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Oct 6, 2025
@@ -0,0 +1,118 @@
import {Fragment, useEffect} from 'react';
Copy link
Member Author

@michellewzhang michellewzhang Oct 6, 2025

Choose a reason for hiding this comment

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

this file was just renamed from the inline CTA file, but now it exports the FeatureFlagCTAContent component by default

Comment on lines -223 to -241
it('renders cta if event.contexts.flags is not set and should show cta', async () => {
const org = OrganizationFixture({features: ['feature-flag-cta']});
it('renders empty state if event.contexts.flags is not set - flags already sent', () => {
const org = OrganizationFixture({features: []});

render(<EventFeatureFlagSection {...NO_FLAG_CONTEXT_SECTION_PROPS_CTA} />, {
render(<EventFeatureFlagSection {...NO_FLAG_CONTEXT_WITH_FLAGS_SECTION_PROPS} />, {
organization: org,
});

const control = screen.queryByRole('button', {name: 'Sort Flags'});
expect(control).not.toBeInTheDocument();
const search = screen.queryByRole('button', {name: 'Open Feature Flag Search'});
expect(search).not.toBeInTheDocument();
expect(
screen.queryByRole('button', {name: 'Set Up Integration'})
).not.toBeInTheDocument();

// wait for the CTA to be rendered
expect(await screen.findByText('Set Up Feature Flags')).toBeInTheDocument();
expect(screen.getByText('Feature Flags')).toBeInTheDocument();
});
Copy link
Member Author

Choose a reason for hiding this comment

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

this test is not needed

Comment on lines -287 to -305
it('renders nothing if event.contexts.flags is not set and should not show cta - no feature flag', async () => {
const org = OrganizationFixture({features: ['fake-feature-flag']});
it('renders nothing if event.contexts.flags is not set - wrong platform', () => {
const org = OrganizationFixture({features: []});

render(<EventFeatureFlagSection {...NO_FLAG_CONTEXT_SECTION_PROPS_CTA} />, {
render(<EventFeatureFlagSection {...NO_FLAG_CONTEXT_SECTION_PROPS} />, {
organization: org,
});

const control = screen.queryByRole('button', {name: 'Sort Flags'});
expect(control).not.toBeInTheDocument();
const search = screen.queryByRole('button', {name: 'Open Feature Flag Search'});
expect(search).not.toBeInTheDocument();
expect(
screen.queryByRole('button', {name: 'Set Up Integration'})
).not.toBeInTheDocument();

// CTA should not appear
await waitFor(() => {
expect(screen.queryByText('Set Up Feature Flags')).not.toBeInTheDocument();
});
Copy link
Member Author

Choose a reason for hiding this comment

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

not needed

@michellewzhang michellewzhang merged commit 9a2bfa1 into master Oct 14, 2025
48 checks passed
@michellewzhang michellewzhang deleted the mz/rm-ld-ff-fe branch October 14, 2025 17:04
chromy pushed a commit that referenced this pull request Oct 17, 2025
rm the feature flag CTA (was only ever shown to LD users)
@github-actions github-actions bot locked and limited conversation to collaborators Oct 30, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants