-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
feat: Add row number to data browser #2737
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
base: alpha
Are you sure you want to change the base?
Conversation
I will reformat the title to use the proper commit message syntax. |
🚀 Thanks for opening this pull request! We appreciate your effort in improving the project. Please let us know once your pull request is ready for review. |
Uffizzi Ephemeral Environment
|
Uffizzi Ephemeral Environment
|
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, could you please:
- consider pagination when calculating the row number, e.g. the first row number should the skip value + 1
- dynamically adapt the width of the number column to the number text width
🎉 Snyk checks have passed. No issues have been found so far.✅ security/snyk check is complete. No issues have been found. (View Details) |
WalkthroughThe changes introduce a row number column to the data browser interface. A new span element displaying the row number is added to each row in the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Browser as Browser.react.js
participant Table as BrowserTable.react.js
participant Row as BrowserRow.react.js
User->>Browser: Interacts with Data Browser (pagination, scroll)
Browser->>Table: Renders Data Table (passes skip prop)
Table->>Row: Renders each BrowserRow (passes row + skip)
Row->>Row: Displays (row + 1) in sticky row number column
Assessment against linked issues
Suggested labels
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (1)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/dashboard/Data/Browser/BrowserToolbar.react.js (1)
437-437
: Empty div element without clear purposeThis empty
<div/>
doesn't seem to serve any functional purpose. Consider removing it or adding a comment explaining its need if it's intended as a placeholder or for layout purposes.- <div/>
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
src/components/BrowserRow/BrowserRow.react.js
(1 hunks)src/components/DataBrowserHeaderBar/DataBrowserHeaderBar.scss
(1 hunks)src/dashboard/Data/Browser/Browser.react.js
(1 hunks)src/dashboard/Data/Browser/Browser.scss
(1 hunks)src/dashboard/Data/Browser/BrowserTable.react.js
(4 hunks)src/dashboard/Data/Browser/BrowserToolbar.react.js
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Docker linux/amd64
🔇 Additional comments (7)
src/dashboard/Data/Browser/Browser.scss (1)
113-129
: Well-implemented sticky row number styling!The new
.rowNumber
class is well-designed with sticky positioning ensuring row numbers remain visible during horizontal scrolling. The style is consistent with existing patterns while adding necessary features for this specific use case.src/components/DataBrowserHeaderBar/DataBrowserHeaderBar.scss (1)
55-57
: Appropriate header styling adjustmentThese changes correctly adjust the width and padding to accommodate the new row number column, ensuring proper alignment between header and data rows.
src/components/BrowserRow/BrowserRow.react.js (1)
74-74
: Good implementation of row numberingThe row number display is implemented cleanly, with proper 1-indexed conversion for user-friendly display.
Please verify that the
row
prop accounts for pagination offsets to ensure row numbers are continuous across pages.src/dashboard/Data/Browser/Browser.react.js (1)
2106-2106
: Pagination offset now properly passed to DataBrowserThis change adds the current pagination offset to the
DataBrowser
component, allowing child components to calculate accurate row numbers that account for pagination.src/dashboard/Data/Browser/BrowserTable.react.js (3)
127-127
: Row width increased to accommodate row number columnThe additional 30 pixels provides space for the new row number column being added to the data browser interface.
159-159
: Row index now accounts for paginationThe row number for edit clone rows now includes the pagination offset (
skip
), ensuring consistent row numbering across pages.
332-332
: Row index now accounts for paginationThe row number for data rows now includes the pagination offset (
skip
), ensuring consistent row numbering across pages.
Signed-off-by: Manuel <[email protected]>
Uffizzi Ephemeral Environment
|
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.
New Pull Request Checklist
Issue Description
Closes: #2484
Approach
TODOs before merging
Summary by CodeRabbit
New Features
Style
Bug Fixes
Enhancements