feat: surface per-component conversion warnings in job results UI#242
feat: surface per-component conversion warnings in job results UI#242im-shiv wants to merge 2 commits into
Conversation
BucketDataSource: parse path||message warning strings from bucket resource and inject warnings (boolean) + warningList (String[]) into each datasource item. item.html: render warning icon and message list for flagged items using HTL data-sly-test/data-sly-list. navpanel.html: remove unused multi-bucket loop, hardcode single Bucket 1 tab (forms jobs always run as a single bucket).
| class="aem-modernize-navpanel-bucket-action" | ||
| id="${properties.id}" | ||
| size="${properties.size}" | ||
| orientation="${properties.orientation}" |
There was a problem hiding this comment.
Have you validated the impact on Site page migration?
|
Please attach pre-post change screenshots for clarity on user experience. |
The shared navpanel component is used by form, component, structure, and policy job views. Hardcoding a single tab broke multi-bucket navigation for all non-form job types. Reverted to the original dynamic data-sly-list.bucket loop. Forms jobs always produce a single bucket, so the loop naturally renders one tab without any forms-specific override needed.
|
Review comments from Claude: feat: surface per-component conversion warnings in job results UI Overview Three changes as described: ConversionJobBucketDataSource parses path||message warning strings stored in the bucket JCR node (written by PR #240) and injects warnings (boolean) and warningList (String[]) into each datasource item's view Critical Issue 1. navpanel.html change described but absent from the diff The PR description says: ▎ navpanel.html: remove unused multi-bucket loop, hardcode single Bucket 1 tab (forms jobs always run as a single bucket). The diff contains no changes to navpanel.html. The file still has the full data-sly-list.bucket="${job.navBuckets}" loop. Either the work is incomplete, or the description is inaccurate. This needs resolution before merge. Beyond the incompleteness, the proposed change itself is architecturally risky: navpanel.html is shared across all job types (component, structure, full, form). Hardcoding "Bucket 1" would silently regress the multi-bucket tab view for Issues 2. Inline styles should be CSS classes ⚠ ${warning}
The rest of item.html uses CSS classes (class="mediumIcon ${properties.statusClass}"), keeping styling out of the markup. This inline style:
The warning style should be a named class in the project's clientlib (e.g. aem-modernize-warning-message), consistent with how statusClass is used. 3. "warnings" is a cross-PR magic string with no shared constant PR #240 writes: The JCR property name "warnings" is a literal string duplicated across two classes in two PRs with no shared constant. If it changes in one place, the other silently breaks. Define it as a constant in ConversionJobBucket (which already owns 4. No tests for the new warning path The existing testBucket verifies path/status/icon but doesn't cover any warning scenarios. No new tests were added for:
5. Silent discard of malformed warning entries if (sep > 0) { Entries where sep <= 0 (no separator, or separator at position 0) are silently dropped with no log output. A logger.debug or logger.warn here would make debugging bad warning data much easier. 6. parseWarnings is coupled to the || delimiter defined in PR #240 The delimiter contract is implicit between two PRs with no shared documentation or constant. Consider at minimum a comment in parseWarnings pointing to where the format is produced, so future maintainers can find the other side of the 7. data-sly-list loop variable name shadows the boolean flag properties.warnings (boolean flag) and the loop variable warning (individual message) are similar enough to cause confusion on a quick read. Consider renaming the loop variable to warningMsg or warningItem. Minor / Non-blocking
|
bstopp
left a comment
There was a problem hiding this comment.
See PR review from Claude, provided by @iamsudhanshu
BucketDataSource: parse path||message warning strings from bucket resource and inject warnings (boolean) + warningList (String[]) into each datasource item. item.html: render warning icon and message list for flagged items using HTL data-sly-test/data-sly-list. navpanel.html: remove unused multi-bucket loop, hardcode single Bucket 1 tab (forms jobs always run as a single bucket).