Easy-digital-downloads: Improve email tag usability for editing emails.

Created on 9 Mar 2015  路  7Comments  路  Source: easydigitaldownloads/easy-digital-downloads

As proposed by @brashrebel on EDD-SL:

Something like this is a decent example: http://www.authorcode.com/drag-and-drop-only-text-of-the-li-into-textarea-in-jquery/

It would be nice if it were possible to drag and drop the dynamic strings listed below the renewal notice form into the message body instead of having to select->copy->paste.

A possible alternative could be adding a TinyMCE button for inserting them with a click OR allowing the current text elements below the editor to be clicked and inserted. Maybe with a plus sign icon or something. Just ideas.

Additional notes:
We should make it so there are generic classes for this that would allow any extensions that have email editors to easily implement it.

component-administration type-feature

Most helpful comment

I started this here:

https://github.com/easydigitaldownloads/easy-digital-downloads/compare/issues/3232

Currently:

https://cloudup.com/cPILH4l3tz9
https://cloudup.com/cBhyCXcPajW
https://cloudup.com/ccyKt8KNb-c

Only works with the two core emails for a few reasons:

  • There is no email registry so getting the email settings is a bit of a guessing game.
  • There aren't any consistent ways to know if a setting聽is a rich editor for the email content.
  • Tags are global so it doesn't seem like extensions use edd_add_email_tag() for extension specific emails.

Thing's I'm not sure about:

  • edd-admin.css is large already so I used a separate CSS file. It only is loaded on two pages currently so seems okay?
  • Should the tag list still be output under the fields? On one hand it semi-defeats the purpose of this but on the other hand people comfortable typing them by hand need a reference.

Other changes:

  • Moved the functions out of class-edd-email-tags.php to a separate file.
  • Not sure about the file name tags-inserter.php for the inserter functions.
  • Added label support for tags.

Will think about a way for extensions to implement similar functionality; but not quite sure how they would currently.

All 7 comments

It would be cool if we can also see the preview on the browser. The email template could be loaded inside the WordPress admin ( as the templates either exist on edd folder or on a child theme folder ). A more visual way to manage it, should exist.

After some discussions with the team, we think it'd be best to tackle this as a simliar method as gravity forms.
screen shot 2017-11-10 at 8 05 57 am

That's a good mock up. I think we can do something relatively similar during the 3.0 beta process.

I started this here:

https://github.com/easydigitaldownloads/easy-digital-downloads/compare/issues/3232

Currently:

https://cloudup.com/cPILH4l3tz9
https://cloudup.com/cBhyCXcPajW
https://cloudup.com/ccyKt8KNb-c

Only works with the two core emails for a few reasons:

  • There is no email registry so getting the email settings is a bit of a guessing game.
  • There aren't any consistent ways to know if a setting聽is a rich editor for the email content.
  • Tags are global so it doesn't seem like extensions use edd_add_email_tag() for extension specific emails.

Thing's I'm not sure about:

  • edd-admin.css is large already so I used a separate CSS file. It only is loaded on two pages currently so seems okay?
  • Should the tag list still be output under the fields? On one hand it semi-defeats the purpose of this but on the other hand people comfortable typing them by hand need a reference.

Other changes:

  • Moved the functions out of class-edd-email-tags.php to a separate file.
  • Not sure about the file name tags-inserter.php for the inserter functions.
  • Added label support for tags.

Will think about a way for extensions to implement similar functionality; but not quite sure how they would currently.

@spencerfinnell I've gone ahead and opened a PR at #6878 to allow for easier tracking of code changes.

There is no email registry so getting the email settings is a bit of a guessing game.

This is something I wanted to do in 3.0 but we really don't have the capacity for it in this release so it's something we'd hopefully look at implementing in 3.1.

Should the tag list still be output under the fields? On one hand it semi-defeats the purpose of this but on the other hand people comfortable typing them by hand need a reference.

I think that it should remain.

At this point, this PR is good to merge. However, I'm going to wait for @JJJ to give the PR a review before merging.

Tweaked some styling, otherwise looks great.

Merged, so we can close this. Let's reference this issue for any more tweaks, and open new issues for anything major'ish.

Thanks @spencerfinnell!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

michaelbeil picture michaelbeil  路  5Comments

SDavisMedia picture SDavisMedia  路  3Comments

JJJ picture JJJ  路  5Comments

DrewAPicture picture DrewAPicture  路  5Comments

DevinWalker picture DevinWalker  路  6Comments