-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
feat(logs): moved LogsInfiniteTable inline with expand/contract button #109819
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
Changes from all commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
721e054
feat(logs): moved LogsInfiniteTable inline with expand/contract button
JoshuaKGoldberg d85c3cb
fix: min-height and always-expanded
JoshuaKGoldberg 1493eff
WIP: table height is going to kill me
JoshuaKGoldberg 68f0e06
fix: assorted height fixes for replays
JoshuaKGoldberg ed56c74
test: reduce to not testing expanded itself
JoshuaKGoldberg 298fec4
semicolon, and fixtures
JoshuaKGoldberg 345f652
fix: height prop spreading; desktop vs mobile refs
JoshuaKGoldberg 717e02d
ref: update virtualization file path
JoshuaKGoldberg 0c09ee7
ref: remove unused tableLeft
JoshuaKGoldberg 738df5e
feat: remove excess scrollbars with a responsive height (WIP)
JoshuaKGoldberg bf33571
fix(logs): Disable scroll anchoring on virtual scroll container
JoshuaKGoldberg 205761a
wip: css styling cleanup attempt
JoshuaKGoldberg fbc108e
fix(logs): Viewport-constrained layout for logs page
JoshuaKGoldberg d41f48f
ref(logs): Remove > div bandaid with opt-in contentsBody prop
JoshuaKGoldberg 15878c2
fix: yet again fix scrolling
JoshuaKGoldberg a2de821
fix(logs): Use CSS size containment for viewport-constrained page
JoshuaKGoldberg 5dd23fa
feat(logs): Gate expando/collapso behind feature flag
JoshuaKGoldberg dd945f1
fix(logs): Rename query param to logsTableExpando
JoshuaKGoldberg 5499fe1
fix(logs): Remove stale scrollIntoView assertions from useExpando tests
JoshuaKGoldberg 444f042
fix(logs): Restore window virtualizer when feature flag is off
JoshuaKGoldberg 101be46
fix(logs): Pass undefined instead of false when expando flag is off
JoshuaKGoldberg 56a3d9f
fix: add missing measure to mock
JoshuaKGoldberg ac730d6
ref: consolidate detection logic
JoshuaKGoldberg ddb5c57
Remove footer on smaller viewport heights
JoshuaKGoldberg 5d4cc40
175px height for tables, and splitNumber: 2
JoshuaKGoldberg 0190910
fix: remove flex 1 1 auto from LogsItemContainer
JoshuaKGoldberg baa0c11
Roll out useIsShortViewport
JoshuaKGoldberg 9bbeb10
properly pipe through a non-undefined 5
JoshuaKGoldberg 37afa31
isContainedVirtualizer
JoshuaKGoldberg 8e1dea9
Merge branch 'master' into logs-infinite-table-expando
JoshuaKGoldberg 2dccb42
Simplify expanded, and apply in traceOurlogs
JoshuaKGoldberg 63039c2
No, expanded is actually a false|true|undefined tri-state
JoshuaKGoldberg edd1fa3
fix: FloatingBackToTopContainer in non-expando sections
JoshuaKGoldberg 0abde9a
fix: replay embedding overflow and scroll issues
JoshuaKGoldberg a4a83d0
Rename to useTableExpando; extract useLogsTableExpandoFeatureFlag
JoshuaKGoldberg 71c5702
fix: bump up those overscan numbers
JoshuaKGoldberg ffdb3d5
Add flex-based height constraints and min in traceOurlogs
JoshuaKGoldberg 5867bb9
Merge branch 'master'
JoshuaKGoldberg 034843b
Good news: no more manual left needed on FloatingBackToTopContainer
JoshuaKGoldberg ee7ff70
Merge branch 'master' into logs-infinite-table-expando
JoshuaKGoldberg 5f81c28
Merge branch 'master' into logs-infinite-table-expando
JoshuaKGoldberg 9bd2a9a
feat: also hide footer when expanded
JoshuaKGoldberg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
JoshuaKGoldberg marked this conversation as resolved.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| /** | ||
| * Tanstack Virtual renders zero items in the default zero-sized JSDom environment. | ||
| * This forces all elements to have a non-zero size to render at least a few rows. | ||
| * https://github.com/TanStack/virtual/issues/641 | ||
| */ | ||
| export function mockGetBoundingClientRect() { | ||
| Element.prototype.getBoundingClientRect = jest.fn(() => ({ | ||
| width: 500, | ||
| height: 500, | ||
| top: 0, | ||
| left: 0, | ||
| bottom: 500, | ||
| right: 500, | ||
| x: 0, | ||
| y: 0, | ||
| toJSON: () => {}, | ||
| })); | ||
|
JoshuaKGoldberg marked this conversation as resolved.
|
||
| } | ||
|
JoshuaKGoldberg marked this conversation as resolved.
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| import {useMedia} from 'sentry/utils/useMedia'; | ||
|
|
||
| export const SHORT_VIEWPORT_HEIGHT = 900; | ||
|
|
||
| export function useIsShortViewport(): boolean { | ||
| return useMedia(`(max-height: ${SHORT_VIEWPORT_HEIGHT}px)`); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
static/app/views/explore/components/viewportConstrainedPage.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| import styled from '@emotion/styled'; | ||
|
|
||
| import type {FlexProps} from '@sentry/scraps/layout'; | ||
|
|
||
| import * as Layout from 'sentry/components/layouts/thirds'; | ||
| import {SHORT_VIEWPORT_HEIGHT} from 'sentry/utils/useIsShortViewport'; | ||
|
|
||
| interface ViewportConstrainedPageProps extends FlexProps<'main'> { | ||
| constrained?: boolean; | ||
| hideFooter?: boolean; | ||
| } | ||
|
|
||
| /** | ||
| * A page layout that constrains itself to the viewport height to prevent | ||
| * window-level scrolling. Uses CSS size containment so that the page's | ||
| * intrinsic size doesn't bubble up through the flex chain — the flex | ||
| * algorithm sizes it to exactly the remaining space after siblings | ||
| * (TopBar, Footer, etc.), and content within must manage its own | ||
| * overflow (e.g. via scrollable table bodies). | ||
| * | ||
| * When constrained, the global footer sibling is hidden on smaller | ||
| * viewport heights and when `hideFooter` is set. | ||
| */ | ||
| export function ViewportConstrainedPage({ | ||
| constrained = true, | ||
| hideFooter, | ||
| ...rest | ||
| }: ViewportConstrainedPageProps) { | ||
| if (!constrained) { | ||
| return <Layout.Page {...rest} />; | ||
| } | ||
|
|
||
| return ( | ||
| <ConstrainedPage | ||
| minHeight="0" | ||
| overflow="hidden" | ||
| data-hide-footer={hideFooter ? '' : undefined} | ||
| {...rest} | ||
| /> | ||
| ); | ||
| } | ||
|
|
||
| const ConstrainedPage = styled(Layout.Page)` | ||
| contain: size; | ||
|
|
||
| @media (max-height: ${SHORT_VIEWPORT_HEIGHT}px) { | ||
| ~ footer { | ||
| display: none; | ||
| } | ||
| } | ||
|
|
||
| &[data-hide-footer] ~ footer { | ||
| display: none; | ||
| } | ||
| `; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.