Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move placeholder content in SectionSidePanel to own component #11275

Closed
2 tasks
Tracked by #11277
nucleogenesis opened this issue Sep 19, 2023 · 1 comment
Closed
2 tasks
Tracked by #11277

Move placeholder content in SectionSidePanel to own component #11275

nucleogenesis opened this issue Sep 19, 2023 · 1 comment

Comments

@nucleogenesis
Copy link
Member

nucleogenesis commented Sep 19, 2023

Overview

NOTE Check out my feature--finalizing-create-quizz (yes 2 z's) and base work on this from there. Once that is merged in #11277, you can rebase against develop when you make your PR to avoid convoluted commit history issues

There is currently some content that would do well in its own little component to clean things up in the SectionSidePanel component.

When a section has no questions selected, we present them with a message and a button to go to select some resources. FIGMA

Where this is, we will soon be putting another component's worth of stuff, so to preemptively keep this clean, we should make a child component for the empty state and conditionally show it if there are questions available.

See useQuizCreation for the data module. You might need to inject: ['quizForge'] in the new component and you can then access any export defined in useQuizCreation from that object -- ie, quizForge.activeQuestionsPool.value will give you the list of questions available. Note that wherever you see quizForge injected, that is your entry into the same thing.

  /** @type {ComputedRef<QuizQuestion[]>} All questions in the active section's `resource_pool`
   *                                      exercises */
  const activeQuestionsPool = computed(() => _getQuestionsFromSection(get(_activeSectionId)));

Acceptance Criteria

  • A new component is created that houses "There are no questions in this section" UI
  • The component will employ the quizForge object as needed to hide/show depending on if there are questions or not
@rtibbles
Copy link
Member

This is no longer relevant.

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

No branches or pull requests

4 participants