altinn-studio icon indicating copy to clipboard operation
altinn-studio copied to clipboard

Text editor: Editing texts in Altinn Studio

Open sarahwoodhouse opened this issue 6 years ago • 1 comments

Description

As a service developer I need to be able to edit, add and delete text and text keys in one place. I need to be presented with relevant information to understand where the text will be displayed and what it will do.

Texts need to be grouped in a natural way to make the easy to work with. The text is displayed in a list with a filter for type of text of the service. It should be possible to set a label for a text to see how it's used.

The label and filter categories are:

  • Title
  • Description
  • Validation text
  • Helptext
  • Paragraph
  • Label

All texts and text keys are shown and can be edited on the "Tekst" page. All texts can be edited or deleted, you can also add texts and text keys.

Add text: User can add text by pressing "add text" User needs to add add both text key and text. When the user starts typing a text, existing identical text should be shown in the dropdown box. When a user starts typing at the text key, existing identical text keys should be shown in the dropdown box. Press save and text and text key is added to the text file. If user adds only text key and not text = soft validation is shown on page according to sketch If user adds only text and not text key = show validation message aka "you need to enter a text key to add a text" If the text is identical as another text, it is not possible to save the text. A message should be displayed saying that the text already exists and show the corresponding text key.

A text key cannot be added in the text editor without having a text. Warning message is shown to the user.

Edit text: User can edit texts by writing in the text field.

If a text is used more than one place in the GUI of the service a soft validation/message should be shown according to sketch (aka "the text you are about to edit is used several places in the service and will change (3) places in the user interface") Press OK Text is updated in the text file A text can be empty and in that case the text key should kept in the text file (soft validation message?)

Edit text key: User can edit text keys by writing in the text field. Text key is updated in all places and the connection to all components in the UI editor is kept.

A text key need to be unique and cannot be changed to an existing key or be empty, warning message is shown to inform the user.

Delete text: User can delete a text by pressing "delete" next to the text If a text is used in the GUI of the service a soft validation/message should be shown according to sketch (aka "the text you are about to delete is used in the service and will disappear from the user interface") If a text is used more than one place in the GUI of the service a soft validation/message should be shown according to sketch (aka "the text you are about to delete is used several places in the service and will disappear from the user interface") The text key should be deleted together with the text. On delete: text and text key is removed from the text file

Questions:

  • Should it be possible to add links to texts for MVP?
    • not in MVP. see separate issue #552

Sketch (if relevant) See issue #469

Navigation from/to (if relevant) Accessible when working on a specific service

Technical considerations Input (beyond tasks) on how the user story should be solved can be put here.

Acceptance criterea

  • Possible to edit text and text key
  • Possible to add text and text key
  • Possible to delete text and text key
  • soft validations on missing texts according to scetch
  • Save according to #404
  • Handles bug described in #5855

Tasks

  • [x] What information is needed to work with texts?
  • [x] Create form to gather insight about texts from serivce owners
  • [x] Document form feedback

sarahwoodhouse avatar Nov 29 '18 08:11 sarahwoodhouse

For MVP 1 there will not be a need for a specific text page. The work done so far i saved and parked and will be re-visited at a later stage.

sarahwoodhouse avatar Dec 13 '18 15:12 sarahwoodhouse