parse-dashboard icon indicating copy to clipboard operation
parse-dashboard copied to clipboard

feat: Add row number to data browser

Open dblythy opened this issue 7 months ago • 14 comments

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.

dblythy avatar Apr 09 '25 11:04 dblythy

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-cloud[bot] avatar Apr 09 '25 11:04 uffizzi-cloud[bot]

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

uffizzi-cloud[bot] avatar Apr 13 '25 14:04 uffizzi-cloud[bot]

: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)

parseplatformorg avatar Apr 26 '25 10:04 parseplatformorg

📝 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.

❤️ Share
🪧 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 @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in 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 pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file 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.

coderabbitai[bot] avatar Apr 28 '25 01:04 coderabbitai[bot]

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-cloud[bot] avatar Apr 28 '25 01:04 uffizzi-cloud[bot]

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-cloud[bot] avatar May 02 '25 14:05 uffizzi-cloud[bot]

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

uffizzi-cloud[bot] avatar May 22 '25 17:05 uffizzi-cloud[bot]

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.

mtrezza avatar May 24 '25 13:05 mtrezza

This is ready for re-review

dblythy avatar Jun 18 '25 09:06 dblythy

cc: @mtrezza

dblythy avatar Jun 22 '25 05:06 dblythy

Could it be that issue https://github.com/parse-community/parse-dashboard/pull/2737#pullrequestreview-2797839917 still exists?

mtrezza avatar Jun 24 '25 00:06 mtrezza

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

uffizzi-cloud[bot] avatar Jun 24 '25 00:06 uffizzi-cloud[bot]

Superseded by https://github.com/parse-community/parse-dashboard/pull/2878

mtrezza avatar Jul 09 '25 13:07 mtrezza