GithubHelp home page GithubHelp logo

give-form-countdown's People

Contributors

devinwalker avatar mathetos avatar raftaar1191 avatar ravinderk avatar sidsector9 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

give-form-countdown's Issues

Add a countdown clock

Part of the appeal of this Addon is that it can help create a sense of "Urgency" for the donors to give before the time runs out.

Let's give the Admins the ability to add a simple Countdown clock to add to their form to reinforce that sense of urgency.

Here's a really solid and easy to implement one:
http://hilios.github.io/jQuery.countdown/examples/timezone-aware.html

I would imagine for first release the Form Edit setting would just be a simple radio buttons:

Countdown Clock: Enable | Disable

Display times in chronological order

Issue Overview

The times as they appear now are out of order. 12:00 am does not follow 11:00 am and 12:00 pm does not follow 11:00 pm.

Current Behavior

  • Time defaults to 1:00 am.
  • Illogical jump between 11:00 am and 12:00 am.
  • Illogical jump between 11:00 pm and 12:00 pm.

Expected Behavior

  • Time should default to 12:00 am as first item in list.
  • The list of times should follow a chronological order, beginning with 12:00 am (earliest time of day) and work up to 11:00 pm (latest time of day).

Possible Solution

Order times chronologically as described above.

Screenshots

Current behavior shown below.

image

Give's Countdown and Donation Goal cannot do Kickstarter or Indiegogo like format

I tried the Give-Form-Countdown along with your Donation Goal but they didn't enable me to do a Kickstarter or Indiegogo -like format that allows me have the Goal, the Countdown, and a Donate button displayed together.

Instead, I get the countdown and the donate button. When you click the donate button it then shows the goal at the top of the popup for entering the details needed to make the donation,.

I sent screenshots of this to Jason Knill. I can send them to anyone else if you give me an email address or some other mechanism.

I tried to attached the first screen shot using you attach file mechanism below. Didn't seem to work.

Thanks,

  • Gordon

image

fix: support the j F Y date format

Issue Overview

The form countdown does not work at all for j F Y date formats.

Current Behavior

With a site in j F Ydate format, the form will always show as being done, no matter what date you put in.

Expected Behavior

I expect all date formats to be supported.

Steps to Reproduce (for bugs)

  1. Change date format in General Settings to j F Y
  2. Install and activate form countdown
  3. set the date that a countdown ends to the future using the datepicker
  4. I will show as finished already on the front end.

Related

https://secure.helpscout.net/conversation/823178039/37303/

Acceptance Criteria

  • j F Y date formats work
  • other date formats also are unaffected.

feat: refactor form settings

Issue Overview

Because the countdown is so closely tied to the idea of the goal, and because closing the form happens with both the countdown and the goal, it's best to merge these together so there's not duplicating functions.

Additionally, we can reduce the total number of settings quite a bit by merging and making some smarter choices in which settings are available.

Current Behavior

Currently the Form Countdown has it's own tab with quite a few settings that have overlap with the goal and closing of the form.

Expected Behavior

I expect rather to have all the countdown options be together with the goal since it makes the most sense to think of them together.

Possible Solution

Hook into give_after_donation_goal_options_settings to output new countdown-specific settings.

We currently have all of these settings:

  • Duration
  • Timeframe
  • Number of Days
  • Countdown Clock
  • End Message
  • End Message Position

We could easily just add the following to the Donation Goal tab instead:

  • Countdown Clock Enable/Disable
  • Timeframe
  • Position

For Enable/Disable, let's make sure that can be chosen regardless of whether the Donation Goal is enabled or not. It's possible users might want a countdown with NO goal at all.

I think timeframe should simply be the datepicker and time picker. We don't need the number of days option.

Position would simply be where within the form we want the Countdown to appear.

For closing the form we can simply use inherit the existing Close Form options, including the messaging.

Todos

  • Remove existing form settings tab
  • Add the above two settings to the Goal tab
  • refactor the frontend logic to look for the new settings

If Goal Reached the Clock should disappear

I think this result is not desired:
image

This happens if you set a Goal, and enable the Clock, and the Goal is reached before the Duration ends. I think if the Goal is achieved and either the Goal Ended, or Duration Achieved messages are shown, then the clock should be removed.

Add shortcode and block options to [give_form] to show/hide countdown

Issue Overview

Current Behavior

Form Countdown works great on single form pages. But if you embed it as a shortcode or a block you don't have any options to show/hide. That could be really useful.

Expected Behavior

I expect to be able to show/hide the countdown when using the shortcode or block

Related

User request:
https://www.facebook.com/groups/givewp/permalink/899597367169154/

Todos

  • Implement shortcode arg countdown=show|hide in [give_form] shortcode
  • Confirm both show/hide work in the shortcode as intended
  • Implement a toggle in the Give Form Gutenberg block to show/hide the countdown

Create language files

Issue Overview

Ensure the plugin can be translated properly and translations when installed correctly work as intended.

feat: explore colors and themes

Issue Overview

The new FlipDown.js library supports "themes". We should consider the following:

  1. Can we support using the Progress Bar color as the flip-card background color?
  2. Should we just provide our own few custom themes in addition to "light" and "dark"?

Todos

  • Test using the Progress Bar color
  • Test a nice gradient for the cards
  • Consider the cost/benefit
  • If it's worth it, build it out and close this issue.

feat: use FlipDown.js

Issue Overview

The existing JS library is old, a bit clunky and not maintained. FlipDown.js seems leaner and more mature. It's also plain vanilla JS, which feels like a better option going forward.

Todos

  • Remove "The Final Countdown for jQuery"
  • Add FlipDown.js
  • Test as many different configurations as possible

