Commit Graph

27 Commits

Author SHA1 Message Date
Natalie Tay 1631394826 FEATURE: Show relative time when date is omitted (#18547) 2022-10-12 11:23:34 +08:00
Natalie Tay e391f71c04 FIX: Determining local date same range is erroring when there is no date (#18509) 2022-10-07 21:07:27 +08:00
Natalie Tay 7d8cda9858 FEATURE: Omit showing day when 'to' day is same as 'from' day (#18500)
Essentially,

Saturday at 2:50 PM -> Saturday at 4:38 PM becomes
Saturday at 2:50 PM -> 4:38 PM (Singapore)

Also, the displayed dates are shortened when the standalone date
is within two days. So despite the 'from' and 'to' date being the
same day, it may show 'Saturday' for 'from', and the specific date
for the 'to'. This corrects the behaviour.

(so if the current date and time is Thursday 5PM, the 'from' date
below is within 2 days, but the 'to' date is not)
Saturday at 2:50 PM -> 8 October 2022 at 9:38 PM becomes
Saturday at 2:50 PM -> 9:38 PM
2022-10-07 09:39:41 +08:00
Jarek Radosz 36c2284dea DEV: Fix typos "formated" -> "formatted" (#17156)
(nothing in all-the* relies on these)
2022-06-20 20:02:05 +02:00
Jarek Radosz ba2c7b8f35 DEV: Use the block form of module() (#17151) 2022-06-20 15:42:10 +02:00
Natalie Tay 4c46c7e334 DEV: Remove xlink hrefs (#15059) 2021-11-25 15:22:43 +11:00
Jarek Radosz 906a71a607 DEV: Fix linting issues in core plugins (#14916) 2021-11-13 15:31:42 +01:00
Jarek Radosz 4ad77f3382 DEV: Remove .es6 extensions from core (#14912)
Still supported in plugins though.
2021-11-13 12:51:53 +01:00
Jarek Radosz d162229758 DEV: Replace equal() with strictEqual() (#14827) 2021-11-08 10:26:28 +01:00
Krzysztof Kotlarek 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
Robin Ward 77d33ebe21 FIX: Lots of plugin tests were using old, non-Ember compat CLI APIs (#13320) 2021-06-09 10:58:55 -04:00
Joffrey JAFFEUX 49f4c75080 FIX: recurring was not working for some cases (eg: hours and unit > 1) (#11657) 2021-01-07 12:21:51 +01:00
Joffrey JAFFEUX 8af6e72675 FIX: ensures recurring works when setting a start date in future (#11587) 2020-12-29 20:11:18 +01:00
Roman Rizzi bbe5d8d5cf DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
Jarek Radosz a17d54d0bf DEV: De-arrowify tests (#11068)
Using arrow functions changes `this` context, which is undesired in tests, e.g. it makes it impossible to setup things like pretender (`this.server`) in `beforeEach` hooks.

Ember guides always use classic functions in examples (e.g. https://guides.emberjs.com/release/testing/test-types/), and that's what it uses in its own test suite, as do various addons and ember apps.

It was also already used in Discourse where `this` was required. Moving forward, it will be needed in more places as we migrate toward ember-cli.

(I might later add a custom rule to eslint-discourse-ember to enforce this)
2020-10-30 17:37:32 +01:00
Robin Ward 1e4c0d1857 Remove more global variables from tests.
* Use `sinon` instead of `sandbox` and require an import.
* You need to import `currentURL` to use it.
2020-10-26 13:32:11 -04:00
Robin Ward 3862036422 REFACTOR: Use imports for sinon and setResolver
I also took the opportunity with this commit to move some test specific
stuff out of `discourse-loader` which is loaded on the front end of the
application. The test module building now happens in the `test_helper`
bundle.
2020-10-09 13:54:54 -04:00
Robin Ward 71d37953d5 REFACTOR: Import QUnit and related helpers rather than globals
We used many global functions to handle tests when they should be
imported like other libraries in our application. This also gets us
closer to the way Ember CLI prefers our tests to be laid out.
2020-10-07 11:50:49 -04:00
Joffrey JAFFEUX 2b254f4305 FIX: removes time from date in calendar range at midnight (#10751) 2020-09-28 10:39:21 +02:00
Joffrey JAFFEUX 110f6ec6dd DEV: fixes eslint/prettier on github actions (#10601) 2020-09-04 20:01:14 +02:00
Joffrey JAFFEUX b2a2e4f1e5 FIX: ensures seconds are displayed when used with dates (#10170) 2020-07-06 09:26:31 +02:00
Joffrey JAFFEUX 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
Joffrey JAFFEUX 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
Joffrey JAFFEUX 6171141211 UX: displays full date time when displaying ranges (#9386) 2020-04-08 10:44:06 +01:00
Joffrey JAFFEUX 6d0ba74b98 UX: Ensures timezone is used over localTimezone when displaying dates 2020-04-08 10:43:47 +01:00
Joffrey JAFFEUX 66d375cb1d UX: display zones without prefix to reduce noise (#9383) 2020-04-08 11:02:00 +02:00
Joffrey JAFFEUX 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