-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Wrap pod logs #6217
Open
aleksfront
wants to merge
77
commits into
master
Choose a base branch
from
wrap-pod-logs
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Wrap pod logs #6217
Changes from all commits
Commits
Show all changes
77 commits
Select commit
Hold shift + click to select a range
da39984
Create functional LogList component
aleksfront d51c327
Add tanstack/react-virtual dependency
aleksfront 6f91071
Using new <LogList/>
aleksfront 843c0f7
Remove overflow from the LogControls
aleksfront 85fadc7
Set some list onScroll events
aleksfront 88678f6
Load more logs when scrolled to top
aleksfront e02278d
Merge branch 'master' into wrap-pod-logs
aleksfront e16fcf2
Remove overflow from the LogControls
aleksfront af8f39f
Show logs regarding to showTimestamps flag
aleksfront 62cc0d7
Keep scrolling position when loaded more logs
aleksfront 6d0d524
Merge branch 'master' into wrap-pod-logs
aleksfront 968621f
Fix scroll position when more logs loaded
aleksfront c4538e9
Scroll to bottom on pod id change
aleksfront 1679ba1
Scroll to bottom on tab change
aleksfront 2e0b4d1
Add LogList external styles
aleksfront da8570d
Add more styles
aleksfront f09974f
Move LogRow to its own file
aleksfront f90ede1
Scroll to overlay from the search
aleksfront c4ae074
Add wrapper switch
aleksfront 5443f40
Highlight log row on hover
aleksfront b989340
Refresh rows measurement by refreshing their keys
aleksfront 8ed40ff
Create useScrollToBottomButton hook
aleksfront 4c74d5a
Add useInitialScrollToBottom() hook
aleksfront b8f4fa1
Show Jump to bottom button
aleksfront 6ec7618
Restyling Jump to bottom button
aleksfront 51c059f
Give more room to the LogRows content
aleksfront 7b53650
Hook function renaming
aleksfront 05a3ed0
Fix scrolling to items on search
aleksfront dadd69e
Add useIntersectionObserver() hook
aleksfront 1898a4d
Remove unused code
aleksfront d37ae1b
Fixing ts compilation errors
aleksfront ac8ed14
Scroll list to bottom when new logs arrived
aleksfront d951f3a
Move all side effects to hooks
aleksfront 2d69bbc
Fix linter errors
aleksfront 64773f3
Unify styles for the top and bottom lines
aleksfront 511fc09
Prevent useEffect not firing with because of condition
aleksfront e82f83f
Use named export for useIntersectionObserver
aleksfront aeb0127
Disable smooth scrolling
aleksfront c4f41db
Increase timeout delay to wait virtualizer
aleksfront 0383666
Remove unused files
aleksfront 0de9b9c
Decrease scroll to bottom timeout time a bit
aleksfront 66dbced
Merge branch 'master' into wrap-pod-logs
aleksfront 85426ac
Remove a leftover
aleksfront 31c7ae1
Merge branch 'master' into wrap-pod-logs
aleksfront 7ce064c
Fixing to-bottom tests
aleksfront 6b2b9bc
Bump @tanstack/react-virtual version
aleksfront d598ee5
Fix download-logs tests
aleksfront efc7972
Fixing log-search tests
aleksfront a1e54ee
Align with latest Virtualizer API
aleksfront 6a1c607
Fixing smoke tests
aleksfront 24d059f
Testing log lines wrap
aleksfront cbee791
Fix selector
aleksfront c8998eb
Add missing click event
aleksfront 4e3c596
Few line characters, bigger timeout
aleksfront f8c0028
Updating snapshots
aleksfront fb2b3ff
Add navigateToPods step
aleksfront b88a9c3
Navigate to pods at the start of the test
aleksfront 3748e94
Remove unused waitForSelector
aleksfront 8551385
Change namespace to default
aleksfront 5a41265
Fix logline selector
aleksfront 0f6b0f3
Fixing finding wrapped log line height
aleksfront 8d2d9e8
Insert very long log contents
aleksfront f181081
Linter fix
aleksfront 13257f0
Set viewport size for the tests
aleksfront d19e65b
Fix click .wrap-logs click event
aleksfront 2c2266e
Adding hard wait for debugging
aleksfront a49c947
Test for white-space rule changing
aleksfront 5921098
Search for element using getByTestId
aleksfront 8566ae8
Using asElement() for assertions
aleksfront 4fbaa7f
Use getByText from frame selector
aleksfront 59d0790
Testing bounding boxes
aleksfront 178c1f0
More testing of bounding box
aleksfront f957eb0
Testing check() instead of click()
aleksfront 5f660bb
Use click instead of check
aleksfront 1af76e1
Check if .wrap class applied properly
aleksfront be2cb63
Remove e2e wrap logs test case
aleksfront a38fdc7
Linter fixes
aleksfront 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 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 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 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 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
111 changes: 111 additions & 0 deletions
111
src/renderer/components/dock/logs/__test__/__snapshots__/log-list.test.tsx.snap
This file contains 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,111 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`<LogList /> renders logs 1`] = ` | ||
<div> | ||
<div | ||
class="LogList" | ||
data-testid="pod-log-list" | ||
> | ||
<div | ||
class="virtualizer" | ||
style="height: 0px;" | ||
> | ||
<div | ||
class="anchorLine" | ||
style="top: 0px;" | ||
/> | ||
<div | ||
class="rowWrapper" | ||
data-index="0" | ||
style="transform: translateY(0px);" | ||
> | ||
<div> | ||
<div | ||
class="LogRow" | ||
> | ||
<span> | ||
hello | ||
</span> | ||
<br /> | ||
</div> | ||
</div> | ||
</div> | ||
<div | ||
class="rowWrapper" | ||
data-index="1" | ||
style="transform: translateY(0px);" | ||
> | ||
<div> | ||
<div | ||
class="LogRow" | ||
> | ||
<span> | ||
world | ||
</span> | ||
<br /> | ||
</div> | ||
</div> | ||
</div> | ||
<div | ||
class="anchorLine" | ||
style="bottom: 0px;" | ||
/> | ||
</div> | ||
</div> | ||
</div> | ||
`; | ||
|
||
exports[`<LogList /> when user selected to wrap log lines renders logs with wrapping 1`] = ` | ||
<div> | ||
<div | ||
class="LogList" | ||
data-testid="pod-log-list" | ||
> | ||
<div | ||
class="virtualizer" | ||
style="height: 0px;" | ||
> | ||
<div | ||
class="anchorLine" | ||
style="top: 0px;" | ||
/> | ||
<div | ||
class="rowWrapper wrap" | ||
data-index="0" | ||
style="transform: translateY(0px);" | ||
> | ||
<div> | ||
<div | ||
class="LogRow" | ||
> | ||
<span> | ||
hello | ||
</span> | ||
<br /> | ||
</div> | ||
</div> | ||
</div> | ||
<div | ||
class="rowWrapper wrap" | ||
data-index="1" | ||
style="transform: translateY(0px);" | ||
> | ||
<div> | ||
<div | ||
class="LogRow" | ||
> | ||
<span> | ||
world | ||
</span> | ||
<br /> | ||
</div> | ||
</div> | ||
</div> | ||
<div | ||
class="anchorLine" | ||
style="bottom: 0px;" | ||
/> | ||
</div> | ||
</div> | ||
</div> | ||
`; |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: set it inline below?