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

fix(issues): Remove highlights all tags link #79247

Merged
merged 2 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 13 additions & 28 deletions static/app/components/events/highlights/highlightsDataSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import styled from '@emotion/styled';

import {openModal} from 'sentry/actionCreators/modal';
import {hasEveryAccess} from 'sentry/components/acl/access';
import {Button, LinkButton} from 'sentry/components/button';
import {Button} from 'sentry/components/button';
import ButtonBar from 'sentry/components/buttonBar';
import ErrorBoundary from 'sentry/components/errorBoundary';
import {ContextCardContent} from 'sentry/components/events/contexts/contextCard';
Expand Down Expand Up @@ -37,8 +37,6 @@ import {useLocation} from 'sentry/utils/useLocation';
import useOrganization from 'sentry/utils/useOrganization';
import {SectionKey} from 'sentry/views/issueDetails/streamline/context';
import {InterimSection} from 'sentry/views/issueDetails/streamline/interimSection';
import {Tab, TabPaths} from 'sentry/views/issueDetails/types';
import {useGroupDetailsRoute} from 'sentry/views/issueDetails/useGroupDetailsRoute';
import {useHasStreamlinedUI} from 'sentry/views/issueDetails/utils';

interface HighlightsDataSectionProps {
Expand Down Expand Up @@ -259,32 +257,19 @@ export default function HighlightsDataSection({
}: HighlightsDataSectionProps) {
const organization = useOrganization();
const hasStreamlinedUI = useHasStreamlinedUI();
const location = useLocation();
const {baseUrl} = useGroupDetailsRoute();

const viewAllButton = hasStreamlinedUI ? (
// Streamline details ui has "Jump to" feature, instead we'll show the drawer button
<LinkButton
to={{
pathname: `${baseUrl}${TabPaths[Tab.TAGS]}`,
query: location.query,
replace: true,
}}
size="xs"
>
{t('View All Issue Tags')}
</LinkButton>
) : viewAllRef ? (
<Button
onClick={() => {
trackAnalytics('highlights.issue_details.view_all_clicked', {organization});
viewAllRef?.current?.scrollIntoView({behavior: 'smooth'});
}}
size="xs"
>
{t('View All')}
</Button>
) : null;
const viewAllButton =
!hasStreamlinedUI && viewAllRef ? (
<Button
onClick={() => {
trackAnalytics('highlights.issue_details.view_all_clicked', {organization});
viewAllRef?.current?.scrollIntoView({behavior: 'smooth'});
}}
size="xs"
>
{t('View All')}
</Button>
) : null;

return (
<InterimSection
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const EventNavOrder = [
];

const sectionLabels = {
[SectionKey.HIGHLIGHTS]: t('Event Highlights'),
[SectionKey.HIGHLIGHTS]: t('Highlights'),
[SectionKey.STACKTRACE]: t('Stack Trace'),
[SectionKey.TRACE]: t('Trace'),
[SectionKey.EXCEPTION]: t('Stack Trace'),
Expand Down
Loading