refactor(notification): use Element Plus Notification for global notices by Jocs · Pull Request #5798 · marktext/marktext · GitHub
Skip to content

refactor(notification): use Element Plus Notification for global notices - #5798

Merged
Jocs merged 3 commits into
developfrom
feat/element-plus-notification
Oct 20, 2026
Merged

Jocs merged 3 commits into
developfrom
feat/element-plus-notification

Conversation

@Jocs

@Jocs Jocs commented Oct 20, 2026

Copy link
Copy Markdown
Member

Summary

Replace the custom DOM toast service with Element Plus Notification while keeping the existing notice.notify(options) API and its Promise semantics.

  • Route global notifications through ElNotification with bottom-right positioning and z-index 10100.
  • Render the confirm action through VNode content, resolve on confirm, and reject on dismissal.
  • Keep HTML message support through DOMPurify so pandoc warnings retain their line breaks.
  • Use the existing notification theme variables and preserve the mt-notification selector used by tests.
  • Update Playwright close-button selectors and add unit coverage for the adapter.

The per-tab inline notification banner is intentionally unchanged: it is tab-scoped persistent UI, not a global overlay.

Verification

  • pnpm run typecheck
  • pnpm run test:unit (104 files, 1133 tests)

The Playwright diagram-viewer spec selectors were updated. A local E2E run could not complete because an Electron dev instance was already active; CI will exercise the spec.

@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

@Jocs
Jocs merged commit 21acfa7 into develop Oct 20, 2026
13 checks passed
@Jocs
Jocs deleted the feat/element-plus-notification branch October 20, 2026 10:27
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