contact-widgets icon indicating copy to clipboard operation
contact-widgets copied to clipboard

Hours of Operation Widget

Open EvanHerman opened this issue 8 years ago • 19 comments

Creating an hours of operation widget.

EvanHerman avatar Dec 13 '16 18:12 EvanHerman

@EvanHerman I feel we might be too restrictive. What about we propose a free text alternative on every field (that way if they close for lunch they can manually add the instruction)?

@fjarrett Any thoughts?

jonathanbardo avatar Dec 13 '16 21:12 jonathanbardo

@jonathanbardo I see what you mean, but we need to use micro-formats which will be difficult to display semantically in a machine-readable way without a day/open/close data pattern to work with. https://schema.org/openingHours

frankiejarrett avatar Dec 13 '16 21:12 frankiejarrett

@fjarrett I agree, I wouldn't make it default for sure but I want to be as inclusive as we can. The use case we solved won't work for most European countries so I'm thinking we should at least have the possibility of free text. Also, I think we should add an extra textarea at the end for further details (for example: closed during holidays and 1 month in summer etc).

jonathanbardo avatar Dec 13 '16 21:12 jonathanbardo

@jonathanbardo Yeah that's a fantastic idea!

frankiejarrett avatar Dec 13 '16 21:12 frankiejarrett

@jonathanbardo How do you propose we add the text field for free text? Should it be visible at all times, and just override the open - close text if present?

Also, why wouldn't this scale for most European countries?

EvanHerman avatar Dec 13 '16 22:12 EvanHerman

@EvanHerman I know a lot of European countries where they close during lunch time or are totally closed in August for example. With the current implementation it would be impossible for them to express that.

As for the free text I would say we should add a toggle to add more details and hide it by default.

jonathanbardo avatar Dec 13 '16 22:12 jonathanbardo

@jonathanbardo Right, right. I forgot about the lunch breaks in other countries - good catch, didn't cross my mind. 👍

I will get working on the micro formats, free text and additional info fields!

EvanHerman avatar Dec 13 '16 22:12 EvanHerman

@EvanHerman Travis seems to be failing https://travis-ci.org/godaddy/wp-contact-widgets/jobs/183766078. store_closed var is never used in admin.js line 188

jonathanbardo avatar Dec 14 '16 15:12 jonathanbardo

@jonathanbardo The acceptance tests should be passing now. I'll still need to write some acceptance tests for the new Hours of Operation widget when all of the features are built out.

EvanHerman avatar Dec 14 '16 16:12 EvanHerman

I can't quite figure out why the acceptance tests are failing either. https://travis-ci.org/godaddy/wp-contact-widgets/builds/184093233

I can see why in the log, but it looks like it should be passing.

EvanHerman avatar Dec 14 '16 23:12 EvanHerman

@EvanHerman Sometimes Selenium is acting weird. When only 1 builds fails I normally try to restart that particular build. I will find some time to look into why it's acting so weird in travis.

jonathanbardo avatar Dec 15 '16 14:12 jonathanbardo

@jonathanbardo Yea, it was a bit sporadic. It would work every so often after I re-ran the tests, but most of the time it would fail. It seemed like something was timing out and causing the tests to fail.

EvanHerman avatar Dec 15 '16 14:12 EvanHerman

@EvanHerman @jonathanbardo Love the progress here, not a fan of the UI yet.

It seems that each day could have several controls associated with it, so what do you think about being able to expand/collapse each one? It would also allow the ability to have multiple time blocks on a single day (e.g. 9a-12p, 1p-5p).

screen shot 2016-12-19 at 9 52 29 am

frankiejarrett avatar Dec 19 '16 16:12 frankiejarrett

@fjarrett I'm liking that UI a bit better. 👍 I agree, it is a little cluttered. I can run with that and see what I can spin up.

EvanHerman avatar Dec 19 '16 16:12 EvanHerman

@fjarrett That UI does look pretty cool. Adding multiple time block would definitely give people more flexibility.

jonathanbardo avatar Dec 19 '16 16:12 jonathanbardo

@jonathanbardo Would multiple time blocks eliminate the need for the "Custom Text" option on each day?

frankiejarrett avatar Dec 19 '16 16:12 frankiejarrett

@fjarrett Definitely. I would still keep the possibility to add free text at the end though.

jonathanbardo avatar Dec 19 '16 16:12 jonathanbardo

@fjarrett I think this is ready for another review with the new UI in place.

EvanHerman avatar Dec 20 '16 18:12 EvanHerman

@fjarrett I believe in the latest commit I incorporated what you were referencing.

I also went ahead and bumped font awesome up to 4.7.0, since 4.5.0 is somewhat outdated. I added the version number as a class property so we can easily bump it in future. I know Font awesome 5 is in the works.

EvanHerman avatar Jan 03 '17 17:01 EvanHerman