Giter VIP home page Giter VIP logo

sprout's People

Contributors

benparizek avatar dependabot[bot] avatar romanavr avatar superextinct avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

sprout's Issues

Add support to Notification Emails to override System Emails

Give Sprout Email a way to manage all Notification Emails in one centralized location on the Notifications Tab by allowing a user to add Notification Emails that override the default System Emails (/admin/settings/email/messages).

These System Emails include:

  • When someone creates an account
  • When someone changes their email address
  • When someone forgets their password
  • When you are testing your email settings
  • Craft Commerce emails

The Events that replace System Emails may need to behave slightly differently and suppress the System Email from being sent so the Sprout Email alternative can be used in its place.

Perhaps we add an attribute to the NotificationEvent API that displays a lightswitch field in the Event Settings for these System Email Events that allows a user to select "Replace default system email"

We should not modify the System Emails in any way, just block them from sending if someone wants to manage all of their emails from one place in Sprout Email

Explore:

Event::on(SystemMessages::class, SystemMessages::EVENT_REGISTER_MESSAGES, [$this, 'onRegisterEmailMessages']);

Add support for batch exporting large data sets

A user writes:

I have sprout reports (twig template) exporting tens of thousands of records. Problem is that its timing out. I appreciate that this is expected and my only likely option is to up the server spec. Is there anything i can do to optimise the report itself? e.g, through tasks where it exports the report over a period of time rather than all in one go?

Notify

Column order in CSV export

Description

I've made a form and make a report of it. I've add later on some missing form elements and change the visible order of the fields in the editor.
When download a CSV in the reports-option, the columns are in order of created. Not in order of the form.

Is there an option to change this? Or do I need to recreate the entire form?

Additional info

  • Craft version: 3.0.25
  • PHP version: 7.1
  • Plugins & versions: 3.0.0-beta.26

Multi-environment Meta tags and Header tags for offline workflow

We have a simple version of this in the docs already.

The ideal situation here is a way we can set this up in the configuration and know that when we push to dev or live the right settings are in place for the behavior we want, and there is little to no risk of dev sites getting indexed.

Set NoRobots NoIndex meta tags on per-environment basis. This wouldn't exclude images from being indexed (says someone).

Also set: X-Robots-Tag header (an actual HTTP header, not an HTML tag) that you can attach to requests of all kinds that provides the same noindex, nofollow functionality

lastEntry tag only works when storing data in the database

This is because the lastEntry tag relies on storing the ID of the submitted entry and querying the full model from the db.

Can we consider an alternate way to store and allow the data to be displayed on a Thank You page without saving it in the db?

  • lastEntry only works when saving data to the database
  • lastEntry should be updated to only work when using synchronous submission setting
  • lastEntry for asynchronous submissions must be handled manually

Front logo Front conversations

Add support for Matrix Fields

We won't be adding Matrix Field support by default in Sprout Forms. There is too much advanced functionality needed on the front-end and it would be hard for a plugin to make assumptions about what individual front-end needs would be.

At some point we could consider creating a separate Front-end Matrix Field integration plugin as an example for others to draw from.

For similar functionality, see Matt Blode's Tables Field for Sprout Forms

Sent email preview (HTML) relies on passing email content with data URI

Description

Previewing a sent HTML email with Sprout Forms requires the use of a data URI of the HTML content directly placed in the src of the iframe. This doesn't play nice with a reasonably safe Content Security Policy. Allowing data: for frame-src would be pretty dangerous as you can't whitelist it to a specific domain, you'd have to allow it globally, which would open a potential XSS vector for bad stuff.

I understand this is a little difficult because it's a preview of a sent email, rather than just a preview of a template, but at this time I'm unable to use the preview sent email feature for HTML, because it would mean decreasing the overall security of the Craft site.

Steps to reproduce

  1. Define a Content Security Policy that doesn't allow data: on the frame-src or default-src (fallback)
  2. Try and view a sent email with the HTML preview feature
  3. In a modern browser, the frame will be blocked by CSP and hence the HTML preview not visible.

Additional info

  • Craft version: 2.7.2
  • PHP version: 7.1
  • Plugins & versions: 3.1.0

Add stock to Product Revenue Report

