Skip to content

ROX-37387: Simplify layout of compliance wizard steps as in reports - #23217

Merged
pedrottimark merged 2 commits into
masterfrom
ROX-37387-Divider-Compliance-Wizard-Steps
Oct 3, 2026
Merged

pedrottimark merged 2 commits into
masterfrom
ROX-37387-Divider-Compliance-Wizard-Steps

Conversation

@pedrottimark

Copy link
Copy Markdown
Contributor

Description

Review: Hide space because of indentation changes

Problem

Cost and benefit are unfavorable for design embellishment:

  • Subheading sentence following Title element of wizard step
  • And therefore Divider element to separate heading and subheading from form

One side of coin:

  • There is no precedent in PatternFly documentation for subheading of wizard steps.
  • Subheading sentence restates what is obvious from a semantic heading.
  • Complicated markup, which includes unusual layout props and even worse, className props which require changes at evern PatternFly upgrade.

Other side of coin:

  • Although policy wizard is out of scope for this simplification because different priorities of stakeholders, removing another inconsistency between compliance scans and vulnerability reports now increases pootential for more reuse in the future and reduces the probability of more churn in the future.

Analysis

  1. Compare layout of components in compliance Wizard folder to vulnerability reports Wizard folders.

    • Every time we prefer semantic headings and spacing to cards, dividers, gutters, and so on, we slightly reduce the change that wizard step scrolls. All of the small savings add up. And according to broken window principle, less now encourages less in the future, but more now encourages more in the future.
    • By the way, PatternFly renders divider preceding wizard step footer without side-effect on layour owithin step component. That follows the principle of composition in React.
  2. Compare files names of steps in compliance Wizard folder to views in components folder.

    Probably from design churn and especially inconsistency between step label and heading

    components Wizard
    ScanConfigParametersView.tsx ScanConfigOptions.tsx
    ScanConfigClustersView.tsx ClusterSelection.tsx
    ScanConfigProfilesView.tsx ProfileSelection.tsx
    ScanConfigDelieryView.tsx ReportConfiguration.tsx
    N/A ReviewConfig.tsx
  3. Belated discovery that type prop of PageSection element helps layout (see Residue).

    • presence of type="breadcrumb" when Breadcrumb is child
    • absence of type when Title is child
    • presence of type="wizard" when Wizard is descendant

Solution

  1. Delete elements in excess of the following pattern:

    <PageSection>
        <Flex direction={{ default: 'column' }} spaceItems={{ default: 'spaceItemsLg' }}>
            <Title headingLevel="h2">Details</Title>
            <Form isWidthLimited>
                <FormLabelGroup …>
                    // form element
                </FormLabelGroup>
                // and so on
            </Form>
        </Flex>
    </PageSection>
  2. Following the precedent of components folder, rename files in wizard folder.

    ScanConfigWhateverStep.tsx corresponds to ScanConfigWhateverView.tsx

    Except postpone ScanConfigParameters.tsx to reduce merge conflicts with $22990

  3. Rename ScanConfigWizardPageSection.tsx file.

    • Render PageSection and its Wizard child together in same file.
    • Instead of separate in CreateScanConfigPage.tsx and EditScanConfigDetail.tsx files.

Residue

  1. Write lint rules for type property of PageSection element.
  2. Investigate whether Step components PageSection element.
    PatternFly examples have such limited step content that it is hard to decide what they intend.

User-facing documentation

  • CHANGELOG.md update is not needed
  • documentation PR is not needed

Testing and quality

  • the change is production ready: the change is GA
  • CI results are inspected

Automated testing

  • added unit tests
  • added e2e tests
  • added regression tests
  • added compatibility tests
  • modified existing tests

How I validated my change

  1. npm run tsc in ui/apps/platform folder.
  2. npm run lint in ui/apps/platform folder.
  3. npm run start in ui/apps/platform folder with staging demo as central.

