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

Native stack traces: registers are hidden, button to show them is displaced #82641

Merged

Conversation

nipunh
Copy link
Contributor

@nipunh nipunh commented Dec 28, 2024

Native stack traces: registers are hidden, button to show them is displaced #82371

  1. Resolved the overflow issue
  2. Always showing the "teaser" view of the registers initially

Screenshot 2024-12-28 at 11 30 51 AM

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Dec 28, 2024
@nipunh nipunh changed the title Nipun/improvement/registers are hidden Native stack traces: registers are hidden, button to show them is displaced Dec 29, 2024
@ryan953 ryan953 added the Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests label Dec 31, 2024
@ryan953 ryan953 requested a review from a team December 31, 2024 03:58
@@ -91,7 +91,6 @@ function NativeFrame({
isShowFramesToggleExpanded,
isSubFrame,
onShowFramesToggle,
isExpanded,
Copy link
Member

Choose a reason for hiding this comment

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

This should also be removed from the Props type above. Any callsites that are passing it in will have to be updated as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will take a look and make required changes for it.

Copy link
Member

@ryan953 ryan953 Jan 7, 2025

Choose a reason for hiding this comment

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

@nipunh Don't forget about cleaning up this extra prop in the types and callsites ^

Copy link
Contributor Author

@nipunh nipunh Jan 10, 2025

Choose a reason for hiding this comment

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

Hi @ryan953, I have pushed the changes after clean this up.

Copy link
Member

Choose a reason for hiding this comment

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

@nipunh Please also delete line 63 from this file, the content is isExpanded?: boolean;
Then typescript should be happy, and we'll be all set!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

All set!

Comment on lines +528 to +529
grid-template-columns: auto 150px 120px 4fr repeat(3, auto) ${space(2)}; /* Adjusted to account for the extra element */
grid-template-rows: 1fr; /* Ensures a single row */
Copy link
Member

@ryan953 ryan953 Dec 31, 2024

Choose a reason for hiding this comment

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

I suspect that the grid columns will depend on the values of expandable and hiddenFrameCount. I will find some sample data to look at before I can know what to do here.

Also, the specific grid-column and grid-row css inside each *Cell component seem like they're going to expect a specific number of columns, and two rows, if only at the small breakpoint.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the feedback, Once we have clarity from the data, I can help refine the grid logic further. Let me know your findings!

Just to make sure, I am on the right path here, The button (show/hide count) doesn't add a data column but instead adds an extra row header without a corresponding data column. This mismatch causes layout issues like pushing the ExpandCell to the next line.

Copy link
Member

@ryan953 ryan953 Dec 31, 2024

Choose a reason for hiding this comment

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

It looks like it's supposed to go into two rows on purpose when the window is narrow. But the colunm widths in that case are kind of broken right now:

SCR-20241231-ktft

Can you re-test with a normal-width browser, and a narrow browser window, and share screenshots of the results.

I think you'll want to have something like grid-template-rows: repeat(2, auto); with appropriate widths defined for the narrow @media breakpoint.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, I will test and share the screenshots.

Copy link
Contributor Author

@nipunh nipunh Jan 4, 2025

Choose a reason for hiding this comment

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

Hi @ryan953

These are the screenshots for the existing code.
Screenshot 2025-01-04 at 6 43 18 PM
Screenshot 2025-01-04 at 6 43 44 PM
Screenshot 2025-01-04 at 6 45 16 PM

These are the screenshots after the change
Screenshot 2025-01-04 at 6 46 34 PM
Screenshot 2025-01-04 at 6 46 48 PM

I have also included the screen size in the screenshots.

Copy link
Member

Choose a reason for hiding this comment

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

awesome! I wanted to see if stuff like that In App tag was still moved down to the second row, looks like it is!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great! Is there anything else I can update here?

Copy link
Member

Choose a reason for hiding this comment

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

@nipunh don't forget about that extra isExpanded prop, we don't need it in the Props definition or at the callsites anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, Verifying that and will push the changes soon.

removed unused Props from callsites that are passing it
@nipunh nipunh requested a review from a team as a code owner January 10, 2025 04:35
@github-actions github-actions bot removed the Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests label Jan 10, 2025
@ryan953 ryan953 added the Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests label Jan 10, 2025
@ryan953 ryan953 merged commit 1aee795 into getsentry:master Jan 10, 2025
40 of 42 checks passed
andrewshie-sentry pushed a commit that referenced this pull request Jan 22, 2025
…placed (#82641)

<!-- Describe your PR here. -->
Native stack traces: registers are hidden, button to show them is
displaced #82371

1) Resolved the overflow issue
2) Always showing the "teaser" view of the registers initially

![Screenshot 2024-12-28 at 11 30
51 AM](https://github.com/user-attachments/assets/6aa8683b-cd11-4c77-b2c2-ed4ff4f25541)

<!--

  Sentry employees and contractors can delete or ignore the following.

-->

### Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated
in the State of Delaware in 2015 as Functional Software, Inc. and is
gonna need some rights from me in order to utilize my contributions in
this here PR. So here's the deal: I retain all rights, title and
interest in and to my contributions, and by keeping this boilerplate
intact I confirm that Sentry can use, modify, copy, and redistribute my
contributions, under Sentry's choice of terms.
scttcper added a commit that referenced this pull request Jan 24, 2025
Expands the first in native in app frame. It was changed to expand all by default, this causes the stacktrace link to make requests for every line which is not what the github api can handle.

related #82641
fixes #84045
@github-actions github-actions bot locked and limited conversation to collaborators Jan 26, 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 Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Native stack traces: registers are hidden, button to show them is displaced
2 participants