openedx / frontend-lib-content-components

[Moved to openedx/frontend-app-course-authoring] A library of high-level components for content handling (viewing, editing, etc. of HTML, video, problems, etc.), to be shared by multiple MFEs.
GNU Affero General Public License v3.0
11 stars 33 forks source link

feat: add blockId to return url #442

Closed KristinAoki closed 10 months ago

KristinAoki commented 11 months ago

JIRA Ticket: TNL-10036

Since many units can be quite long, let’s see if we can return the user to the edited component on reload, after Editor Save/Cancel.

edx-platform PR #33855 added an id to each xblock. This PR adds the blockId as the hash in the url so the page knows where to scroll to after the page loads.

Testing

  1. Edit a block that uses the text, problem, or video editor.
  2. Cancel the edit
  3. Unit page should scroll to the xblock that you were editing.
  4. Choose another block to edit
  5. Save the edit
  6. Unit page should scroll to the xblock that you were editing.