learningequality / learningequality/kolibri

Coach Quiz Side Panels need refactoring

Open
#12,840 0 comments 0 reactions 1 assignee View on GitHub

@nucleogenesis is already working on this.

Since Nov 13, 2024.

  • #12819 by @nucleogenesis — closed without merging
Dominant language
Python
Stars
1.1k
Forks
972
Avg merge
7d 16h
Merged PRs (30d)
33

Description

Overview

In Quiz Creation there is a SectionSidePanel component which wraps a SidePanelModal around the <router-view /> into which the "side panel components" render. This results in clobbering our ability to handle each route individually and complicates routing by putting the onus for some routing decisions on that SectionSidePanel component.

Description and outcomes

We should instead simply leverage VueRouter and it's guards and keep the logic of "where do I go and why" up to the individual "side panel components" (ie, ResourceSelection, ReplaceQuestions, SectionEditor, etc).

By removing SectionSidePanel each of those components then can render as a SidePanelModal themselves. Then, the <router-view /> where those components render can live in the CreateExamPage/index component.

Then these components can be shown/hidden depending on whether or not the user is on a "side panel" route or not -- in this case, the only non-side-panel route is the EXAM_CREATION_ROOT page component. If we opted to have others, then this display logic can be updated more easily than it is currently.

Acceptance criteria
  • Remove SectionSidePanel component
  • Handle side panel exiting and/or going back for each page within their relevant component
  • No regressions in quiz creation when navigating side panels

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.