Skip to content

Conversation

mtrezza
Copy link
Member

@mtrezza mtrezza commented Jul 9, 2025

Summary

  • add ability to toggle a row number column in the data browser
  • compute row number based on skip/limit
  • pass new props through data browser components
  • style row number column and header

Testing

  • npm test (fails: jest not found)
  • npm run lint (fails: cannot find module 'eslint/config')

https://chatgpt.com/codex/tasks/task_e_686e65027e58832d959c26859e50029e

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features

    • Added the ability to display row numbers in data tables, including a toggle option in the context menu.
    • Row numbers are shown in a sticky column next to the checkbox, with locale-specific formatting and adjustable column width.
  • Style

    • Introduced new styling for row number columns and cells to ensure consistent appearance.
    • Improved formatting and consistency in CSS and code for better readability.

Closes: #2484

Copy link

parse-github-assistant bot commented Jul 9, 2025

🚀 Thanks for opening this pull request!

Copy link

The label codex cannot be used here.

Copy link

coderabbitai bot commented Jul 9, 2025

Caution

Review failed

The pull request is closed.

📝 Walkthrough
## Walkthrough

Row number display functionality has been introduced to the data browser table. This includes new props, state, and UI elements to render a sticky row number column, as well as context menu actions to toggle its visibility. Supporting style classes and layout calculations were updated to accommodate the new column.

## Changes

| File(s)                                                                                  | Change Summary                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
|------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| src/components/BrowserRow/BrowserRow.react.js                                            | Added support for `showRowNumber`, `rowNumberWidth`, and `skip` props. Renders a sticky row number cell when enabled, with locale formatting and correct positioning.                                                                                                                                                                                                                                                                                                                                                                                                                        |
| src/components/DataBrowserHeaderBar/DataBrowserHeaderBar.react.js                        | Extended context menu to toggle row number display. Added row number header cell rendering logic and styling when enabled.                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| src/components/DataBrowserHeaderBar/DataBrowserHeaderBar.scss                            | Added `.rowNumber` CSS class for header cell. Minor formatting and whitespace corrections.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| src/dashboard/Data/Browser/Browser.react.js                                              | Formatting and style fixes only (quotes, indentation, semicolons). Added missing `skip` prop to `DataBrowser` instantiation. No logic changes.                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| src/dashboard/Data/Browser/Browser.scss                                                  | Added `.rowNumberCell` CSS class for row number cells. Lowercased hex codes and improved formatting.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| src/dashboard/Data/Browser/BrowserTable.react.js                                         | Added calculation and usage of `rowNumberWidth`. Updated layout offsets and row width calculations. Passed `showRowNumber`, `rowNumberWidth`, and `skip` props to children. Integrated with header bar and row components.                                                                                                                                                                                                                                                                                                                                                                   |
| src/dashboard/Data/Browser/DataBrowser.react.js                                          | Introduced `showRowNumber` state and `setShowRowNumber` method. Passed these and `skip`/`limit` props to `BrowserTable`. Minor formatting cleanups.                                                                                                                                                                                                                                                                                                                                                                                                                                          |

## Sequence Diagram(s)