One user added variants.stock as \'Quantity Remaining\', to the Product Revenue report to add current inventory levels.

Consider adding support for this.

Allow admin to select which fields appear to content admins

A user writes:

Is it possible to disable certain field types? In some cases, our editor users are likely to be really confused by some of the field types (e.g., regex) and also, if we decide to develop custom templates for a site, it would be nice to only develop those templates for the fields that an editor will use without worrying they'll use an un-templated field.


Let's consider:

  1. Removing non-essential fields from Sprout Forms by default and allowing them to be added via a plugin if needed (regex, relations, address)
  2. Adding a settings area to enable or disable which existing form fields should appear in the Sprout Forms sidebar UI for editors to choose form
  3. Consider displaying a message to admins in the field sidebar that says you can find more fields for your specific needs and link to settings where these are managed.

Notify

Access displayForm() method in Elements API.

Hi,

I want to access the displayForm() function in the Craft Elements API. This is my basic setup, with $entry->form being the handle of the form field. It doesn't seem possible to use $entry->form->displayForm() anymore? Is there any other way tot render the HTML of the form? I'm using the latest version of Craft 3.

'api/services' => [
            'elementType' => Entry::class,
            'criteria' => ['section' => 'services'],
            'paginate' => false,
            'transformer' => function(Entry $entry) use ($globalSeo) {
                return [
                    'title' => $entry->title,
                    'body' => $entry->body,
                    'form' => $entry->form,
                    'url' => $entry->url
                ];
            },
        ],

Best wishes

Review ResaveElements behavior

Currently, Sprout SEO watches for changes in Field Layouts and Metadata Field types and will resave related Elements when relevant updates are made.

This can trigger a lot of resaving on sites with a lot of entries. Is there anything we can do to optimize this behavior or give a user more control when they don't need to resave all elements?

Enable Craft Commerce Form Questions on Checkout

We have a partial implementation of this with the "Sprout Commerce Forms" plugin.

Update this plugin to hand off data to the website and let Sprout Forms manage the output of the form-entry.html template.

Can we add support for an "answers.html" template? Just like a dev can override an email, they can also just override the answers.html if they want to update the default output.

We can potentially use the same answers.html in the existing notification email?

We can also implement a way to output these answers in the Craft Commerce Order interface.

Improve aria-invalid integration

Scenarios to consider:

  • HTML5 validation
  • Multi-input fields like Radio Buttons and Checkboxes
  • Partial form failures (one of 3 fields fails validation, when the page reloads, aria values need to be updated accordingly)
  • Server-side validation
  • aria-describedby or aria-labelledby tagging error message descriptions away from input field

