Skip to content

fix(ourlogs): Search and display fixes for embedded views #90940

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

Merged
merged 4 commits into from
May 8, 2025

Conversation

colin-sentry
Copy link
Member

@colin-sentry colin-sentry commented May 5, 2025

  • Do not show cell actions in embedded tables
  • Add a test to such effect
  • Rename things to be consistent everywhere (just isFrozen)
  • Refactor the issues section
  • Do not entirely hide the section if your search returns empty results (unreported bug)
  • Use useState for search on embedded pages (issues, trace view)

Fixes LOGS-82

@colin-sentry colin-sentry requested review from a team as code owners May 5, 2025 19:15
@colin-sentry colin-sentry requested a review from k-fish May 5, 2025 19:15
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label May 5, 2025
Copy link

codecov bot commented May 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #90940   +/-   ##
=======================================
  Coverage   75.96%   75.96%           
=======================================
  Files       10296    10296           
  Lines      584462   584439   -23     
  Branches    22584    22578    -6     
=======================================
- Hits       443966   443956   -10     
+ Misses     140066   140053   -13     
  Partials      430      430           

@colin-sentry colin-sentry force-pushed the better_frozen_handling branch from 6f93f04 to c505461 Compare May 6, 2025 17:54
@colin-sentry colin-sentry requested a review from a team as a code owner May 6, 2025 17:54
@colin-sentry colin-sentry changed the title feat(ourlogs): Better frozen handling, more tests fix(ourlogs): Search and display fixes for embedded views May 6, 2025
Comment on lines +39 to +40
isTableFrozen
blockRowExpanding
Copy link
Member

Choose a reason for hiding this comment

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

are these two conditionals ever exclusive? Does a frozen table imply we're using the drawer always? Or is it only in issues where we do View More and have the limited table?

Copy link
Member Author

Choose a reason for hiding this comment

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

exactly, yea

@@ -74,7 +91,7 @@ export function LogsIssuesSection({
// We may change this in the future if we have a trace-group or we generate trace sids for these issue types.
return null;
}
if (tableData?.data?.length === 0) {
if (!tableData || (tableData.data?.length === 0 && logsSearch.isEmpty())) {
Copy link
Member

Choose a reason for hiding this comment

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

Oh is the the bug that hides it if you are filtering down and it's an empty table? Can we make a quick test and just assert the empty state renders (mock the requests returning empty) to cover these?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll do the tests for the issues page in a separate PR, there is no harness yet

icon={<IconChevron direction="right" />}
aria-label={t('View more')}
size="md"
onClick={() => onOpenLogsDrawer()}
Copy link
Member

Choose a reason for hiding this comment

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

do we need both onClick?

Also I hadn't realized it but we would have never been able to expand logs for log count < 5 on the table without the general onclick, so good that we added it

Copy link
Member Author

Choose a reason for hiding this comment

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

yea, you can still tab to focus it

@colin-sentry colin-sentry force-pushed the better_frozen_handling branch from c505461 to 523246e Compare May 8, 2025 18:58
@colin-sentry colin-sentry enabled auto-merge (squash) May 8, 2025 18:58
@colin-sentry colin-sentry merged commit 99f79d1 into master May 8, 2025
41 checks passed
@colin-sentry colin-sentry deleted the better_frozen_handling branch May 8, 2025 19:12
Copy link

sentry-io bot commented May 12, 2025

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ Error: The data does not contain any plottable values. /explore/logs/ View Issue
  • ‼️ Error: The data does not contain any plottable values. /projects/ View Issue
  • ‼️ Error: The data does not contain any plottable values. /explore/logs/ View Issue
  • ‼️ TypeError: undefined is not an object (evaluating 'y.index') /explore/logs/ View Issue

Did you find this useful? React with a 👍 or 👎

andrewshie-sentry pushed a commit that referenced this pull request May 12, 2025
- Do not show cell actions in embedded tables
- Add a test to such effect
- Rename things to be consistent everywhere (just isFrozen)
- Refactor the issues section
- Do not entirely hide the section if your search returns empty results
(unreported bug)
- Use useState for search on embedded pages (issues, trace view)

Fixes LOGS-82
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.

2 participants