```mermaid
sequenceDiagram
    participant User
    participant DataBrowser
    participant BrowserTable
    participant DataBrowserHeaderBar
    participant BrowserRow

    User->>DataBrowser: Open table view
    DataBrowser->>BrowserTable: Pass showRowNumber, setShowRowNumber, skip, limit
    BrowserTable->>DataBrowserHeaderBar: Pass showRowNumber, setShowRowNumber, rowNumberWidth
    BrowserTable->>BrowserRow: Pass showRowNumber, rowNumberWidth, skip (for each row)
    User->>DataBrowserHeaderBar: Open context menu, toggle row number
    DataBrowserHeaderBar->>DataBrowser: Call setShowRowNumber(newValue)
    DataBrowser->>BrowserTable: Update showRowNumber prop
    BrowserTable->>DataBrowserHeaderBar: Update header rendering
    BrowserTable->>BrowserRow: Update row rendering (show/hide row number)

Assessment against linked issues

Objective Addressed Explanation
Add a sticky row number column to the data browser table (#2484)
Provide a context menu toggle to show/hide the row number column (#2484)
Ensure row number column is always visible regardless of horizontal scroll (#2484)
Pass necessary props and state to support row number rendering across components (#2484)

Assessment against linked issues: Out-of-scope changes

No out-of-scope changes detected related to the objectives from the linked issues.


</details>

<!-- walkthrough_end -->
<!-- This is an auto-generated comment: all tool run failures by coderabbit.ai -->

> [!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.
> 
> <details>
> <summary>🔧 ESLint</summary>
> 
> > 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: C00CC8D6E17F0000: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-07-09T14_31_46_614Z-debug-0.log
> 
> 
> 
> </details>

<!-- end of auto-generated comment: all tool run failures by coderabbit.ai -->
<!-- internal state start -->


<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEYDEZyAAUASpETZWaCrKNwSPbABsvkCiQBHbGlcSHFcLzpIACIAMxJqLgBBWnoKfAB3SAxHAUoFL0csAkhaajRIAXSMxEoAGmj7bAFmdRp6OUhsWr5mXH8ALwGKtGRbbNz8gCYADgB2GbqUDH7FbAZpdGySLPjqbH8w/DDYDzLcCqrMno0YBGQ93AOPNB9rrp7kEoIiIkit6oTZh5PhMQrMLAZdQIYqnUrlSrVHrLGgUWJoDa3dx+TJAkHIZweJjMbh4KK0WQYNCtBivLzyASjKL4WFEg7+FY8NBEeBU8QsrlUNioxBLRDcUTwWLwWk+eS4OGIADW8G46Aw9C88FaoQkr2CiCxcO13EibBW1HgAt5EnwXikyG4o0QvKI2yyvHwEoo4k2CvS2CIsBOZwRVxq+WJ3BZ7C+xwc3GjPp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GUH4vRdhQwKtwwHMCD7EIjwN5HFAMN7gKN/+BN2BFN3QEG+9foEAA== -->

<!-- internal state end -->

---

<details>
<summary>📜 Recent review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**
**Plan: Pro**


<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 9b3a7b64b101e954540390008da156cd7c7e9f6c and 82d123efb12600748048576b4afc7ea0d4b35d04.

</details>

<details>
<summary>📒 Files selected for processing (2)</summary>

* `src/dashboard/Data/Browser/Browser.react.js` (11 hunks)
* `src/dashboard/Data/Browser/DataBrowser.react.js` (7 hunks)

</details>

</details>
<!-- tips_start -->

---

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.

<details>
<summary>❤️ Share</summary>

- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)
- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)
- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)
- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)

</details>

<details>
<summary>🪧 Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=parse-community/parse-dashboard&utm_content=2878):

- 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](https://www.coderabbit.ai/contact-us/support) 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 auto-generate unit tests` to generate unit tests for 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](https://docs.coderabbit.ai/guides/configure-coderabbit) 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](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->

@parseplatformorg
Copy link
Contributor

parseplatformorg commented Jul 9, 2025

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

@mtrezza mtrezza changed the title Add row number option to data browser feat: Add row number column to data browser Jul 9, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 92ce7a5 and 9d6d7af.

📒 Files selected for processing (7)
  • src/components/BrowserRow/BrowserRow.react.js (3 hunks)
  • src/components/DataBrowserHeaderBar/DataBrowserHeaderBar.react.js (3 hunks)
  • src/components/DataBrowserHeaderBar/DataBrowserHeaderBar.scss (3 hunks)
  • src/dashboard/Data/Browser/Browser.react.js (12 hunks)
  • src/dashboard/Data/Browser/Browser.scss (10 hunks)
  • src/dashboard/Data/Browser/BrowserTable.react.js (7 hunks)
  • src/dashboard/Data/Browser/DataBrowser.react.js (7 hunks)
🧰 Additional context used
🧠 Learnings (4)
src/dashboard/Data/Browser/Browser.react.js (1)
Learnt from: mtrezza
PR: parse-community/parse-dashboard#2828
File: src/dashboard/Data/Browser/Browser.react.js:1605-1607
Timestamp: 2025-05-27T12:09:47.644Z
Learning: In script execution dialogs in Parse Dashboard (specifically the `confirmExecuteScriptRows` method in `src/dashboard/Data/Browser/Browser.react.js`), individual `setState` calls to update `processedScripts` counter should be kept as-is rather than batched, because this provides real-time progress feedback to users in the dialog UI.
src/dashboard/Data/Browser/DataBrowser.react.js (1)
Learnt from: mtrezza
PR: parse-community/parse-dashboard#2828
File: src/dashboard/Data/Browser/Browser.react.js:1605-1607
Timestamp: 2025-05-27T12:09:47.644Z
Learning: In script execution dialogs in Parse Dashboard (specifically the `confirmExecuteScriptRows` method in `src/dashboard/Data/Browser/Browser.react.js`), individual `setState` calls to update `processedScripts` counter should be kept as-is rather than batched, because this provides real-time progress feedback to users in the dialog UI.
src/components/DataBrowserHeaderBar/DataBrowserHeaderBar.react.js (1)
Learnt from: mtrezza
PR: parse-community/parse-dashboard#2828
File: src/dashboard/Data/Browser/Browser.react.js:1605-1607
Timestamp: 2025-05-27T12:09:47.644Z
Learning: In script execution dialogs in Parse Dashboard (specifically the `confirmExecuteScriptRows` method in `src/dashboard/Data/Browser/Browser.react.js`), individual `setState` calls to update `processedScripts` counter should be kept as-is rather than batched, because this provides real-time progress feedback to users in the dialog UI.
src/dashboard/Data/Browser/BrowserTable.react.js (1)
Learnt from: mtrezza
PR: parse-community/parse-dashboard#2828
File: src/dashboard/Data/Browser/Browser.react.js:1605-1607
Timestamp: 2025-05-27T12:09:47.644Z
Learning: In script execution dialogs in Parse Dashboard (specifically the `confirmExecuteScriptRows` method in `src/dashboard/Data/Browser/Browser.react.js`), individual `setState` calls to update `processedScripts` counter should be kept as-is rather than batched, because this provides real-time progress feedback to users in the dialog UI.
🪛 GitHub Check: Lint
src/components/BrowserRow/BrowserRow.react.js

[failure] 93-93:
Expected indentation of 14 spaces but found 16


[failure] 92-92:
Expected indentation of 16 spaces but found 18


[failure] 91-91:
Expected indentation of 16 spaces but found 18


[failure] 90-90:
Expected indentation of 16 spaces but found 18


[failure] 89-89:
Expected indentation of 16 spaces but found 18


[failure] 88-88:
Expected indentation of 16 spaces but found 18


[failure] 113-113:
Expected indentation of 18 spaces but found 20


[failure] 112-112:
Expected indentation of 18 spaces but found 20


[failure] 111-111:
Expected indentation of 18 spaces but found 20


[failure] 110-110:
Expected indentation of 18 spaces but found 20

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Docker linux/amd64
🔇 Additional comments (32)
src/dashboard/Data/Browser/DataBrowser.react.js (5)

53-53: LGTM: Row number state initialized correctly.

The showRowNumber state is properly initialized to false, which is a sensible default.


73-73: LGTM: Method binding follows consistent pattern.

The setShowRowNumber method binding follows the same pattern as other methods in the constructor.


557-559: LGTM: Simple state setter implementation.

The setShowRowNumber method is correctly implemented as a simple state setter.


676-679: LGTM: Props passed to support row number functionality.

The necessary props (showRowNumber, setShowRowNumber, skip, limit) are correctly passed to the BrowserTable component to enable the row number feature.


302-305: LGTM: Improved code formatting for readability.

The formatting changes improve readability by properly structuring the ternary operator for field value extraction.

src/dashboard/Data/Browser/Browser.react.js (10)

664-664: LGTM: Consistent string formatting.

Changed from single quotes to double quotes around the ID for consistency with other similar messages in the codebase.


767-767: LGTM: Consistent string formatting.

The string formatting change maintains consistency with other success messages throughout the codebase.


911-911: LGTM: Added missing semicolon.

Good catch adding the missing semicolon after the object property.


1273-1273: LGTM: Consistent string formatting.

The string formatting change maintains consistency with other update messages.


1401-1401: LGTM: Consistent string formatting for error messages.

All error message formatting changes maintain consistency by using double quotes around IDs.

Also applies to: 1429-1429, 1446-1446


1601-1609: LGTM: Improved Promise formatting.

The Promise chain formatting is improved for better readability with proper indentation and structure.


1636-1639: LGTM: Improved method call formatting.

The multi-line method call formatting improves readability.

Also applies to: 1644-1647


1968-1968: LGTM: Consistent formatting.

Minor formatting improvement for the method call.


1989-1989: LGTM: Smooth scrolling behavior added.

Adding behavior: 'smooth' provides better UX when scrolling to the top of the page.


2212-2212: LGTM: Critical prop addition for row number feature.

The skip prop is essential for the row number feature to calculate correct row numbers based on pagination parameters.

src/components/DataBrowserHeaderBar/DataBrowserHeaderBar.scss (5)

21-21: LGTM: Minor formatting improvement.

The webkit-transform property formatting is improved for consistency.


56-57: LGTM: Added missing background color.

The background color addition to the .check class maintains visual consistency.


59-68: LGTM: Well-designed row number header styling.

The new .rowNumber class provides appropriate styling for the row number column header with:

  • Proper dimensions (30px height, line-height)
  • Right text alignment for numbers
  • Consistent background color matching the header theme
  • Appropriate border and padding
  • Box-sizing for proper layout

The styling integrates well with the existing design system.


104-104: LGTM: Added missing width property.

The width: 100% property ensures the skeleton row spans the full width correctly.


111-111: LGTM: Formatting improvements.

The added empty line and background-color property improve code organization and completeness.

Also applies to: 114-114

src/components/BrowserRow/BrowserRow.react.js (1)

36-38: LGTM: New props properly added for row number functionality.

The new props showRowNumber, rowNumberWidth, and skip are correctly added to support the row number feature implementation.

src/dashboard/Data/Browser/Browser.scss (2)

113-122: LGTM: Well-designed CSS class for row number cells.

The .rowNumberCell class is properly styled with:

  • Appropriate display, height, and alignment properties
  • Consistent border styling with other table cells
  • Right-aligned text for number display
  • Proper padding and box-sizing

37-37: LGTM: Hex color code normalization.

Good practice to normalize hex color codes to lowercase for consistency.

Also applies to: 54-54, 72-72, 75-75, 99-99, 237-237, 238-238

src/components/DataBrowserHeaderBar/DataBrowserHeaderBar.react.js (3)

18-35: LGTM: Context menu properly implements row number toggle.

The context menu enhancement is well implemented:

  • Dynamic text based on current showRowNumber state
  • Proper callback to toggle the state
  • Maintains existing freeze/unfreeze functionality
  • Clean array structure for menu items

54-55: LGTM: New props properly added.

The showRowNumber and rowNumberWidth props are correctly added to the destructuring assignment.


69-83: LGTM: Row number header cell implementation is consistent.

The header cell implementation is excellent:

  • Proper conditional rendering based on showRowNumber
  • Consistent styling with checkbox cell (sticky positioning, z-index)
  • Appropriate left offset (30px) to align with row number cells
  • Clean use of CSS classes and inline styles
  • Simple "#" symbol is appropriate for row numbers
src/dashboard/Data/Browser/BrowserTable.react.js (6)

124-128: LGTM: Row number width calculation is logical.

The width calculation is well-designed:

  • Uses maximum row number (skip + data length or limit) for accurate sizing
  • Multiplies character count by 8 pixels plus 16 for padding
  • Conditional calculation based on showRowNumber state
  • Returns 0 when disabled to avoid layout issues

129-138: LGTM: Sticky positioning correctly accounts for row number width.

The sticky left calculation properly includes rowNumberWidth in the initial offset (30 + rowNumberWidth), ensuring proper alignment of frozen columns.


142-146: LGTM: Row width calculation properly includes row number width.

The total row width calculation correctly includes rowNumberWidth to ensure proper table layout and scrolling behavior.


181-183: LGTM: Row number props consistently passed to all BrowserRow instances.

All BrowserRow instances (edit clone rows, new row, and data rows) properly receive the showRowNumber, rowNumberWidth, and skip props for consistent behavior.

Also applies to: 267-269, 364-366


465-465: LGTM: Editor positioning correctly updated for row number width.

The editor's wrapLeft calculation properly accounts for the row number width (30 + rowNumberWidth), ensuring the editor appears in the correct position.


597-599: LGTM: DataBrowserHeaderBar receives necessary row number props.

The header bar component properly receives showRowNumber, setShowRowNumber, and rowNumberWidth props to render the header and provide toggle functionality.

Comment on lines 104 to 122
{showRowNumber && (
<span
className={styles.rowNumberCell}
style={
freezeIndex >= 0
? {
position: 'sticky',
left: 30,
zIndex: 1,
background: rowBackground,
borderBottom: '1px solid #e3e3ea',
width: rowNumberWidth,
}
: { width: rowNumberWidth }
}
>
{row >= 0 ? (skip + row + 1).toLocaleString() : ''}
</span>
)}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Row number cell implementation looks good, but fix indentation issues.

The row number cell logic is correctly implemented:

  • Proper conditional rendering based on showRowNumber
  • Correct calculation: (skip + row + 1) for pagination
  • Appropriate styling with sticky positioning matching checkbox cell
  • Good use of toLocaleString() for number formatting

However, there are indentation issues that need to be addressed.

Apply this diff to fix the indentation:

         {showRowNumber && (
           <span
             className={styles.rowNumberCell}
             style={
               freezeIndex >= 0
                 ? {
-                    position: 'sticky',
-                    left: 30,
-                    zIndex: 1,
-                    background: rowBackground,
-                    borderBottom: '1px solid #e3e3ea',
-                    width: rowNumberWidth,
-                  }
+                  position: 'sticky',
+                  left: 30,
+                  zIndex: 1,
+                  background: rowBackground,
+                  borderBottom: '1px solid #e3e3ea',
+                  width: rowNumberWidth,
+                }
                 : { width: rowNumberWidth }
             }
           >
             {row >= 0 ? (skip + row + 1).toLocaleString() : ''}
           </span>
         )}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{showRowNumber && (
<span
className={styles.rowNumberCell}
style={
freezeIndex >= 0
? {
position: 'sticky',
left: 30,
zIndex: 1,
background: rowBackground,
borderBottom: '1px solid #e3e3ea',
width: rowNumberWidth,
}
: { width: rowNumberWidth }
}
>
{row >= 0 ? (skip + row + 1).toLocaleString() : ''}
</span>
)}
{showRowNumber && (
<span
className={styles.rowNumberCell}
style={
freezeIndex >= 0
? {
position: 'sticky',
left: 30,
zIndex: 1,
background: rowBackground,
borderBottom: '1px solid #e3e3ea',
width: rowNumberWidth,
}
: { width: rowNumberWidth }
}
>
{row >= 0 ? (skip + row + 1).toLocaleString() : ''}
</span>
)}
🧰 Tools
🪛 GitHub Check: Lint

[failure] 113-113:
Expected indentation of 18 spaces but found 20


[failure] 112-112:
Expected indentation of 18 spaces but found 20


[failure] 111-111:
Expected indentation of 18 spaces but found 20


[failure] 110-110:
Expected indentation of 18 spaces but found 20

🤖 Prompt for AI Agents
In src/components/BrowserRow/BrowserRow.react.js between lines 104 and 122, the
row number cell JSX block has inconsistent indentation. Fix the indentation by
aligning the opening and closing tags and nested properties properly, ensuring
each nested level is indented uniformly for better readability and
maintainability.

@mtrezza mtrezza mentioned this pull request Jul 9, 2025
4 tasks
@mtrezza mtrezza merged commit c0aa407 into alpha Jul 9, 2025
7 of 11 checks passed
@mtrezza mtrezza deleted the codex/add-row-number-column-to-data-browser branch July 9, 2025 14:32
parseplatformorg pushed a commit that referenced this pull request Jul 9, 2025
# [7.3.0-alpha.6](7.3.0-alpha.5...7.3.0-alpha.6) (2025-07-09)

### Features

* Add row number column to data browser ([#2878](#2878)) ([c0aa407](c0aa407))
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 7.3.0-alpha.6

@parseplatformorg parseplatformorg added the state:released-alpha Released as alpha version label Jul 9, 2025
parseplatformorg pushed a commit that referenced this pull request Aug 1, 2025
# [7.3.0](7.2.1...7.3.0) (2025-08-01)

### Bug Fixes

* Changing "Relative dates" option of saved filter does not enable save button ([#2947](#2947)) ([4f4977d](4f4977d))
* Class object counters in sidebar not updating ([#2950](#2950)) ([0f1920b](0f1920b))
* Clicking linked pointer with Cmd key in view table doesn't open page in new browser tab ([#2902](#2902)) ([101b194](101b194))
* Fails to generate MFA code with CLI command `parse-dashboard --createMFA` ([#2883](#2883)) ([544df1f](544df1f))
* Gracefully fail when trying to get new features in latest version of dashboard ([#2880](#2880)) ([1969a0e](1969a0e))
* Header checkbox in data browser does not indicate when a few rows are selected ([#2957](#2957)) ([e4ab666](e4ab666))
* Hyperlink in Views table ignores `urlQuery` key ([#2926](#2926)) ([c5eedf4](c5eedf4))
* Incorrect table cell width in App Settings table ([#2933](#2933)) ([d46765b](d46765b))
* Info panel scroll-to-top setting not persistent across dashboard sessions ([#2938](#2938)) ([2b78087](2b78087))
* Invalid clipboard content for multi-cell copy in data browser ([#2882](#2882)) ([22a2065](22a2065))
* Legacy filters without `filterId` cannot be deleted in data browser ([#2946](#2946)) ([65df9d6](65df9d6))
* Legacy filters without `filterId` do not appear in sidebar ([#2945](#2945)) ([fde3769](fde3769))
* Modal text input can be resized smaller than its cell in Safari browser ([#2930](#2930)) ([82a0cdc](82a0cdc))
* Move settings button on data browser toolbar for better UI ([#2940](#2940)) ([c473ce6](c473ce6))
* Pagination footer bar hides rows in data browser ([#2879](#2879)) ([6bc2da8](6bc2da8))
* Race condition on info panel request shows info panel data not corresponding to selected cell ([#2909](#2909)) ([6f45bb3](6f45bb3))
* Saved legacy filter in data browser cannot be deleted or cloned ([#2944](#2944)) ([15da90d](15da90d))
* Saved legacy filter with classname in query cannot be deleted ([#2948](#2948)) ([05ee5b3](05ee5b3))
* Selected text in info panel cannot be copied using Ctrl+C ([#2951](#2951)) ([0164c19](0164c19))
* Views not sorted alphabetically in sidebar ([#2943](#2943)) ([4c81fe4](4c81fe4))
* Warning dialog is shown after executing script on selected rows ([#2899](#2899)) ([027f1ed](027f1ed))

### Features

* Add additional values in info panel key-value element ([#2904](#2904)) ([a8f110e](a8f110e))
* Add AI agent for natural language interaction with Parse Server ([#2954](#2954)) ([32bd6e8](32bd6e8))
* Add clipboard icon to copy value of key-value element in info panel ([#2871](#2871)) ([7862c42](7862c42))
* Add Cloud Function as data source for views with optional text or file upload ([#2939](#2939)) ([f5831c7](f5831c7))
* Add column freezing in data browser ([#2877](#2877)) ([29f4a88](29f4a88))
* Add custom data views with aggregation query ([#2888](#2888)) ([b1679db](b1679db))
* Add environment variable support for AI agent configuration ([#2956](#2956)) ([2ac9e7e](2ac9e7e))
* Add hyperlink support in Views table ([#2925](#2925)) ([06cfc11](06cfc11))
* Add inclusive date filters "is on or after", "is on or before" in data browser ([#2929](#2929)) ([c8d621b](c8d621b))
* Add quick-add button to array parameter in Cloud Config ([#2866](#2866)) ([e98ccb2](e98ccb2))
* Add row number column to data browser ([#2878](#2878)) ([c0aa407](c0aa407))
* Add Settings menu to scroll info panel to top when browsing through rows ([#2937](#2937)) ([f339cb8](f339cb8))
* Add support for "not equal to" filter for Boolean values in data browser and analytics explorer ([#2914](#2914)) ([d55b89c](d55b89c))
* Add support for `Image` type in View table to display images ([#2952](#2952)) ([6a6b1f0](6a6b1f0))
* Add type mismatch warning when quick-adding entry to Cloud Config array parameter ([#2875](#2875)) ([bb1837f](bb1837f))
* Add view edit icon to views list in sidebar ([#2901](#2901)) ([96e33b9](96e33b9))
* Allow editing filter without loading data in data browser ([#2949](#2949)) ([9623580](9623580))
* Allow editing saved filters in data browser ([#2942](#2942)) ([daaccaa](daaccaa))
* Allow freeform text view resizing in modal dialogs ([#2910](#2910)) ([1399162](1399162))
* Persist info panel visibility when navigating across classes in data browser ([#2908](#2908)) ([1a3610a](1a3610a))
* Prefetch info panel data with config options `prefetchObjects` and `prefetchStale` ([#2915](#2915)) ([54a8156](54a8156))
* Warn when leaving data browser page with selected rows ([#2887](#2887)) ([206ead1](206ead1))

### Performance Improvements

* Add config option `enableResourceCache` to cache dashboard resources locally for faster loading in additional browser tabs ([#2920](#2920)) ([41a4963](41a4963))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state:released-alpha Released as alpha version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add row number to data browser
2 participants