Repository navigation
Conversation
…37897) The UVE app asked for its configuration as raw JSON in a plain textarea, with no validation, and the example in its hint was itself invalid JSON. - Routes tab: one card per config entry (path pattern, server URL, allowed dev URLs) with add, remove and reorder, inline validation, and a warning for routes placed after a catch-all. - JSON tab: Monaco editor with live validation and Format JSON, kept as a fallback; keys the form doesn't edit are preserved. - New JSON app param type, validated on save, update, import and when the app YAML is loaded. Configs saved as STRING open in the new editor. - Code blocks in app hints get a Copy button and themed JSON colors. The saved value is unchanged: the same JSON string in the same secret. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Claude finished @rjvelazco's task in 3m 27s —— View job Code Review
I reviewed the diff against the branch state (16 commits). All of New IssuesNo blocking issues found. One minor accessibility note below.
Verified correct (spot-checks worth recording)
Test coverageBackend |
…xtarea-with-a-routes-editor-and-validated-json
…-a-routes-editor-and-validated-json' of https://github.com/dotCMS/core into issue-37897-replace-uve-app-configuration-textarea-with-a-routes-editor-and-validated-json
…yout (#37897) $isUveApp picks the UVE route editor. $shouldCenterForm reads a list of app keys, so other redesigned apps can opt into the centered layout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🐳 PR Docker test imageLatest build for commit docker pull dotcms/dotcms-test:pr-37898-issue-37897-replace-uve-app-configuration-textarea-with-a-routes-editor-and-validated-json
docker pull dotcms/dotcms-test:pr-37898-issue-37897-replace-uve-app-configuration-textarea-with-a-routes-editor-and-validated-json_8be5998 |
The ngx-monaco-editor and markdown stubs must keep the real selectors, so they opt out of the dot- prefix rule like other specs in this portlet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Narrow nullable DOM queries, type the onChange spy and parsed output, and read the index-signature 'config' key with bracket access. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…#37897) A fieldset defaults to min-inline-size: min-content, so the route list widened to the full length of a long title and the title never truncated. The fieldset now gets min-w-0, the title container no longer wraps, and the badge, tags and action buttons keep their size. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…arately (#37897) A long pattern hid the server, or the reverse. Each half now starts from an equal share but never grows past its own text, so a short half gives its spare room to the other and the tags sit right after the text. Each half truncates on its own; the arrow never shrinks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…xtarea-with-a-routes-editor-and-validated-json
…hem (#37897) A stored "type":"JSON" can not be deserialized by a release that predates Type.JSON, which would leave that site's App secrets unreadable after a rollback. JSON params are now persisted as STRING; SecretView still reports JSON from the app descriptor at read time. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Use the global .field wrapper with plain labels, and p-field-error / p-field-hint instead of the dead .p-error class, so errors render red. - Center the form with mx-auto instead of a custom modifier. - Flatten the hint and code-block SCSS to at most three levels. - Mount the shared DotCopyButtonComponent in code blocks, and make it show its error state when DotClipboardUtil reports a refused copy. - Add specs for remove, move up, dev URL removal, the Routes/JSON toggle, the disabled state, error messages by test id, and the reactive-form wiring of both fields. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Unit tests for validateForSave rejecting malformed JSON, the app descriptor check on JSON defaults, and isValidJson with scalars. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…E editor (#37897) - Give the JSON editor and the route editor accessible names: a <label for> can't name their <div> wrappers, so pass the field label to Monaco's ariaLabel and to role=group wrappers. - Use # private fields to match the TypeScript standards. - Replace $any($event.target) with template refs to keep template type-checking on. - Replace raw SCSS values with spacing and font tokens. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…width (#37897) Replaces the custom max-width: 64.25rem with the shared --container-content token (70rem), so the form layout needs no component SCSS. All Apps configuration forms get slightly wider. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ad (#37897) Covers what the unit tests can't reach: AppsHelper.validateFormForUpdate rejecting malformed JSON on the PUT path, the secret being stored as STRING, and SecretView still reporting JSON from the descriptor. Added to AppsResourceTest, which MainSuite3a already runs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Closes #37897
Proposed Changes
Frontend: Apps → UVE configuration
configurationtextarea with a Routes editor: one card perconfigentry, with a path pattern (RegEx), a server URL and optional allowed dev URLs./blogs/(.*) → myspa.blogs.com, with a#Norder badge..*route gets a Default tag. Any route after it gets a Never used warning.Frontend: all Apps hints
DotAppsCodeBlocksDirective).text-shadowno longer blurs code in these blocks.Backend
JSONapp param type (com.dotcms.security.apps.Type), stored likeSTRING.AppsUtil.isValidJsonrejects malformed JSON, including trailing text after the JSON.AppsUtil.validateForSave), on update (AppsHelper.validateFormForUpdate) and when an app YAML is loaded (AppDescriptorHelper).SecretViewreports the descriptor'sJSONtype for configs that were saved asSTRING, so existing UVE configs open in the new editor.dotema-config-v2.yml,configurationis nowtype: 'JSON'. Its hint is rewritten, and the old example, which had a trailing comma, is replaced with valid JSON.Checklist
apps.uve.*,apps.json.field.*andapps.code.block.*keys inLanguage.properties.Additional Info
configurationis of type JSON but its value is not valid JSON." Such a config already broke the UVE at render time; this was agreed on Replace UVE app configuration textarea with a Routes editor and validated JSON #37897.pnpm nx build dotcms-ui, lint on the changed files and./mvnw compile -pl :dotcms-coreall pass, andopenapi.yamlis unchanged.Video
video.mov
🤖 Generated with Claude Code