-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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: show/hide timestamp and body fields in logs explorer (raw, default, column views) #6903
base: main
Are you sure you want to change the base?
feat: show/hide timestamp and body fields in logs explorer (raw, default, column views) #6903
Conversation
…ult, column views)
… doesn't take half the space
…mn-in-logs-explorer
…mn-in-logs-explorer
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.
👍 Looks good to me! Reviewed everything up to 5d10be0 in 1 minute and 1 seconds
More details
- Looked at
394
lines of code in7
files - Skipped
0
files when reviewing. - Skipped posting
5
drafted comments based on config settings.
1. frontend/src/components/Logs/TableView/useTableView.tsx:51
- Draft comment:
Ensure that the filtering logic for fields correctly handles cases where 'timestamp' or 'body' might not be present in the fields array. This could lead to unexpected behavior if the fields array does not contain these fields. - Reason this comment was not posted:
Comment did not seem useful.
2. frontend/src/container/LogsExplorerList/InfinityTableView/index.tsx:125
- Draft comment:
Ensure that the filtering logic intableHeader
correctly handles cases where the column key might be undefined or null to prevent unexpected behavior. - Reason this comment was not posted:
Confidence changes required:50%
In theInfinityTableView
component, thetableHeader
function filters columns based on the presence of a key. However, it does not handle cases where the key might be undefined or null, which could lead to unexpected behavior.
3. frontend/src/components/Logs/ListLogView/index.tsx:222
- Draft comment:
Avoid using inline styles. Use external stylesheets, CSS classes, or styled components instead. - Reason this comment was not posted:
Comment was on unchanged code.
4. frontend/src/container/LogsExplorerList/InfinityTableView/styles.ts:32
- Draft comment:
Avoid using inline styles. Use external stylesheets, CSS classes, or styled components instead. - Reason this comment was not posted:
Marked as duplicate.
5. frontend/src/container/LogsExplorerList/InfinityTableView/styles.ts:29
- Draft comment:
Avoid using inline styles. Use external stylesheets, CSS classes, or styled components instead. - Reason this comment was not posted:
Marked as duplicate.
Workflow ID: wflow_QqxiGtLkzvfjA5WO
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
…p in logs explorer
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.
👍 Looks good to me! Incremental review on 37d1f62 in 59 seconds
More details
- Looked at
242
lines of code in6
files - Skipped
0
files when reviewing. - Skipped posting
3
drafted comments based on config settings.
1. frontend/src/components/LogsFormatOptionsMenu/LogsFormatOptionsMenu.tsx:420
- Draft comment:
Consider refactoring the repeated logicaddColumn?.value?.length > 1
into a variable for clarity and maintainability. This logic is used in multiple places, such as line 420 and line 413. - Reason this comment was not posted:
Confidence changes required:50%
The code inLogsFormatOptionsMenu.tsx
usesaddColumn?.value?.length > 1
to conditionally render the delete button. This logic is repeated in multiple places, which can be refactored for clarity and maintainability.
2. frontend/src/container/ExplorerOptions/ExplorerOptions.tsx:293
- Draft comment:
Consider refactoring the repeated logic of omitting theversion
key fromoptions
into a separate function for clarity and maintainability. This logic is used in multiple places, such as line 293 and line 290. - Reason this comment was not posted:
Confidence changes required:50%
InExplorerOptions.tsx
, theomit
function is used to remove theversion
key fromoptions
. This is done to maintain backward compatibility. However, this logic is repeated in multiple places, which can be refactored for clarity and maintainability.
3. frontend/src/pages/LogsExplorer/index.tsx:88
- Draft comment:
Consider refactoring themigrateOptionsQuery
function into a utility function for clarity and maintainability, as this logic is crucial for backward compatibility and is used in multiple places. - Reason this comment was not posted:
Confidence changes required:50%
InLogsExplorer/index.tsx
, themigrateOptionsQuery
function is used to add default columns if the version is missing. This logic is crucial for backward compatibility and is repeated in multiple places. It can be refactored into a utility function for clarity and maintainability.
Workflow ID: wflow_ck1W2UTBj4oHglRg
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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.
looks good to me, @vikrantgupta25 please review it from code prespective.
Summary
Overview
Adds flexibility to control the visibility of timestamp and body fields across all logs explorer views (raw, default, column) while maintaining backward compatibility.
Key Changes
Backward Compatibility
User Experience
Related Issues / PR's
close #4999
Screenshots
2025-01-22.19-36-34.mov
Affected Areas and Manually Tested Areas
Important
Adds optional visibility for timestamp and body fields in logs explorer views with user preference persistence and backward compatibility.
ListLogView
,RawLogView
,useTableView
).selectColumns
.defaultLogsSelectedColumns
inconstants.ts
for default column settings.useOptionsMenu
to handle new default columns and versioning.LogsFormatOptionsMenu
to prevent removing the last visible column.This description was created by for 37d1f62. It will automatically update as commits are pushed.