Project

General

Profile

Actions

Feature #4049

closed

Remove JS timepicker for Event Organiser

Added by Boone Gorges almost 9 years ago. Updated over 7 years ago.

Status:
Resolved
Priority name:
Normal
Assignee:
Category name:
Events
Target version:
Start date:
2015-05-12
Due date:
% Done:

0%

Estimated time:
Deployment actions:

Description

See http://commons.gc.cuny.edu/?p=39468

The suggestion is (a) to remove the jQuery timepicker and (b) to replace with three dropdowns: hour, minute, am/pm.

I agree with (a). The timepicker is weird.

I think that (b) is going to be cumbersome, given that there are start and end dates. Other ideas:

1. Use two dropdowns instead. The hour dropdown would somehow contain the am/pm distinction.
2. Use a Google Calendar-inspired option: text-entry field that, when clicked, shows a list of half-hour increments to choose from. Values that are not on the half-hour can be entered by hand.

I think (2) is pretty elegant, but it's likely/possible that we'd have to build it ourselves. The dropdowns, in contrast, are easy to implement.

Assigning to Sam for initial thoughts.


Files

1_Two Dropdowns.jpg (88.2 KB) 1_Two Dropdowns.jpg Samantha Raddatz, 2015-05-12 04:54 PM
3_Editable text w Dropdown.png (8.48 KB) 3_Editable text w Dropdown.png Samantha Raddatz, 2015-05-12 04:54 PM
Actions #1

Updated by Samantha Raddatz almost 9 years ago

1. Use two dropdowns instead. The hour dropdown would somehow contain the am/pm distinction.

Attached is a IRL example of this (1_Two Dropdowns.jpg). Looks a little strange, but clear enough, I think.

2. Use a Google Calendar-inspired option: text-entry field that, when clicked, shows a list of half-hour increments to choose from. Values that are not on the half-hour can be entered by hand.

This would be awesome/ideal! But it if's cumbersome to create, not a big enough feature to spend too much time on.

I'd like to add an option 3:
Pre-filled text that is editable with a dropdown for AM/PM (see 3_Editable text w dropdown). The colon is static but the numbers on either side can be edited manually. I think this is more eloquent that option #1 but possibly be harder to create.

I defer to you based on coding-complexity, Boone. Any of the 3 would be cool, with my preference order being 2, 3, 1.

Actions #2

Updated by Boone Gorges almost 9 years ago

  • Status changed from New to Assigned
  • Assignee changed from Samantha Raddatz to Raymond Hoh
  • Target version changed from Future release to 1.9

http://www.jqueryscript.net/time-clock/Google-Calendar-Like-jQuery-Data-Time-Range-Picker-datepair.html Looks like we can probably steal this for the Google Calendar option. MIT licensed. Ray, you want to have a look? Again, this is potentially an upstream improvement - my opinion is that it's much better than what's currently in Event Organiser, but I suppose that's subject to opinion.

Actions #3

Updated by Raymond Hoh almost 9 years ago

For my reference, this is a link to the source:
https://github.com/jonthornton/Datepair.js

Actions #4

Updated by Raymond Hoh over 8 years ago

  • Status changed from Assigned to Hold

I've submitted a pull request to the Event Organiser repo with the new Datepair.js / timepicker JS.

Here's what it looks like:

Going to set this ticket to "Hold" for now until Event Organiser decides to merge it.

Actions #5

Updated by Boone Gorges over 8 years ago

It looks like this is not going to be in EO in time for us to ship it with 1.9. Ray, how modular is it? Is it worth backporting for CAC?

Actions #6

Updated by Raymond Hoh over 8 years ago

Is it worth backporting for CAC?

I had to make modifications to the core Event Organiser JS file. So if we were to backport this, we would need to remove EO's core JS and use an interim copy of it.

I would say 'no' but I would implement this if the community needed it.

Actions #7

Updated by Boone Gorges over 8 years ago

  • Target version changed from 1.9 to 1.10

I would say 'no' but I would implement this if the community needed it.

Having glanced over the PR, I suspected the same thing. I just wanted to check :) I'm going to move this to the 2.0 milestone, and we'll move it back to a minor release once EO 3.0 has been released.

Actions #8

Updated by Boone Gorges over 7 years ago

Looks like this improvement got bumped from EO's next milestone.

I read over the GitHub thread, and it's not clear to me whether Stephen thinks that there are insurmountable problems with the design of jQuery Time Picker (the 24-hour duration thing), or whether he just thinks it needs to be embedded in a proper Start/End UI that needs a bit of design consideration on the EO end.

Ray, do you have a sense of how hard it'll be to restart the conversation on the PR? If it seems like it's going to be a lot of work, can you give me a sense of how much work it'd be to implement it as a plugin? We might have better luck petitioning for a filter on the function that generates the EO markup in the short term. Or we might be able to swap out the picker dynamically using JS.

I don't think that this change is so critical that it warrants a huge amount of time to develop workarounds or to push for an upstream improvement. If you think it's within reach with a few hours' work, I'd say go for it. If you think it's going to take longer, I think we should set it aside until Stephen decides how/whether he'd like to prioritize the PR for EO.

Actions #9

Updated by Raymond Hoh over 7 years ago

  • Status changed from Hold to Resolved

For now, I've ensured that our customized version of timepicker is running from BPEO instead of EO (see BPEO commit 498e989.

However, this means we are also forking EO's event.js, so we'll have to keep track of any upstream changes.

This is available for testing on cdev.

Actions #10

Updated by Matt Gold over 7 years ago

Paige, Steve, Scott -- can you please test? Thank you

Actions

Also available in: Atom PDF