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(releases): add release health table on frontend/backend insights #85501

Merged
merged 8 commits into from
Feb 21, 2025

Conversation

michellewzhang
Copy link
Member

@michellewzhang michellewzhang commented Feb 20, 2025

add a release health table to the frontend insights "session health" tab (gated by a feature flag only visible to sentry):

sorted by creation date.

SCR-20250220-norb

includes pagination too:

SCR-20250220-nort

empty state

SCR-20250219-owkb

hovering over the release name gives a tooltip card, and clicking into it goes to the release detail page:

SCR-20250220-noso

clicking the "new issues" count goes to issue search

Screen.Recording.2025-02-20.at.3.20.35.PM.mov

note

currently it's only shown on the frontend & backend insights page, but will implement for mobile in the future.
question: will the mobile table look any different?

findings

1. turns out the /releases/ endpoint gives us a bunch of handy stuff that we don't need to calculate (we were calculating crash free rate by hand etc for the sessions-backed chart):

SCR-20250219-odit

2. the /releases/ endpoint sort is broken - you can only sort the following fields one way, but not the other

crash_free_sessions
crash_free_users
date
sessions
users

ex. -crash_free_sessions breaks the endpoint

so i disabled sort for all columns for now.

3. the whole table rendering gets pretty slow with 1+ project selected.

TODOS:

  • fix rerendering whenever columns are resized
  • add issue count columns
  • implement mobile version (any differences?) - will do in followup

relates to #84877

@michellewzhang michellewzhang requested a review from a team as a code owner February 20, 2025 00:45
@michellewzhang michellewzhang requested a review from a team February 20, 2025 00:45
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Feb 20, 2025
makeSortLinkGenerator,
onClick: () => {},
rightAlignedColumns: [],
sortableColumns: [],
Copy link
Member Author

Choose a reason for hiding this comment

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

disabled all sorting because the /releases/ endpoint sorting is not bidirectional

Copy link
Member

@gggritso gggritso left a comment

Choose a reason for hiding this comment

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

Makes sense! I'll leave it for someone from your team to approve, just left one suggestion 👍🏻

Comment on lines 64 to 82
const renderBodyCell = useCallback((column: any, dataRow: any) => {
const value = dataRow[column.key];
switch (column.key) {
case 'date':
return <DateTime date={value} />;
case 'version':
return (
<VersionWrapper>
<StyledVersion version={value} tooltipRawVersion anchor={false} />
</VersionWrapper>
);
case 'crash_free_sessions':
return `${value.toFixed(2)}%`;
case 'stage':
case 'sessions':
default:
return <TextOverflow>{value}</TextOverflow>;
}
}, []);
Copy link
Member

Choose a reason for hiding this comment

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

For body cell rendering you might have an easier time if you delegate to default field renderers. You can see some examples in Insights where we specify custom renderers for some table cell types, but then call getFieldRenderer for the rest

There are default renderers for date, release, and others that might be useful!

Comment on lines 37 to 39
const PaginationNoMargin = styled(Pagination)`
margin: 0;
`;
Copy link
Member

Choose a reason for hiding this comment

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

👀 would removing margin from Pagination be more, less, or similarly annoying to Alert?

Copy link
Member Author

Choose a reason for hiding this comment

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

much less annoying👀

This comment was marked as resolved.

@michellewzhang michellewzhang merged commit 6f94090 into master Feb 21, 2025
43 checks passed
@michellewzhang michellewzhang deleted the mz/add-release-health-table branch February 21, 2025 18:42
wedamija pushed a commit that referenced this pull request Feb 21, 2025
…#85501)

### add a release health table to the frontend insights "session health"
tab (gated by a feature flag only visible to sentry):

sorted by creation date.
 
<img width="923" alt="SCR-20250220-norb"
src="https://github.com/user-attachments/assets/c3347c29-27cf-4d24-964a-a1f51013afe3"
/>


### includes pagination too:

<img width="927" alt="SCR-20250220-nort"
src="https://github.com/user-attachments/assets/97d0a10b-034d-4b8d-a517-a323321fc8cd"
/>


### empty state

<img width="817" alt="SCR-20250219-owkb"
src="https://github.com/user-attachments/assets/ed4ee659-4a48-4c31-9826-a80040bf9b5b"
/>

### hovering over the release name gives a tooltip card, and clicking
into it goes to the release detail page:

<img width="366" alt="SCR-20250220-noso"
src="https://github.com/user-attachments/assets/a00425cb-1668-4a9a-8464-b2ea5b0868ae"
/>

### clicking the "new issues" count goes to issue search


https://github.com/user-attachments/assets/96bf1324-71c5-4a06-b2f2-1fea6cefcf45



### note
currently it's only shown on the frontend & backend insights page, but
will implement for mobile in the future.
**question:** will the mobile table look any different?

### findings

#### 1. turns out the `/releases/` endpoint gives us a bunch of handy
stuff that we don't need to calculate (we were calculating crash free
rate by hand etc for the sessions-backed chart):

<img width="326" alt="SCR-20250219-odit"
src="https://github.com/user-attachments/assets/7418a2f2-937c-4efc-b5da-36a79ab5f496"
/>

#### 2. the `/releases/` endpoint sort is broken - you can only sort the
following fields one way, but not the other

```
crash_free_sessions
crash_free_users
date
sessions
users
```

ex. `-crash_free_sessions` breaks the endpoint

so i disabled sort for all columns for now.

#### 3. the whole table rendering gets pretty slow with 1+ project
selected.

### TODOS:
- [x] fix rerendering whenever columns are resized
- [x] add issue count columns 
- [ ] implement mobile version (any differences?) - will do in followup

relates to #84877
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.

3 participants