Manual testing

  1. Visit Visit /main/compliance/schedules and click a schedule, click Actions click Edit scan schedule

    Parameters step with presence of subheading and divider before changes:
    1_Parameters_with_Divider

    Parameters step after changes:
    1_Parameters_without_Divider

    Clusters step with presence of subheading and divider before changes:
    2_Clusters_with_Divider

    Clusters step after changes:
    2_Clusters_without_Divider

    Profiles step with presence of subheading and divider before changes:
    3_Profiles_with_Divider

    Profiles step after changes:
    3_Profiles_without_Divider

    Delivery step with presence of subheading and divider before changes:
    4_Delivery_with_Divider

    Delivery step after changes:
    4_Delivery_without_Divider

    Review step with presence of subheading and divider before changes:
    5_Review_with_Divider

    Review step after changes:
    5_Review_without_Divider

@pedrottimark
pedrottimark requested review from bradr5 and dvail October 2, 2026 18:35
@pedrottimark
pedrottimark requested a review from a team as a code owner October 2, 2026 18:35
@pedrottimark pedrottimark changed the title Rox 37387 divider compliance wizard steps ROX-37354: Remove unique style from compliance scan schedule view Oct 2, 2026
@coderabbitai

coderabbitai Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Advanced

Run ID: e47249e5-bc56-4734-b0e2-54b766255da3

📥 Commits

Reviewing files that changed from the base of the PR and between 21188e6 and 145d7ee.

📒 Files selected for processing (10)
  • ui/apps/platform/src/Containers/ComplianceEnhanced/Schedules/CreateScanConfigPage.tsx
  • ui/apps/platform/src/Containers/ComplianceEnhanced/Schedules/EditScanConfigDetail.tsx
  • ui/apps/platform/src/Containers/ComplianceEnhanced/Schedules/Wizard/ProfileSelection.tsx
  • ui/apps/platform/src/Containers/ComplianceEnhanced/Schedules/Wizard/ReportConfiguration.tsx
  • ui/apps/platform/src/Containers/ComplianceEnhanced/Schedules/Wizard/ScanConfigClustersStep.tsx
  • ui/apps/platform/src/Containers/ComplianceEnhanced/Schedules/Wizard/ScanConfigDeliveryStep.tsx
  • ui/apps/platform/src/Containers/ComplianceEnhanced/Schedules/Wizard/ScanConfigOptions.tsx
  • ui/apps/platform/src/Containers/ComplianceEnhanced/Schedules/Wizard/ScanConfigProfilesStep.tsx
  • ui/apps/platform/src/Containers/ComplianceEnhanced/Schedules/Wizard/ScanConfigReviewStep.tsx
  • ui/apps/platform/src/Containers/ComplianceEnhanced/Schedules/Wizard/ScanConfigWizardPageSection.tsx
💤 Files with no reviewable changes (2)
  • ui/apps/platform/src/Containers/ComplianceEnhanced/Schedules/Wizard/ReportConfiguration.tsx
  • ui/apps/platform/src/Containers/ComplianceEnhanced/Schedules/Wizard/ProfileSelection.tsx

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📝 Summary

Summary by CodeRabbit

  • New Features
    • The compliance scan configuration wizard now presents cluster selection, profile selection, delivery settings, and review as dedicated steps. Profile search, selection, and validation remain available.
  • Improvements
    • Create and edit pages use updated section layouts and clearer page titles.
    • Edit pages can show the scan title and breadcrumb while an error is present, and display a loading indicator while scan details are loading.

Walkthrough

The compliance scan configuration wizard is reorganized into dedicated step components within a page section. Profile selection and delivery configuration use dedicated components. The create and edit pages now use the renamed wizard section.

Changes

Compliance scan configuration wizard

