parse-dashboard
parse-dashboard copied to clipboard
feat: Add row number to data browser
New Pull Request Checklist
- [x] I am not disclosing a vulnerability.
- [x] I am creating this PR in reference to an issue.
Issue Description
Closes: #2484
Approach
TODOs before merging
- [ ] Add tests
- [ ] Add changes to documentation (guides, repository pages, in-code descriptions)
Summary by CodeRabbit
-
New Features
- Added visible row numbers to each row in the data browser for easier reference.
- Included pagination offset in row numbering for accurate indexing.
-
Style
- Improved layout and alignment of row numbers and checkboxes for better readability.
- Ensured row numbers remain visible when scrolling horizontally.
- Adjusted spacing and alignment of checkbox elements for consistency.
- Added styling for row number display with borders and centered text.
-
Bug Fixes
- Corrected style property naming for horizontal overflow to improve compatibility.
-
Enhancements
- Dynamically adjusted the width reserved for row headers based on the total number of rows.
-
Other
- Added a placeholder element in the script menu for improved UI structure.
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 deployment-62613
:watch: Updated Apr 09, 2025, 11:41 UTC
:cloud: https://app.uffizzi.com/github.com/parse-community/parse-dashboard/pull/2737
:page_facing_up: View Application Logs etc.
What is Uffizzi? Learn more
Uffizzi Ephemeral Environment deployment-62726
:watch: Updated Apr 13, 2025, 14:29 UTC
:cloud: https://app.uffizzi.com/github.com/parse-community/parse-dashboard/pull/2737
:page_facing_up: View Application Logs etc.
What is Uffizzi? Learn more
:tada: Snyk checks have passed. No issues have been found so far.
:white_check_mark: security/snyk check is complete. No issues have been found. (View Details)
📝 Walkthrough
"""
Walkthrough
The 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 BrowserRow component, styled with a new .rowNumber CSS class to ensure it remains visible and properly aligned. The row index calculation is updated to account for pagination offsets. The overall row width is increased to accommodate the new column, and minor style and structure adjustments are made to maintain consistency and alignment across the interface.
Changes
| Files / Areas Changed | Summary |
|---|---|
| src/components/BrowserRow/BrowserRow.react.js | Added a span to display the row number at the start of each row in the table. |
| src/dashboard/Data/Browser/BrowserTable.react.js | Updated row index calculation to include pagination offset; increased row width by 30px; fixed inline style key. |
| src/dashboard/Data/Browser/Browser.scss | Added .rowNumber CSS class for sticky, styled row number column. |
| src/components/DataBrowserHeaderBar/DataBrowserHeaderBar.scss | Adjusted .check class padding and fixed background color declaration for better alignment with new row number column. |
| src/components/DataBrowserHeaderBar/DataBrowserHeaderBar.react.js | Added headerWidth prop usage to dynamically style checkbox container in header bar and added row number header element. |
| src/dashboard/Data/Browser/Browser.react.js | Passed skip prop to DataBrowser to support correct row number calculation with pagination. |
| src/dashboard/Data/Browser/BrowserToolbar.react.js | Added an empty div after a menu item in the "Script" menu (no functional change). |
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
| Objective | Addressed | Explanation |
|---|---|---|
| Add a column at the beginning that shows the row number and is always visible (#2484) | ✅ |
"""
[!WARNING] There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.
🔧 ESLint
If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.
npm error code ERR_SSL_WRONG_VERSION_NUMBER npm error errno ERR_SSL_WRONG_VERSION_NUMBER npm error request to https://10.0.0.28:4873/npm/-/npm-10.9.2.tgz failed, reason: C07C290BC07F0000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:354: npm error npm error A complete log of this run can be found in: /.npm/_logs/2025-06-09T16_38_42_271Z-debug-0.log
📜 Recent review details
Configuration used: CodeRabbit UI Review profile: CHILL Plan: Pro
📥 Commits
Reviewing files that changed from the base of the PR and between 04ad502ce5e3149129428bbc451c8922c4d6cb8e and 3902909e8734f329e988d153bce55f4eb1d43353.
📒 Files selected for processing (2)
src/dashboard/Data/Browser/Browser.react.js(1 hunks)src/dashboard/Data/Browser/Browser.scss(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- src/dashboard/Data/Browser/Browser.scss
- src/dashboard/Data/Browser/Browser.react.js
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
🪧 Tips
Chat
There are 3 ways to chat with CodeRabbit:
- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
I pushed a fix in commit <commit_id>, please review it.Explain this complex logic.Open a follow-up GitHub issue for this discussion.
- Files and specific lines of code (under the "Files changed" tab): Tag
@coderabbitaiin a new review comment at the desired location with your query. Examples:@coderabbitai explain this code block.@coderabbitai modularize this function.
- PR comments: Tag
@coderabbitaiin a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.@coderabbitai read src/utils.ts and explain its main purpose.@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.@coderabbitai help me debug CodeRabbit configuration file.
Support
Need help? Create a ticket on our support page for assistance with any issues or questions.
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)
@coderabbitai pauseto pause the reviews on a PR.@coderabbitai resumeto resume the paused reviews.@coderabbitai reviewto trigger an incremental review. This is useful when automatic reviews are disabled for the repository.@coderabbitai full reviewto do a full review from scratch and review all the files again.@coderabbitai summaryto regenerate the summary of the PR.@coderabbitai generate sequence diagramto generate a sequence diagram of the changes in this PR.@coderabbitai resolveresolve all the CodeRabbit review comments.@coderabbitai configurationto show the current CodeRabbit configuration for the repository.@coderabbitai helpto get help.
Other keywords and placeholders
- Add
@coderabbitai ignoreanywhere in the PR description to prevent this PR from being reviewed. - Add
@coderabbitai summaryto generate the high-level summary at a specific location in the PR description. - Add
@coderabbitaianywhere in the PR title to generate the title automatically.
CodeRabbit Configuration File (.coderabbit.yaml)
- You can programmatically configure CodeRabbit by adding a
.coderabbit.yamlfile to the root of your repository. - Please see the configuration documentation for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation:
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
Documentation and Community
- Visit our Documentation for detailed information on how to use CodeRabbit.
- Join our Discord Community to get help, request features, and share feedback.
- Follow us on X/Twitter for updates and announcements.
Uffizzi Ephemeral Environment deployment-63199
:watch: Updated Apr 28, 2025, 01:37 UTC
:cloud: https://app.uffizzi.com/github.com/parse-community/parse-dashboard/pull/2737
:page_facing_up: View Application Logs etc.
What is Uffizzi? Learn more
Uffizzi Ephemeral Environment deployment-63378
:watch: Updated May 02, 2025, 14:49 UTC
:cloud: https://app.uffizzi.com/github.com/parse-community/parse-dashboard/pull/2737
:page_facing_up: View Application Logs etc.
What is Uffizzi? Learn more
Uffizzi Ephemeral Environment deployment-63859
:watch: Updated May 22, 2025, 17:16 UTC
:cloud: https://app.uffizzi.com/github.com/parse-community/parse-dashboard/pull/2737
:page_facing_up: View Application Logs etc.
What is Uffizzi? Learn more
I wonder how this has been implemented. It doesn't seem to be an actual column when looking at the HTML. It's also that the header cell for the row numbers doesn't have a distinct background color, it seems to be the checkbox header with a padding. Is there a reason for not creating a distinct column but effectively sharing the column with the checkbox? I think this custom approach may make it difficult later on add column pinning.
This is ready for re-review
cc: @mtrezza
Could it be that issue https://github.com/parse-community/parse-dashboard/pull/2737#pullrequestreview-2797839917 still exists?
Uffizzi Ephemeral Environment deployment-64349
:watch: Updated Jun 24, 2025, 00:06 UTC
:cloud: https://app.uffizzi.com/github.com/parse-community/parse-dashboard/pull/2737
:page_facing_up: View Application Logs etc.
What is Uffizzi? Learn more
Superseded by https://github.com/parse-community/parse-dashboard/pull/2878