Skip to content

feat: Add non-alphanumeric character detection in Cloud Config parameters#3143

Merged
mtrezza merged 4 commits intoparse-community:alphafrom
mtrezza:feat/detect-non-alphanum-char
Jan 23, 2026
Merged

feat: Add non-alphanumeric character detection in Cloud Config parameters#3143
mtrezza merged 4 commits intoparse-community:alphafrom
mtrezza:feat/detect-non-alphanum-char

Conversation

@mtrezza
Copy link
Member

@mtrezza mtrezza commented Jan 23, 2026

Pull Request

Feature

image

Summary by CodeRabbit

  • New Features

    • Non-alphanumeric character detection added to input fields with visual highlighting and an expandable info panel showing total counts, per-character breakdown, positions, and per-path locations for JSON values.
    • Detection enabled by default in array-entry and config editors.
  • Style

    • New info-badge and details panel styling (hover/expanded states).
  • Bug Fixes

    • Adjusted summary text pluralization for 0/1 counts.

✏️ Tip: You can customize this high-level summary in your review settings.

@parse-github-assistant
Copy link

parse-github-assistant bot commented Jan 23, 2026

🚀 Thanks for opening this pull request!

@parseplatformorg
Copy link
Contributor

parseplatformorg commented Jan 23, 2026

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

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@coderabbitai
Copy link

coderabbitai bot commented Jan 23, 2026

Warning

Rate limit exceeded

@mtrezza has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 1 minutes and 20 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📝 Walkthrough

Walkthrough

Adds non-alphanumeric detection and reporting to NonPrintableHighlighter: new exported utilities (hasNonAlphanumericChars, getNonAlphanumericChars, getNonAlphanumericCharsFromJson), a detectNonAlphanumeric prop, UI (info badge + details panel) and SCSS, and updates usages to enable the feature in dialog editors.

Changes

Cohort / File(s) Summary
NonPrintableHighlighter Component
src/components/NonPrintableHighlighter/NonPrintableHighlighter.react.js
Adds NON_ALPHANUMERIC_REGEX, stripQuotes(), hasNonAlphanumericChars(), getNonAlphanumericChars(), getNonAlphanumericCharsFromJson(); exposes detectNonAlphanumeric prop; adds state showNonAlphanumericDetails, UI to toggle and render per-character non-alphanumeric breakdown (labels, codes, counts, positions, locations); minor pluralization tweak; preserves existing non-printable logic.
NonPrintableHighlighter Styling
src/components/NonPrintableHighlighter/NonPrintableHighlighter.scss
Adds .infoContainer, .infoBadge, .infoIcon, .infoText, .infoDetailsPanel, .charLabelInfo and hover/expanded styles for the info badge and details panel.
Config Dialog Usages
src/dashboard/Data/Config/AddArrayEntryDialog.react.js, src/dashboard/Data/Config/ConfigDialog.react.js
Updated NonPrintableHighlighter invocations to pass detectNonAlphanumeric={true} (applied to string/object/array editors); small dropdown value handling change in ConfigDialog.react.js (stringified option values and Number conversion on change).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is largely incomplete, containing only a boilerplate header, security/license links, and a screenshot without any substantive details about the implementation. Complete the description by filling in the Issue reference, providing an Approach section explaining the implementation changes, and documenting whether tests and documentation were added.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main feature being added: non-alphanumeric character detection in Cloud Config parameters, which aligns with the core changeset.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

Comment @coderabbitai help to get the list of available commands and usage tips.

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

🤖 Fix all issues with AI agents
In `@src/components/NonPrintableHighlighter/NonPrintableHighlighter.react.js`:
- Around line 148-155: The function stripQuotes uses double-quoted string
literals causing lint failures; update the quote characters to single quotes in
the startsWith/endsWith checks and anywhere else in stripQuotes that uses double
quotes (e.g., change '"' to "'" and vice versa as appropriate), keeping the same
logic that returns str.slice(1, -1) when matching single or double quotes and
otherwise returns the original value; ensure you only modify string literal
quote characters and not the function logic.

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

