Skip to content

Wikiの版切替で編集エリアが空になる不具合を修正 - #16

Open
NishikawaKoharu wants to merge 1 commit into
RCOSDP:developfrom
NishikawaKoharu:feature/fix-wiki-version-switch-empty-editor
Open

NishikawaKoharu wants to merge 1 commit into
RCOSDP:developfrom
NishikawaKoharu:feature/fix-wiki-version-switch-empty-editor

Conversation

@NishikawaKoharu

Copy link
Copy Markdown
Contributor

Purpose

Fix a Wiki Milkdown / frontend bug: switching Wiki Version (Current / past versions / Preview) during edit clears the editor and makes the text area unselectable / uneditable.

Related server-side changes must be landed together with the RDM-osf.io companion PR (feature/fix-wiki-version-switch-empty-editor).

Changes

  • When viewing another version, hide the Milkdown editor instead of destroying its DOM / instance (prevents an empty editor when returning to Preview)

Changed files:

  • addons/wiki/static/wikiPageMilkdown.js

QA Notes

  • Does this change require a data migration? If so, what data will we migrate?
    • No.
  • What is the level of risk?
    • Low to medium. Limited to Wiki Milkdown edit UI (version switch).
    • Any permissions code touched?
      • No.
    • Is this an additive or subtractive change, other?
      • Behavioral fix (existing version-switch bug).
  • How can QA verify? (Through UI, API, AdminApp or AdminAdminApp?)
    • Through UI — Wiki edit page with 2+ versions.
      (Verify together with the RDM-osf.io companion PR.)
    1. While editing, switch Wiki Version to a past version, then back to Preview: editor is not empty and unsaved text remains
  • What features or workflows might this change impact?
    • Wiki edit version switching (Preview / Current / past versions)
  • How will this impact performance?
    • Negligible.

Documentation

  • No documentation updates required.

Side Effects

  • While viewing a non-Preview version, the Milkdown instance is no longer destroyed, so editor state may remain in memory longer than before.

Ticket

https://redmine.devops.rcos.nii.ac.jp/issues/63973

@yacchin1205 yacchin1205 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

こちらの変更に対する、回帰テストはどれと思えばよろしいでしょうか...

(Conflictしてしまっておりマージできてなくてすみませんが、 RCOSDP/RDM-e2e-test-nb#48 でこのテストになるようでしたら、Conflict解決をしていただけますとありがたいです...)

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.

2 participants