Localised inline date/time

@sam can you please elaborate on this?
My forum is still in an invitation-only stage, so before going public, it would be useful to know if major changes are incoming, which could break themes, plugins etc.

Just checked the Insert Date for the first time and the user interface feels very technical.

I suggest revising the user side:

  • drop the [Advanced Mode] button, it will just scare people off, while hiding useful information
  • replace the input box and time format symbols with a simple menu (or a selection list) displaying available time formats, as fully formatted text, not symbols.
  • replace “Use “\T\Z” to display the user timezone in words (Europe/Paris)” with a selection box [display timezone in words]

The idea is to hide the formatting codes from the UI. They would still be seen in the composer as source code and in the admin plugin config.

IMO, the following:

  • 8:30 PM
  • 8:30:25 PM
  • September 4, 1986
  • September 4, 1986 8:30 PM

is much more user-friendly than:

  • LT
  • LTS
  • LL
  • LLL

Per:

https://github.com/discourse/discourse/commit/741898a106985b86325e35fd3cacde7b48360aab

The element formerly known as [discourse-cronos] is now known as [date]

So:

[discourse-cronos recurring=1.months;time=05:19;date=2018-05-04;format=LTS;timezones=Europe/Paris|America/Los_Angeles;]

Becomes:

[date=2018-05-04 recurring=1.months time=05:19 format=LTS timezones="Europe/Paris|America/Los_Angeles"]

I find this a lot more readable.

So this … is both good news and bad news.

Wired: :syringe:

  • Syntax is far easier to read in posts
  • Syntax is more compact
  • Cronus the imprisoned Titan is further imprisoned and not visible in Markdown

Tired :sleeping:

  • If you were using Chronos in the past… all dates are broke. And a simple regex is not going to save you.

Still waiting on @codinghorror to decide if we want to rename the actual plugin to discourse-shared-dates which is a boring name that properly conveys what this thing tries to do.

6 Likes

We might as well do the renaming now and get all the breaking out at once…

2 Likes

Should I go with discourse-shared-dates, discourse-local-dates? something else?

maybe local-dates since it is about your local timezone?

2 Likes

Sounds good to me! making it happen.

@sam is this the final format or more changes are expected?

final is a very loaded word… I hope not to need any changes … but who knows.

4 Likes

I feel more comfortable with date as the bbcode. Hoping this doesn’t goes drastically to a different route. Small edits are okay.

The big rename is now done.

https://github.com/discourse/discourse/commit/c81854ad14f265d6cf1d409fa174eb68b166fb04

14 Likes

This topic was automatically closed after 3 days. New replies are no longer allowed.