Browse Source

chore(discover-transactions-cell-action): Removed go to summary cell … (#49406)

Transaction summary fields are now links, rooting from the feature
request: https://github.com/getsentry/sentry/issues/43311

1. We no longer need the 'Go to summary' cell action for transactions:
<img width="644" alt="Screenshot 2023-05-18 at 12 08 03 PM"
src="https://github.com/getsentry/sentry/assets/60121741/d5793331-74f9-4b4f-b4fd-5b5257bd539d">

2.Removed associated tests.

Co-authored-by: Abdullah Khan <abdullahkhan@PG9Y57YDXQ.local>
Abdkhan14 1 year ago
parent
commit
dcf4d44e43

+ 0 - 9
static/app/views/discover/table/cellAction.spec.jsx

@@ -140,14 +140,6 @@ describe('Discover -> CellAction', function () {
       expect(handleCellAction).toHaveBeenCalledWith('exclude', 'best-transaction');
     });
 
-    it('go to summary button goes to transaction summary page', async function () {
-      renderComponent(view, handleCellAction);
-      await openMenu();
-      await userEvent.click(screen.getByRole('button', {name: 'Go to summary'}));
-
-      expect(handleCellAction).toHaveBeenCalledWith('transaction', 'best-transaction');
-    });
-
     it('go to release button goes to release health page', async function () {
       renderComponent(view, handleCellAction, 3);
       await openMenu();
@@ -464,7 +456,6 @@ describe('updateQuery()', function () {
 
   it('does not error for special actions', function () {
     const results = new MutableSearch([]);
-    updateQuery(results, Actions.TRANSACTION, columnA, '');
     updateQuery(results, Actions.RELEASE, columnA, '');
     updateQuery(results, Actions.DRILLDOWN, columnA, '');
   });

+ 0 - 15
static/app/views/discover/table/cellAction.tsx

@@ -23,7 +23,6 @@ export enum Actions {
   EXCLUDE = 'exclude',
   SHOW_GREATER_THAN = 'show_greater_than',
   SHOW_LESS_THAN = 'show_less_than',
-  TRANSACTION = 'transaction',
   RELEASE = 'release',
   DRILLDOWN = 'drilldown',
   EDIT_THRESHOLD = 'edit_threshold',
@@ -84,7 +83,6 @@ export function updateQuery(
     }
     // these actions do not modify the query in any way,
     // instead they have side effects
-    case Actions.TRANSACTION:
     case Actions.RELEASE:
     case Actions.DRILLDOWN:
       break;
@@ -241,19 +239,6 @@ function makeCellActions({
     );
   }
 
-  if (column.column.kind === 'field' && column.column.field === 'transaction') {
-    addMenuItem(
-      Actions.TRANSACTION,
-      <ActionItem
-        key="transaction-summary"
-        data-test-id="transaction-summary"
-        onClick={() => handleCellAction(Actions.TRANSACTION, value)}
-      >
-        {t('Go to summary')}
-      </ActionItem>
-    );
-  }
-
   if (column.column.kind === 'field' && column.column.field === 'release' && value) {
     addMenuItem(
       Actions.RELEASE,

+ 0 - 32
static/app/views/discover/table/tableView.spec.jsx

@@ -285,38 +285,6 @@ describe('TableView > CellActions', function () {
     });
   });
 
-  it('handles go to transaction without project column selected', async function () {
-    rows.data[0]['project.name'] = 'project-slug';
-
-    renderComponent(initialData, rows, eventView);
-    await openContextMenu(2);
-    await userEvent.click(screen.getByRole('button', {name: 'Go to summary'}));
-
-    expect(browserHistory.push).toHaveBeenCalledWith({
-      pathname: '/organizations/org-slug/performance/summary/',
-      query: expect.objectContaining({
-        transaction: '/organizations/',
-        project: ['2'],
-      }),
-    });
-  });
-
-  it('handles go to transaction with project column selected', async function () {
-    rows.data[0].project = 'project-slug';
-
-    renderComponent(initialData, rows, eventView);
-    await openContextMenu(2);
-    await userEvent.click(screen.getByRole('button', {name: 'Go to summary'}));
-
-    expect(browserHistory.push).toHaveBeenCalledWith({
-      pathname: '/organizations/org-slug/performance/summary/',
-      query: expect.objectContaining({
-        transaction: '/organizations/',
-        project: ['2'],
-      }),
-    });
-  });
-
   it('renders transaction summary link', function () {
     rows.data[0].project = 'project-slug';
 

+ 0 - 12
static/app/views/discover/table/tableView.tsx

@@ -483,18 +483,6 @@ function TableView(props: TableViewProps) {
       });
 
       switch (action) {
-        case Actions.TRANSACTION: {
-          const target = getTargetForTransactionSummaryLink(
-            dataRow,
-            organization,
-            projects,
-            nextView,
-            location
-          );
-
-          browserHistory.push(normalizeUrl(target));
-          return;
-        }
         case Actions.RELEASE: {
           const maybeProject = projects.find(project => {
             return project.slug === dataRow.project;