Skip to content

Set up basic question editor #863g652db #861m3zw47 #861m523cx

🆕​ Feature

Related software requirement: B_018, B_017, B_008

Related Epic ClickUp ID: #863g652db#861m3zw47 #861m523cx

Affected app variants: HCP

Summary

We want to add the ability to edit question in the monitoring setup. This will be the initial issue to hook up the question edit button in the monitoring setup with a question edit modal and adding a field to edit the question text. The rest of the editing features will be added in following issues. Also keep in mind that the future editing content of the modal might depend on the type of the question. We want to use this modal in the future for editing but also adding custom questions.

Background

For now, use the easiest way to set up the modal itself. There is another issue for creating custom designed modals #281

Keep in mind and port over any logic around creating new question (ids) when editing existing questions from the old symptom check.

Acceptance Criteria

  • clicking on the pencil-edit icon of a questions opens the editor modal with the title prefilled
  • the modal has a header with the category 1 of the question and a subtitle
  • the modal can be closed via x , changes will be dismissed
  • there is a submit button that will add any changes to the question (they are immediately displayed in the monitoring setup)
  • the text of the question is shown and can be edited via pencil icon
  • when editing the text, the pencil is replaced with a checkmark icon, when clicked, the pencil icon appears again and the text is no longer editable. Pressing enter inside the textfield has the same behavior as clicking the checkmark

Ideas

Reuse/Copy as much from the old question edit as possible, especially background functionality.

Please try to implement the editable question text as a reusable component.

Design

figma

image

  1. Connecting questions and categories is worked on in #291, before that you can also hardcode the title in the header, but keep in mind that it will depend on the question category in the future.

Edited by James Jenkinson