Add support for more Sprout Report Widgets

  • Single Number Widget (any single number or second row of a one column, two row report.)
  • Double Number Widget (like Agency Analytics. Pick two numbers and show them side by side. With headers or just numbers)
  • Mini Table Widget (output up to 4x4 or 6x6. We'll just take those cells from any report and display them as a highlight in a widget.)

Too easy to create notification with no 'whenNew'

Description

Notifications for when something is saved need to have When entry is created? or When entry is updated? box ticked. Otherwise the notification fails validation, and the email quietly isn't sent.

I think the notification save should fail in the cp when neither box is ticked.

Steps to reproduce

  1. Upgrade from Craft 2 version (which doesn't tick either box), or create brand new Craft 3 notification without ticking the box.
  2. Save notification. No complaints, notification saves just fine.

Additional info

  • Craft version: 3.1.20.1
  • PHP version: 7.0.13
  • Database driver & version: MySQL 5.7.16
  • Plugins & versions: Sprout Email 4.0.0-beta.13, Sprout Forms 3.0.0-beta.49

Add support for Campaign Type Settings

Mailer::getSettingsHtml() => sproutemail_campaigntype.settings

Copy/Paste Mailer does not yet provide the user option to select a template to use only for the copy/paste action. We need one template for the Live Preview and another for the Copy/Paste fields as someone may want to copy.paste a partial without a header.


Add support for default Sender settings (From Name, Email, Reply To):
Campaign Emails: defaults can be managed in Settings->General
Notification Emails: defaults can be managed in Settings->General
Defaults can use the Craft Email Settings default as a last resort fallback

Email - Multi-Site support

Add multi-site switch for Notifications to manage a separate email for each site. Might need to support scenarios like Fields (by site, by language, by group... etc). Translation Method can be defined by default or in settings and Enabled + Enabled for Site behavior can be used to help manage where things get triggered.

Add a check for $notificationEmail->siteId and confirm it matches the current siteId of the request.

Display Products with no sales in Product Revenue Report

Adam Ladrach asks: "Any tips for creating a master products report with sales for all products, even if they don't have any sales? Basically, I want something similar to your Product Revenue report, but to include products that don't have any sales as well for accounting purposes."

Accounting wishes to see that Product X has $0.00 in sales. They also send sales reports to the companies selling the items.

Allow Data Set settings at top of results page to persist

Description

I'm trying to create user-configurable reports, but having to click the cog to open the settings every time I update my settings template is an extra step I don't want to do. I would like the settings to be open by default for my users, too, since they should be updating those settings every time they run a new report.

Consider implementing with Local Storage like Element Index Page.

Including general twig template files in Sprout Forms template overrides

Description

When attempting to include a general twig template within a Sprout Forms template override i.e. field.html, the error Unable to find the template “xxxx”. is thrown. I believe this is because the template path is locked down to the $templateFolderOverride within the templates directory itself, so you can't include anything outside of it. This is what I'd like to do:

templates/
    _includes/
        example.twig
    _sproutforms/
        field.html <-- I want to use _includes/example here

Currently Sprout Forms doesn't allow access to that _includes/ location, because it looks like its locked down to the _sproutforms directory.

Would it be possible for a Sprout Forms template override to be able to include template files outside of the override directory?

Additional info

  • Craft version: 2.7.2
  • PHP version: 7.1
  • Plugins & versions: 2.6.1

Review date location implementation

Report Localization

  • always store data in the db in UTC
  • always prepare dates in General Settings timezone
    • note which timezone is being used in the UI.

Date in User Interface - Saving
Form POST - Date Array
-> convert date to UTC here:
** DateTimeHelper::formatTimeForDb($value->getTimestamp());
Array => String

Date in User Interface - Loading
From JSON Settings in DB - Date Array
-> convert date from UTC here:
Instead of USER TIMEZONE, we want to user GENERAL SETTINGS TIMEZONE
DateTime::createFromString($startDateParam, craft()->timezone);
craft()->timezone => generalSettingsTimezone
** DateTime::createFromString($startDateParam, $generalSettingsTimezone);

	String => DateTime Object (for PHP or Twig Templates)

Date Object vs Date Array
Where should Array => Object conversion happen?

Add Sprout Email event to get notified when a 404 Redirect happens

Getting an email every time a 404 happens may be a lot of emails. Any way we can do this based on a time period or when the count matches a certain number?

When count = 1, send a notification email that a 404 exist.
When count = 1 or 10, send a notification email that a 404 exist.

Allow Redirects for a Separate Domain

For website:

primarywebsite.com

A user could manage a vanity URL such as:

secondarywebsite.com

And set up a redirect such as

Old URL: secondarywebsite.com/shared-url
New URL: primarywebsite.com/actual-url

A few options to consider for implmentation.

  1. Allow the secondary URL to be managed by setting up a second Site in Craft and allow the New URL field to redirect to an absolute URL.
  2. Allow the secondary URL to be managed by setting up a second Site in Craft and allow the New URL field to redirect to a Select Other field where a user could chose a supported Base URL from other Craft Sites (Defaults to the Current Site) or an "Other" option where they could set an absolute URL.
  3. Allow the New URL setting to check for Absolute URLs of domains that are not using the base domain of the current site.

Consider: "Old URL" isn't really the right name for this field in the Vanity URL scenario

See Also

Notify

Add a way to display global errors

If a captcha fails it does not respond with field specific errors, we need a way to display global errors.

Also, if a payload forward request fails, it also responds with global errors, not field-specific errors.

Consider how best to handle this in templates.

// This would display failed payload forwarded requests
{% if errors['general'] is defined %}
{% include "errors" with {
errors: errors['general']
} %}
{% endif %}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.