WYSIWYG doesn't currenlty render oEmbeds

This might be a Give CORE issue, but if you add a YouTube video into the "Duration Ended Message" WYSIWYG field, it will render as an oEmbed in the backend, but not in the front-end.

feat: enhance countdown achieved actions

Issue Overview

I think users will want a few more options in the countdown achieved options, particularly since it's been separated from the goal now.

Current Behavior

We currently have the following options:

  • Close the form and replace it with the message below
  • Keep the form open and show the message below above the form
  • Don't take any action

Possible Solution

We should have all these options, and they should be re-worded for clarity:

  • Hide the form and show the message below (*)
  • Show the message below above the form (*)
  • Hide the countdown only
  • Hide the countdown and show the message below above the form (*)
  • Hide the countdown and the form and show the message below in their place (*)
  • Don't take any action

Additionally, the options above with the (*) should conditionally show the message field.

Duration achieved message position

Site admins might not want to completely close the form when the duration is over. Let's give them some additional options.

Duration achieved message

  • Close the form and replace its content
  • Keep the form open and show this message above the form
  • Keep the form open and show this message below the form

NOTE that if they choose to show the message ABOVE the form, it should show directly below the form title.

Number of days field should be a number field, not text

Issue Overview

We should make sure users can't enter letters into the "Number of Days" field by making it a number field instead of text field.

Current Behavior

Currently a text field.

Expected Behavior

Should be a number field

Possible Solution

Make it a number field ;-)

countdown disables itself when timeframe set to Specific day & time

Issue Overview

When I set the timeframe to Specific day & time, I click on update, but it does not save the changes. When I check the countdown again, it is disabled.

Current Behavior

It keeps disabling itself when I set a Multi-level Donation form to end at a specifc date and time. Looks like it cant save the changes.

Expected Behavior

to save the changes!

Possible Solution

If I set the timeframe to end after a number of days,it works just fine.

I have installed "wp-jalali" (a "Full Jalali (خورشیدی - شمسی) Calendar and Persian(Farsi)/Afghan/Tajik" support package for Wordpress.) It changes the calendar to Persian calendar throughout the website.
However it does not convert the dates from Gregorian calendar to Persian calendar in Give plugin. Instead it basically translates the name of months to Persian. e.g. 03/24/2017 in Persian calendar will be 01/04/1396.
In the plugin the Gregorian calendar is shown.

This maybe the cause!

image

Steps to Reproduce (for bugs)

1.Create a multi-level form with 12 levels
2. Set the Timeframe to end at a specific date and time
3. Save the changes
4.It wont work!

Related PRs

List related PRs against other branches:

Todos

  • Tests
  • Documentation

Label and description suggestions

@mathetos Label suggestions in red. Description suggestions in blue. Take as much or as little as you like from it.

  • There was some language that implied the form always closes when the duration ends. I made that language more generic.
  • Simplified labels and used consistent language (End Date, End Time, End Message, End Behavior). These are all settings that determine what happens when the duration ends.
  • Applied a consistent structure to descriptions. Every description starts with an action verb followed by a description of what the setting does.

image

Needs WP.org Assests

  1. Banner
  2. Icon with correct sizes
  3. At least 2-3 screenshots

Screenshots have to wait until some issues are resolved.

fix(form-countdown): resolve incompatibility with Give core 2.1

Issue Overview

The plugin doesn't appear to be working with 2.1 at all. Forms are not closed at the end of the countdown, and the clock JS throws an error.

Expected Behavior

I expect it to work.

Steps to Reproduce (for bugs)

  1. Enable a form countdown as well as the clock.
  2. View the form on the front end.
  3. Once the form is set to close, view the form again.
  4. It will still be open, and the clock JS throws an error.

Update all instances of "Give" to be "GiveWP

Issue Overview

The plugin was built before the GiveWP naming convention, so there will be a lot of old instances. This will take a careful eye, but it's not too challenging, but for making this add-on current it's important.

fix: ensure enabled status saves correctly after publishing a new form

Issue Overview

For some reason, when you create a new form, enable the Countdown, set your settings, then save the form, after the screen refreshes the enable status is set again to Disabled and the countdown does not appear on the frontend correctly.

No idea how this is happening currently, need to investigate and resolve.

Syncing the relationship between Duration and Goal Achieved better

Site admins might want to also support a Goal on forms with a Duration. The question is how would the "Goal Complete" message relate to the Duration End message?

My suggestion is the following:

Add a "Use Donation End Message" option in the "Donation Goal" tab like so:

image

If they say "No", then the default "Goal Achieved" option appears for them to set their message.
image

Saying "No" means that if the Goal is achieved before the end of the campaign, then this message will appear, until the Donation Duration ends and then THAT message will appear instead.

Saying "Yes" means that whether the Goal is achieved OR the Duration ends, only the Donation Duration message will appear.

Also if they say "No", then in the "Donation Duration" tab, the message option should be disabled, and instructions appear, like so:

image

Restart countdown when it ends

Issue Overview

Hi,
I just created my account and I don't know code!

Enhancement/suggestion:

I would like the countdown resets and restarts when it reaches its end. So I don't have to set it up every (for example 30 days.

Current Behavior

Currently under the "End Message Position" there is only 3 options (which are technically two options,either keep it open or close the form then show a message.

The difference would be:
I would like another option:
Keep it open and restart the timer for another 30 days (for example if I set it to 30 days).

Expected Behavior

Countdown restarts when it reaches its end.

Possible Solution

Addition of another option. I know no codes. Can't help with that.

Steps to Reproduce (for bugs)

This is not a bug, but an enhancement or suggestion.

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.