Skip to content

Compatibility message and error handling in content editor

What does this MR do?

This MR fixes issues: #327249 (closed) and #328862 (closed)

Screenshots (strongly suggested)

Screenshot Comments
Screenshot_2021-05-14_at_11.23.14_PM State A: Markdown editor is loaded by default
Clicking on Use new editor will take you to State B (in case of success) or State D (in case of error)
Note: Error state can be simulated by blocking all requests going to [project_path]/-/wikis/[wiki_page_path]/preview_markdown
Screenshot_2021-05-14_at_11.23.42_PM State B: Content editor loads successfully
Clicking on Switch to old editor will show a modal confirming the change as seen in State C.
Screenshot_2021-05-14_at_11.23.53_PM State C: Modal confirmation to switch back to markdown editor
Keep editing closes the modal and Switch to old editor will switch back to State A.
Screenshot_2021-05-14_at_11.32.03_PM State D: Content editor fails to load
An error alert is shown on top with a Reload CTA. The editor is shown in a perpetual loading state. Save changes button at the bottom is disabled. Clicking Switch to old editor here will switch back to State A without showing a modal.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Himanshu Kapoor

Merge request reports