-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
feat(flags): hide flags from context and add feedback button #77488
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,11 +16,12 @@ import useDrawer from 'sentry/components/globalDrawer'; | |
import KeyValueData, { | ||
type KeyValueDataContentProps, | ||
} from 'sentry/components/keyValueData'; | ||
import {IconSort} from 'sentry/icons'; | ||
import {IconMegaphone, IconSort} from 'sentry/icons'; | ||
import {t} from 'sentry/locale'; | ||
import type {Event, FeatureFlag} from 'sentry/types/event'; | ||
import type {Group} from 'sentry/types/group'; | ||
import type {Project} from 'sentry/types/project'; | ||
import {useFeedbackForm} from 'sentry/utils/useFeedbackForm'; | ||
import {InterimSection} from 'sentry/views/issueDetails/streamline/interimSection'; | ||
|
||
export function EventFeatureFlagList({ | ||
|
@@ -32,6 +33,26 @@ export function EventFeatureFlagList({ | |
group: Group; | ||
project: Project; | ||
}) { | ||
const openForm = useFeedbackForm(); | ||
const feedbackButton = openForm ? ( | ||
<Button | ||
aria-label={t('Give feedback on this component')} | ||
michellewzhang marked this conversation as resolved.
Show resolved
Hide resolved
|
||
icon={<IconMegaphone />} | ||
size={'xs'} | ||
onClick={() => | ||
openForm({ | ||
messagePlaceholder: t('How can we make feature flags work better for you?'), | ||
tags: { | ||
['feedback.source']: 'issue_details_feature_flags', | ||
['feedback.owner']: 'replay', | ||
}, | ||
}) | ||
} | ||
> | ||
{t('Give Feedback')} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm I find all this text clutters and takes away focus from the other buttons, but this is what we do for breadcrumbs so ¯_(ツ)_/¯ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm I think on left is better and aligns with what we have for breadcrumb There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. cool, i kept it that way! |
||
</Button> | ||
) : null; | ||
|
||
const [sortMethod, setSortMethod] = useState<FlagSort>(FlagSort.EVAL); | ||
const {closeDrawer, isDrawerOpen, openDrawer} = useDrawer(); | ||
const viewAllButtonRef = useRef<HTMLButtonElement>(null); | ||
|
@@ -96,6 +117,7 @@ export function EventFeatureFlagList({ | |
|
||
const actions = ( | ||
<ButtonBar gap={1}> | ||
{feedbackButton} | ||
<Button | ||
size="xs" | ||
aria-label={t('View All')} | ||
|
Uh oh!
There was an error while loading. Please reload this page.