Layer / File(s) Summary
Wizard step components
ui/apps/platform/src/Containers/ComplianceEnhanced/Schedules/Wizard/ScanConfigOptions.tsx, ui/apps/platform/src/Containers/ComplianceEnhanced/Schedules/Wizard/ScanConfigClustersStep.tsx, ui/apps/platform/src/Containers/ComplianceEnhanced/Schedules/Wizard/ProfileSelection.tsx, ui/apps/platform/src/Containers/ComplianceEnhanced/Schedules/Wizard/ScanConfigProfilesStep.tsx, ui/apps/platform/src/Containers/ComplianceEnhanced/Schedules/Wizard/ReportConfiguration.tsx, ui/apps/platform/src/Containers/ComplianceEnhanced/Schedules/Wizard/ScanConfigDeliveryStep.tsx, ui/apps/platform/src/Containers/ComplianceEnhanced/Schedules/Wizard/ScanConfigReviewStep.tsx
The options, cluster, and review steps receive layout or naming changes. Dedicated profile-selection and delivery components replace the previous components.
Wizard assembly and navigation
ui/apps/platform/src/Containers/ComplianceEnhanced/Schedules/Wizard/ScanConfigWizardPageSection.tsx
The wizard is renamed and wrapped in a PageSection. It connects the dedicated step components and retains the existing validation checks under renamed helper functions.
Create and edit page integration
ui/apps/platform/src/Containers/ComplianceEnhanced/Schedules/CreateScanConfigPage.tsx, ui/apps/platform/src/Containers/ComplianceEnhanced/Schedules/EditScanConfigDetail.tsx
Both pages use the renamed wizard component. Their page titles and section layouts are updated. The edit page displays the scan name when a configuration exists, including when an error is present.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Refactor

Merge Risk: ⚪ Minimal · up to 145d7

This change simplifies the compliance scan wizard layout and renames its step components. No new behavioral risk was found. The retained-data-on-error behavior on the edit page already existed before this PR.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 18 functions across 8 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title identifies the compliance scan schedule view and its styling simplification. This matches the primary changes that remove subheadings and dividers and simplify the layout.
Description check ✅ Passed The description explains the problem, solution, affected layout patterns, documentation status, production-readiness status, and manual validation steps. It also clearly reports that CI results were n…
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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

@codecov

codecov Bot commented Oct 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 51.93%. Comparing base (c47677e) to head (145d7ee).
⚠️ Report is 15 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #23217      +/-   ##
==========================================
- Coverage   51.96%   51.93%   -0.03%     
==========================================
  Files        2904     2908       +4     
  Lines      183013   183034      +21     
==========================================
- Hits        95104    95066      -38     
- Misses      79591    79628      +37     
- Partials     8318     8340      +22     
Flag Coverage Δ
go-unit-tests 51.93% <ø> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

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

@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

🚀 Build Images Ready

Images are ready for commit 145d7ee. To use with deploy scripts:

export MAIN_IMAGE_TAG=5.1.x-144-g145d7eeb52

@dvail dvail left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review nit: I think if the file rename ProfileSelection => ScanConfigReviewStep is done alone in a single commit, and then the layout refactor done in a second commit, that GitHub will show the diff as a rename+change instead of a delete/new. At least for the PR review, the distinction is probably lost once the branch is squash merged.

Although I don't think a subheader pattern is unreasonable, in this case

Subheading sentence restates what is obvious from a semantic heading.

certainly applies for 90% of what was removed.

Bonus points for more vertical space allowed in the business-end of the Wizard, which is one of the main downsides of using that component anywhere (Policies like you noted being the biggest sufferer of this.)

@pedrottimark

Copy link
Copy Markdown
Contributor Author

I think if the file rename ProfileSelection => ScanConfigReviewStep is done alone in a single commit, and then the layout refactor done in a second commit, that GitHub will show the diff as a rename+change instead of a delete/new

Super suggestion. I will keep that in mind.

@pedrottimark
pedrottimark merged commit 7de5427 into master Oct 3, 2026
109 of 110 checks passed
@pedrottimark
pedrottimark deleted the ROX-37387-Divider-Compliance-Wizard-Steps branch October 3, 2026 01:45
@pedrottimark pedrottimark changed the title ROX-37354: Remove unique style from compliance scan schedule view ROX-37387: Simplify layout of compliance wizard steps as in reports Oct 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants