Skip to content

Conversation

@RajPrakash681
Copy link
Contributor

@RajPrakash681 RajPrakash681 commented Oct 25, 2025

Description

Fixes O3-3875 - JSON editor in form builder does not show error indicator in deployed environments (dev3, test3, o3 demo).

Problem

The JSON schema editor was not displaying error indicators (red X icons in the gutter and error markers) in production deployments, though it worked correctly in local development. This was due to:

  1. Webpack bundling issue: The ace-builds/webpack-resolver relies on dynamic imports that don't work in production builds
  2. Missing annotations: The editor was only using markers (line highlighting) but not annotations (gutter icons)

Solution

  1. Static imports: Replaced dynamic webpack-resolver with explicit static imports for mode-json and theme-textmate to ensure assets are bundled correctly
  2. Annotations support: Added annotations state and generation logic to display error icons in the editor gutter

Changes

  • Modified src/components/schema-editor/schema-editor.component.tsx:
    • Replaced ace-builds/webpack-resolver with static imports
    • Added annotations state management
    • Added errorAnnotations generation logic
    • Passed annotations prop to AceEditor component

Testing

Tested locally with invalid JSON schemas - error indicators now show correctly. This fix ensures the same functionality works in production builds.

Screenshots

N/A - Visual changes are the same as local development (error indicators in gutter and line highlighting)

@RajPrakash681
Copy link
Contributor Author

@NethmiRodrigo i have tried to fix this also please have a look.

@RajPrakash681
Copy link
Contributor Author

@ibacher

@RajPrakash681
Copy link
Contributor Author

@denniskigen sir can you please review this also or tag anyone who can review this

@RajPrakash681
Copy link
Contributor Author

@NethmiRodrigo please have a look at this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant