e28a2735bc
FIX: correctly defines data-attributes used by local-dates ( #14418 )
...
This was previously relying on data-* being allowed by other initialisers which could cause bugs if local dates ends up being used in other contexts.
2021-09-22 16:49:45 +02:00
82b7e34f30
FEATURE: local dates range on click ( #14355 )
...
This PR is introducing 2 changes.
1. Date popup is displayed on click instead on hover
2. If the range is given then the whole range is always displayed for both startDate and endDate
3. For range, short time is displayed for end if the range is < 24 hours
2021-09-20 09:23:18 +10:00
11668ee85b
PERF: generates dates tooltip on demand ( #13944 )
2021-08-04 16:28:07 +02:00
d23c0c06c3
PERF: reduces rendering time of local-dates ( #13931 )
...
- prefers insertAdjacentHTML over innerHTML as it's much faster in this case (about 5x)
- memoizes tz.guess()
- memoizes list of timezones
- inlines template
- applies main element class in one pass
All in all for a very edge case of about 80 dates it should be faster of about 15/20ms.
2021-08-04 08:27:22 +02:00
aa56e2a758
DEV: Don't use the Ember global ( #13535 )
2021-06-29 19:54:18 +02:00
59097b207f
DEV: Correct typos and spelling mistakes ( #12812 )
...
Over the years we accrued many spelling mistakes in the code base.
This PR attempts to fix spelling mistakes and typos in all areas of the code that are extremely safe to change
- comments
- test descriptions
- other low risk areas
2021-05-21 11:43:47 +10:00
49f4c75080
FIX: recurring was not working for some cases (eg: hours and unit > 1) ( #11657 )
2021-01-07 12:21:51 +01:00
8af6e72675
FIX: ensures recurring works when setting a start date in future ( #11587 )
2020-12-29 20:11:18 +01:00
76b04afca3
FIX: Local dates showed incorrect timezones with extra whitespace ( #11408 )
...
You might wonder why this matters. It turns out in some locales like
French, we replace quotation marks with « and » -- this should likely
not happen before BBCode is parsed but that is not the case for this
plugin. The plugin has code to handle this situation, but it means extra
spaces are inserted around the time zone which breaks it.
This fix allows us to supply extra whitespace and will show the correct
time zone.
2020-12-08 10:57:18 +11:00
bbe5d8d5cf
DEV: Sort imports alphabetically ( #11382 )
2020-12-01 15:31:26 -03:00
dbec3792b7
FIX: pretty text allow list ( #10977 )
...
Reword whitelist to allowlist in pretty-text.
This library is used by plugins so we need deprecation notice.
2020-10-28 13:22:06 +11:00
b6492356cb
FIX: removes duplicate “ and adds ‘ and ’ ( #11010 )
2020-10-23 10:35:43 +02:00
6811902a70
FIX: converts “ and ” to " in local dates ( #10987 )
2020-10-21 17:16:36 +02:00
f4842ae283
FIX: attempts to convert french quotes to regular quotes in dates ( #10986 )
2020-10-21 16:36:51 +02:00
2b254f4305
FIX: removes time from date in calendar range at midnight ( #10751 )
2020-09-28 10:39:21 +02:00
bf88410126
DEV: apply coding standards to plugins ( #10594 )
2020-09-04 13:51:53 +02:00
4f7a9802e7
FIX: prefer timezones over timezone for previews ( #10506 )
...
eg:
timezone="America/Detroit"
timezones="US/Eastern"
Before this commit we would show America/Detroit in previews and not US/Eastern, given US/Eastern and America/Detroit are equivalent.
After this commit, we will display the date with America/Detroit but show US/Eastern in the previews.
2020-08-21 16:31:50 +02:00
b2a2e4f1e5
FIX: ensures seconds are displayed when used with dates ( #10170 )
2020-07-06 09:26:31 +02:00
26260d50b1
DEV: Import I18n
in standard plugins ( #10098 )
2020-06-22 02:36:45 +02:00
e990d8adce
FIX: ensures preview is correctly computing timezone for current user ( #9758 )
...
This also fixes a related bug with timezones on displayed date when in calendar range.
2020-05-12 12:30:41 -07:00
2f714c7412
FIX: end date of ranges in html preview was incorrect ( #9654 )
...
This commit also remove an unused block of code as previewedTimezones can't be empty anymore.
2020-05-06 17:16:36 +02:00
6171141211
UX: displays full date time when displaying ranges ( #9386 )
2020-04-08 10:44:06 +01:00
6d0ba74b98
UX: Ensures timezone is used over localTimezone when displaying dates
2020-04-08 10:43:47 +01:00
66d375cb1d
UX: display zones without prefix to reduce noise ( #9383 )
2020-04-08 11:02:00 +02:00
25f95af418
REFACTOR: local dates to improve reliability with DST and recurrence ( #9379 )
...
This commit improves testing and separates local-date generation from dates with zone manipulations.
2020-04-08 08:53:21 +02:00
3d1b6b6729
FIX: handle german quotes in discourse local-dates ( #8386 )
...
https://meta.discourse.org/t/insert-date-timezone-is-always-utc-my-timezone-is-ignored/126307
2019-11-21 11:43:35 +01:00
bf05a8da96
FEATURE: adds countdown attribute to [date] ( #8037 )
...
When used, dates will be displayed as a countdown in a human friendly way.
2019-08-24 11:39:20 -05:00
52332ccd72
FIX: uses aria-label instead of title as it's useless with popover ( #7258 )
2019-03-26 16:31:48 +01:00
c08b2ddecf
FIX: stricter matching on local-dates ( #7023 )
2019-02-18 22:39:45 +01:00
9703fa2abc
UX: improves dates display in emails ( #6805 )
2019-01-16 12:53:41 +01:00
b0d08b5a8c
FEATURE: refactoring and better handling of special cases ( #6666 )
2018-11-26 14:20:32 +01:00
3ff3bb6e2a
FIX: improves code, tests and utc handling of local-dates ( #6644 )
2018-11-22 17:19:24 +01:00
bfa25487eb
FIX: Support for local-date email preview without time attribute
2018-10-16 16:19:43 +05:30
2c8c1bf188
Rename timezone attribute and add it to local date details field
2018-10-16 05:04:55 +05:30
2502a3f780
FIX: email preview content not updated in second local date
2018-10-12 03:56:35 +05:30
ee9d4f5516
UX: Make time attribute optional and set default timezones
2018-10-12 03:11:57 +05:30
e8e5276f30
Remove extra semicolon
2018-10-10 04:29:34 +05:30
98865e86da
DEV: Use simple UTC datetime format for local date inner text
2018-10-10 03:49:49 +05:30
7a6c227fa4
UX: Use local timezone for insert date modal result
2018-10-09 20:15:32 +05:30
53d34c69fc
Fix lint.
2018-09-17 10:26:48 +08:00
4b3c2490c3
FIX: allowes forcing timezone displayed in local-dates
...
Use case being you might want to always display a specific timezone, but still have the possibility to show the tooltip with various timezones.
2018-09-17 10:06:57 +08:00
3ed9533066
FEATURE: adds support for seconds in local-dates ( #6339 )
2018-08-30 12:38:05 +02:00
89e7d95cc7
SECURITY: prevents XSS in local-dates
2018-08-27 11:19:30 +02:00
60ff0e9b8c
missing prettified files
2018-06-15 18:42:20 +02:00
54a9073d94
FIX: do not cook local date without attributes
2018-05-24 10:56:04 +02:00
9a5aa39740
FIX: improves discourse-local-dates rendering in emails
2018-05-18 15:35:37 +02:00
bb377e2021
delete swap files
2018-05-05 15:28:07 +10:00
cc701d2f7c
better fix
2018-05-04 14:45:32 -04:00
b4f6beebd1
FIX: recurring attribute was undefined on local-dates cooked posts
2018-05-04 14:22:37 -04:00
2ed7b6e459
lots of missing files
2018-05-04 16:54:31 +10:00