Commit Graph

19 Commits

Author SHA1 Message Date
4285706d97 FIX: local date trim when no time available (#14525)
When there is a blank space in the end of date, moment is returning a different value:

```javascript
  console.log(moment.tz("2021-09-09 ", "Australia/Sydney").toISOString());
  // 2021-09-09T00:00:00.000Z
  console.log(moment.tz("2021-09-09", "Australia/Sydney").toISOString());
  // 2021-09-08T14:00:00.000Z
```
2021-10-06 16:18:32 +11:00
cb5b0cb9d8 FEATURE: save local date to calendar (#14486)
It allows saving local date to calendar.
Modal is giving option to pick between ics and google. User choice can be remembered as a default for the next actions.
2021-10-06 14:11:52 +11:00
62b27ea9f3 DEV: Fix moment warnings (#14482)
When start/end was missing the time component the string passed to `moment()` would have a space at the end. This was causing these warnings:

```
Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.
```
2021-09-30 22:07:48 +02:00
c9e7b64a64 DEV: Add toolbar button when chat in installed (#14422) 2021-09-22 13:46:06 -05:00
38c3a44bf9 FIX: return empty array when no parent for range (#14386)
If parent element for range does not exists, range calculator should
return empty array. In that case duration calculations will stop because
of:

```
if (_rangeElements(element).length === 2) {
  opts.duration = _calculateDuration(element);
}
```
2021-09-20 16:03:02 +10: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
09764291b1 FIX: In test mode, initializers were modifying classes over and over
This adds a new property, `pluginId` which you can pass to `modifyClass`
which prevent the class from being modified over and over again.

This also includes a fix for polls which was leaking state between tests
which this new functionality exposed.
2021-09-02 11:22:01 -04:00
4ca34940d3 DEV: ensures container is not destroyed before showing tooltip (#13992)
In fast tests it could results in an error.
2021-08-10 11:48:31 +02: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
bbe5d8d5cf DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
bf88410126 DEV: apply coding standards to plugins (#10594) 2020-09-04 13:51:53 +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
c322cccd53 FIX: Memory Leaks when decorating posts (#7749)
* Remove long-deprecated method

* FIX: Memory Leaks when decorating posts

Previously we'd keep creating mixins dynamically when decorating the
same class.

This code changes the API to recommend an `id` parameter for each
decorator which will avoid leaks. All plugins should be updated to
include this parameter, although if they don't in the meantime it'll
just mean a warning in the console (and a continued leak.)
2019-06-11 17:21:23 +02:00
5e68c5f851 UX: moves local-dates from popupMenu to toolbar (#7335) 2019-04-08 15:52:09 +02:00
8fb63b2706 FEATURE: unified popover implementation (#7244) 2019-03-26 15:43:27 +01:00
60ff0e9b8c missing prettified files 2018-06-15 18:42:20 +02:00
7285e7fbba FIX: uses tooltip to display local dates previews 2018-05-22 13:58:06 +02:00
Sam
2ed7b6e459 lots of missing files 2018-05-04 16:54:31 +10:00