Skip to content

Enhance Validations and add Code-Highlighter#3265

Open
asmasarw wants to merge 2 commits into
redhat-developer:mainfrom
asmasarw:fix/validations
Open

Enhance Validations and add Code-Highlighter#3265
asmasarw wants to merge 2 commits into
redhat-developer:mainfrom
asmasarw:fix/validations

Conversation

@asmasarw
Copy link
Copy Markdown
Contributor

@asmasarw asmasarw commented Jun 2, 2026

  • FLPATH-4260 | [DCM] Rego code field has no monospace font or syntax highlighting
  • FLPATH-4290 | [DCM] No duplicate field path validation for catalog items
  • FLPATH-4286 | [DCM] No Rego syntax validation
  • FLPATH-4291 | [DCM] No client-side validation of instance field values against JSON Schema
  • FLPATH-4251 | [DCM] [Code-only] Invalid JSON in catalog item field default_value silently coerced to string
  • FLPATH-4281 | [DCM] Rego code field uses proportional font

@asmasarw asmasarw requested review from a team, jkilzi and mareklibra as code owners June 2, 2026 08:45
@rhdh-gh-app
Copy link
Copy Markdown

rhdh-gh-app Bot commented Jun 2, 2026

Changed Packages

Package Name Package Path Changeset Bump Current Version
@red-hat-developer-hub/backstage-plugin-dcm workspaces/dcm/plugins/dcm patch v1.0.0

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 2, 2026

Codecov Report

❌ Patch coverage is 47.19626% with 113 lines in your changes missing coverage. Please review.
✅ Project coverage is 53.87%. Comparing base (55e9b9d) to head (f2729e3).
⚠️ Report is 16 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3265      +/-   ##
==========================================
+ Coverage   53.57%   53.87%   +0.29%     
==========================================
  Files        2407     2381      -26     
  Lines       86535    86214     -321     
  Branches    23960    23929      -31     
==========================================
+ Hits        46361    46445      +84     
+ Misses      38593    38192     -401     
+ Partials     1581     1577       -4     
Flag Coverage Δ *Carryforward flag
adoption-insights 83.58% <ø> (ø) Carriedforward from 54b32a8
ai-integrations 70.03% <ø> (ø) Carriedforward from 54b32a8
app-defaults 69.60% <ø> (ø) Carriedforward from 54b32a8
augment 46.39% <ø> (ø) Carriedforward from 54b32a8
bulk-import 72.86% <ø> (ø) Carriedforward from 54b32a8
cost-management 16.49% <ø> (ø) Carriedforward from 54b32a8
dcm 58.55% <47.19%> (+13.15%) ⬆️
extensions 61.79% <ø> (ø) Carriedforward from 54b32a8
global-floating-action-button 74.30% <ø> (ø) Carriedforward from 54b32a8
global-header 61.63% <ø> (ø) Carriedforward from 54b32a8
homepage 51.52% <ø> (ø) Carriedforward from 54b32a8
konflux 91.01% <ø> (ø) Carriedforward from 54b32a8
lightspeed 68.33% <ø> (ø) Carriedforward from 54b32a8
mcp-integrations 85.46% <ø> (ø) Carriedforward from 54b32a8
orchestrator 36.60% <ø> (ø) Carriedforward from 54b32a8
quickstart 62.88% <ø> (ø) Carriedforward from 54b32a8
sandbox 79.56% <ø> (ø) Carriedforward from 54b32a8
scorecard 83.84% <ø> (ø) Carriedforward from 54b32a8
theme 64.54% <ø> (ø) Carriedforward from 54b32a8
translations 8.49% <ø> (ø) Carriedforward from 54b32a8
x2a 78.79% <ø> (ø) Carriedforward from 54b32a8

*This pull request uses carry forward flags. Click here to find out more.


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 55e9b9d...f2729e3. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

}
}

function pickNumericBound(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This seems to be copy&paste with the catalogItemFormTypes.ts. Can it be shared? Like moving this to a file with utility functions.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Correct - forget to enhance this.

anchor="right"
open={open}
onClose={submitting ? undefined : onClose}
onClose={submitting || Boolean(error) ? undefined : onClose}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Isn't the user trapped in when an error is rendered? The user would need to use the X button first, then close. Sounds weird but it might be he intention

Copy link
Copy Markdown
Contributor Author

@asmasarw asmasarw Jun 4, 2026

Choose a reason for hiding this comment

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

We have two scenarios:

  • User clicks on "X" -> Drawer closes always unless they're submitting an api request
  • User has an error and he click anywhere in the screen -> Drawer keeps open

And this is totally fine - we need to keep drawer open so user can fix the issues, unless he decided to go away and close it -> by pressing X icon.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Jun 4, 2026

@asmasarw asmasarw requested a review from mareklibra June 4, 2026 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants