fret icon indicating copy to clipboard operation
fret copied to clipboard

Templates Lack Syntax Highlighting and Structure Uneditable

Open mluckcuck opened this issue 2 years ago • 4 comments

We've just started looking at the templates, which seem quite useful and are (helpfully) extendible too.

But if I use a template to build a requirement, it has no syntax highlighting, which makes it hard for me to parse the requirement.

Also, after saving the requirement and coming back to it, it is still 'a template' so it is uneditable (e.g. I cannot change the if..then.. structure of Change State's response). I'm in two minds about if they should be editable, after saving (i.e. once saved it becomes a normal requirement) but I sort of expected it to become a 'normal' text requirement after it was saved.

mluckcuck avatar Feb 19 '24 16:02 mluckcuck

Hi Matt,

Thanks for trying our templates feature!

To enable syntax highlighting, you can click on the "No template" option from the Template drop down menu.

  • For example, if you choose the "Change State" template and start editing (see screenshot below)

Screenshot 2024-02-21 at 10 36 24 AM

  • Then at any point, you can click "No template" to enable syntax highlighting (see screenshot below). This allows you to also edit the uneditable parts of the template since the requirement is not in template format anymore.

Screenshot 2024-02-21 at 10 38 04 AM

  • Notice that if you do not make any changes while in the "No template" mode, you can switch back to template mode and FRET will keep the values of the instantiated placeholders for you.

Is this helpful?

All the best, Anastasia

anmavrid avatar Feb 21 '24 18:02 anmavrid

@mluckcuck was my previous answer helpful?

anmavrid avatar May 23 '24 20:05 anmavrid

@mluckcuck was my previous answer helpful?

Sorry for the slow reply @anmavrid , now that I'm back to using FRET (and doing things with the templates) I remembered this issue.

I can see that selecting 'No Template' works, but it would never have thought to try that. It seems counter-intuitive to select a template, begin filling in the template, and then un-select the template. Also, give that if I have typed FRETISH text and then select a template, it overwrites it, I would have thought the un-selecting the template would have also deleted what I'd typed. Besides that, it's ~ 3 more clicks. I suppose I expected it to highlight the fields as each field is completed, or after saving the requirement or something.

mluckcuck avatar Nov 01 '24 18:11 mluckcuck

Also (I've just found this) if I:

  • select a template
  • fill in the template
  • un-select the template, to get the highlighting back; but then,
  • re-select the template, to get the fields and suggestions back...

It deletes the FRETISH text I'd written.

mluckcuck avatar Nov 01 '24 18:11 mluckcuck