RealRaven2000 / SmartTemplates

Thunderbird Add-on: SmartTemplates
http://smarttemplates.quickfolders.org/
Other
25 stars 15 forks source link

Feature: Fragment choices in Composer (placeholder) #316

Open RealRaven2000 opened 3 months ago

RealRaven2000 commented 3 months ago

Use case Scenario

I find often I use the same template (which has instructions for copying and acitvating a license key) for different purposes such as:

I find that I will usually erase the top paragraph manually and then handwrite something more customized to one of the other purposes. It can take between 2 to 6 minutes of time, sometimes more if I add explanations. This could be solved by inserting a smart fragment manually, but often I do not bother finding such a template, as I may have too many fragments already.

Additionally I may use another template for domain license delivery also for domain license extension. In this case I always modify a few words in the first paragraph of the email.

The Requirement here is to modify an email of a chosen template with a minimum amount of user guided effort. Ideally a single click.

Proposal

Let's add a new variable which loads a default text (from an external html snippet), but gives a choice to change it to another (multiple other) texts. This could be either a full paragraph (or sets of paragaphs) or a text passage - basically either a block or inline element. The easiest way for a user would be a input element within the text of the composer. For the start we could just support a block (<div> or <p>) that could be indented and have a dropdown chevron / element to the left (or margin-start).

Once clicked it should reveal a dropdown of alternative choices. Each choice is to represent a html file (smart fragment).

When a choice is selected the block element (<div> or <p>) beside, which is connected to the dropdown will be swapped with the contents of the appropriate fragment. Here is a mockup:

image

once the element is clicked, it shows the default fragment on top:

image

this could also be very useful for headings!

Once the email is sent off (or the clean up button is clicked) the element will be removed leaving the last selected place in its place.