🤖 Fix all issues with AI agents
In `@src/components/NonPrintableHighlighter/NonPrintableHighlighter.react.js`:
- Around line 144-157: stripQuotes currently strips matching leading/trailing
quotes even for a single-character quoted string (e.g. "'" or '"'), producing an
empty string and hiding the lone quote; update stripQuotes to only remove
matching surrounding single or double quotes when the input length is >= 2 (e.g.
check str.length >= 2) so that lone quote characters are returned unchanged,
leaving the function behavior otherwise intact.
- Around line 388-398: The non‑alphanumeric detection currently runs on the raw
JSON when isJson is true and thus falsely flags punctuation; update render() so
detectNonAlphanumeric only runs when !isJson (or alternatively call a JSON‑aware
helper you add). Concretely, change the nonAlphanumericResult/hasNonAlphanumeric
logic in render() (referencing detectNonAlphanumeric, isJson,
getNonAlphanumericChars and getNonPrintableCharsFromJson) to skip or use a
JSON‑aware routine when isJson is true so object/array punctuation isn’t
reported.
🧹 Nitpick comments (1)
src/components/NonPrintableHighlighter/NonPrintableHighlighter.react.js (1)

439-470: Make the info badge keyboard‑accessible.
This is a clickable <div> without keyboard support, so the details panel can’t be opened via keyboard. Consider button semantics or add role="button", tabIndex, and a key handler.

♿ Example accessibility patch
-            <div
-              className={`${styles.infoBadge} ${this.state.showNonAlphanumericDetails ? styles.expanded : ''}`}
-              onClick={() => this.setState({ showNonAlphanumericDetails: !this.state.showNonAlphanumericDetails })}
-              title="Click for details"
-            >
+            <div
+              className={`${styles.infoBadge} ${this.state.showNonAlphanumericDetails ? styles.expanded : ''}`}
+              role="button"
+              tabIndex={0}
+              onClick={() => this.setState({ showNonAlphanumericDetails: !this.state.showNonAlphanumericDetails })}
+              onKeyDown={e => {
+                if (e.key === 'Enter' || e.key === ' ') {
+                  e.preventDefault();
+                  this.setState({ showNonAlphanumericDetails: !this.state.showNonAlphanumericDetails });
+                }
+              }}
+              title="Click for details"
+            >

@mtrezza mtrezza changed the title feat: Detect non-alphanumeric characters when in Cloud Config parameters feat: Add non-alphanumeric character detection in Cloud Config parameters Jan 23, 2026
@mtrezza mtrezza merged commit 1594ec8 into parse-community:alpha Jan 23, 2026
12 checks passed
parseplatformorg pushed a commit that referenced this pull request Jan 23, 2026
# [8.3.0-alpha.24](8.3.0-alpha.23...8.3.0-alpha.24) (2026-01-23)

### Features

