Skip to content

#7621: fixed monomer wizard navigation#10162

Open
guranda2626 wants to merge 6 commits into
masterfrom
7621-monomer-wizard-navigation-scrolling-issue
Open

#7621: fixed monomer wizard navigation#10162
guranda2626 wants to merge 6 commits into
masterfrom
7621-monomer-wizard-navigation-scrolling-issue

Conversation

@guranda2626
Copy link
Copy Markdown
Collaborator

Sumamry

This PR addresses three distinct bugs in the Create Monomer wizard validation panel relating to notification behavior, scrolling constraints, and stale error states.

1. Persistent Error Banners (Dismissible OK Button)

  • The Issue: Error messages included a dismissible "OK" button, allowing users to clear error banners without actually resolving the underlying validation issues.
  • The Fix: Restricted the dismissible behavior to informational notifications only. Error notifications no longer render an OK/Close button, forcing them to remain visible until resolved.

2. Hidden Error Overflow (Non-Scrollable Container)

  • The Issue: The notifications area lacked scrolling capabilities. When multiple validation errors triggered at once, the excess messages were cut off and hidden from the user.
  • The Fix: Added layout constraints to the notifications container using max-height: 180px and overflow-y: auto to ensure a clean, scrollable area when errors pile up.

3. Stale Validation State (Persisting Resolved Errors)

  • The Issue: Previously resolved errors remained visible alongside newly generated ones after a partial fix and re-submission.
  • The Fix: Integrated a call to ResetValidationNotifications at the very beginning of the Submit routine. This flushes out the entire notification array before re-running the validation logic.

Issue


Result / Expected Behavior

The validation cycle now behaves predictably:

  1. Initial Submission: Clicking Submit flags and highlights all current rule violations.
  2. Partial Correction: The user fixes a subset of the flagged fields.
  3. Subsequent Submission: Clicking Submit again clears the old notifications entirely and populates only the remaining, active violations. Resolved errors are completely removed.

Check list

  • unit-tests written
  • e2e-tests written
  • documentation updated
  • PR name follows the pattern #1234 – issue name
  • branch name doesn't contain '#'
  • PR is linked with the issue
  • base branch (master or release/xx) is correct
  • task status changed to "Code review"
  • reviewers are notified about the pull request

Guranda Lemonjava and others added 6 commits June 3, 2026 18:20
…ications

The master merge (5c366f0) re-introduced linux baselines from
fc0db74 that were generated *without* the notification-area layout
change from 88fee08 (padding-right: 4px, max-height: 180px,
overflow-y: auto). Any screenshot that shows the MonomerCreationWizard
with at least one notification is off by ~145 px.

Deleted files (27 total):
- ketcher-3.8.0-bugs: Cases 5, 8, 10, 11, 12, 13, 14, 16, 17
- monomer-creation3: tests 4–9, 20 (all 7 shots), 21
- 8852-preset-structure-additions: Cases 4, 7, 8, 10

CI --update-snapshots will regenerate them with the correct layout.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…layout

All 13 baselines were generated before the notification-area layout
change (88fee08: padding-right: 4px, max-height: 180px,
overflow-y: auto) and were pulled back in via the master merge.

Affected spec files:
- monomer-creation.spec.ts: tests 4, 6 (×2)
- monomer-creation4.spec.ts: tests 25 (×2), 26 (×2)
- monomer-creation6.spec.ts: tests 12, 13
- 8792-rename-monomer-symbol-to-code.spec.ts: Cases 2, 3
- ketcher-3.11.0-bugs.spec.ts: Case 26
- ketcher-3.13.0-bugs.spec.ts: Case 11

Fixing these root-cause failures also resolves the cascade timeouts in
new-monomers (tests 13–16), 8464 Case 4, 8857 Case 7, and 3.13.0
Case 11 that were caused by the monomer wizard being left open after
a failed screenshot assertion.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…merge)

The master merge (5c366f0) overwrote the update_snapshots feature
that was added in 5d582a9 and b1e7d2e with the Playwright 1.59
upgrade commit (993f7fa).

Restores:
- workflow_dispatch input: update_snapshots (boolean, default false)
- permissions: contents: write
- Conditional --update-snapshots flag on playwright test run
- "Commit updated snapshots" step that git-adds all *linux.png files
  and pushes them back to the branch

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Previous commit step only ran when update_snapshots dispatch input was
true, and used a shell glob that is unreliable on GitHub runners.

Changes:
- if: always() — runs after every test job (pass or fail), not only on
  manual dispatch
- find ... -print0 | xargs -0 git add — reliable recursive file
  discovery instead of shell glob; works from the repo root
- Only PNG files that changed or were newly written get committed, so
  unchanged runs produce no commit

Effect: the first CI run after baseline deletion writes and commits the
new screenshots; the second run compares against them and passes.
The manual update_snapshots dispatch still works for forced full
regeneration (--update-snapshots flag).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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