* Add non-alphanumeric character detection in Cloud Config parameters ([#3143](#3143)) ([1594ec8](1594ec8))
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 8.3.0-alpha.24

@parseplatformorg parseplatformorg added the state:released-alpha Released as alpha version label Jan 23, 2026
@mtrezza mtrezza deleted the feat/detect-non-alphanum-char branch January 23, 2026 17:56
parseplatformorg pushed a commit that referenced this pull request Feb 5, 2026
# [8.3.0](8.2.0...8.3.0) (2026-02-05)

### Bug Fixes

* Canvas graph element does not apply data filter option ([#3128](#3128)) ([00ff1aa](00ff1aa))
* Canvas is not expandable or scrollable beyond current view size ([#3140](#3140)) ([cb73122](cb73122))
* Cloud Config parameter modal cannot scroll when content scales beyond visible area ([#3124](#3124)) ([bb6de31](bb6de31))
* Context menu of header cell in info panel does not group related records by class name ([#3122](#3122)) ([230c1e2](230c1e2))
* Context menu sub-menu in data browser vertically misaligned when scrolling in parent menu ([#3120](#3120)) ([2acaa27](2acaa27))
* Dashboard crashes when adding Parse Pointer JSON to array field in data browser ([#3125](#3125)) ([70bf081](70bf081))
* Data browser graph requires value field even when calculated value is defined ([#3127](#3127)) ([53e4f2b](53e4f2b))
* Graph in canvas ignores date filter constraints ([#3137](#3137)) ([6d8b8e6](6d8b8e6))
* Group-by not using custom aggregation type for single-series graph ([#3159](#3159)) ([b8e8891](b8e8891))
* Incorrect percentage and average calculation for calculated values in graphs ([#3152](#3152)) ([14b4d48](14b4d48))
* Info panel auto-scrolling not pausing during UI interaction like text selection or context menu display ([#3165](#3165)) ([bfe4e8a](bfe4e8a))
* Name of calculated value in data browser graph allows leading and trailing spaces ([#3132](#3132)) ([9493b18](9493b18))
* Optimize data browser cell context menu grouping and readability ([#3141](#3141)) ([5c711e1](5c711e1))
* Security upgrade react-router and react-router-dom ([#3107](#3107)) ([b76b9d1](b76b9d1))
* Setting a keyboard shortcut to its default value creates an unnecessary dashboard config storage entry ([#3173](#3173)) ([4949053](4949053))

### Features

* Add auto-scrolling for info panels ([#3149](#3149)) ([3cd8197](3cd8197))
* Add canvas tree to sidebar instead of loading dialog and favorite functionality ([#3146](#3146)) ([e58dc82](e58dc82))
* Add cloning of element in canvas ([#3144](#3144)) ([dec06ad](dec06ad))
* Add context menu in data browser to add cell content or selected text to Cloud Config parameter ([#3123](#3123)) ([9bc5197](9bc5197))
* Add context menu in data browser to get related records from String and Number fields ([#3118](#3118)) ([824bebd](824bebd))
* Add context menu item to get related records for selected text in data browser cell ([#3142](#3142)) ([33d3595](33d3595))
* Add custom dashboard canvas with graphs and data tables ([#3126](#3126)) ([d45c27b](d45c27b))
* Add customizable styles for line and bar series in data browser graph ([#3131](#3131)) ([501dd4b](501dd4b))
* Add customizable Y-axis titles for data browser graphs ([#3130](#3130)) ([2946e64](2946e64))
* Add dialog to execute Cloud Job with parameters ([#3158](#3158)) ([da419e0](da419e0))
* Add expanded view for canvas elements graph, table, view ([#3156](#3156)) ([0ffd767](0ffd767))
* Add field `objectId` to get related records context menu in data browser ([#3161](#3161)) ([2847ccf](2847ccf))
* Add formula-based calculated value to data browser graph ([#3129](#3129)) ([7c5d1b3](7c5d1b3))
* Add keyboard shortcut for executing script on selected rows in data browser ([#3171](#3171)) ([75389ad](75389ad))
* Add more customization options for graphs in canvas ([#3134](#3134)) ([ddbd666](ddbd666))
* Add non-alphanumeric character detection in Cloud Config parameters ([#3143](#3143)) ([1594ec8](1594ec8))
* Add quick-remove button to array parameter in Cloud Config ([#3121](#3121)) ([b632074](b632074))
* Add support for server side storage of Cloud Config parameter history ([#3169](#3169)) ([964e540](964e540))
* Allow adding View elements to canvas ([#3133](#3133)) ([2f2ae9a](2f2ae9a))
* Allow to favorite canvas for quick-access via sidebar menu ([#3135](#3135)) ([1e3a3c7](1e3a3c7))
* Allow to pause auto-scroll of info panel by holding the Option key ([#3160](#3160)) ([db38f14](db38f14))
* Allow to use ESC key to cancel, Cmd + Enter key to submit, Tab key to navigate a modal dialog ([#3172](#3172)) ([debdc09](debdc09))
* Detect and warn about unprintable characters in Cloud Config parameter values ([#3119](#3119)) ([26c909c](26c909c))
* Improve usability and layout of canvas and elements ([#3148](#3148)) ([cd654dc](cd654dc))
* Optimize appearance of graph tick labels on x-axis for date values ([#3147](#3147)) ([a9edcaf](a9edcaf))
* Optimize canvas menu organization ([#3145](#3145)) ([1558826](1558826))
* Replace graph fields with graph series for more customization ([#3157](#3157)) ([51feba4](51feba4))
* Various improvements for auto-scrolling info panel ([#3151](#3151)) ([423d83a](423d83a))
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.

2 participants