Commit Graph

1561 Commits

Author SHA1 Message Date
Discourse Translator Bot 2976b63094
Update translations (#15540) 2022-01-11 14:21:34 +01:00
Krzysztof Kotlarek 17ec3bc5b9
FEATURE: date-range tag for local dates (#15474)
New range tag for local dates with syntax like:
```
[date-range from=2022-01-06T13:00 to=2022-01-08 timezone=Australia/Sydney]
```

Previously, 2 dates in one line were considered as range. It was hard to decide if 2 dates are range when they were in separate lines or have some content between them.

New explicit tag should clearly distinguish between single date and range.

Common code from `addLocalDate` is extracted to `addSingleLocalDate`.

Both `addLocalDate` and new `addLocalRange` are using `addSingleLocalDate`.

Also, `defaultDateConfig` was extracted to have one place for all possible parameters.
2022-01-10 08:02:36 +01:00
Alan Guo Xiang Tan cd13524e26 FIX: Disable cast votes button for multiple polls with no min.
Multiple polls can be created without the min attribute but that means
the attribute defaults to 1. A default of 0 does not make any sense
because it is equivalent to saying that a user is not casting any votes.
2022-01-10 10:03:17 +08:00
Penar Musaraj 1ed2520589
DEV: Fewer jQuery calls in offset calculation (#15465) 2022-01-07 16:02:03 -05:00
Alan Guo Xiang Tan 21822cf0b7 FIX: Error when voting on a multiple poll without the min/max attrs. 2022-01-05 11:31:18 +08:00
Discourse Translator Bot a82e0db5ba
Update translations (#15446) 2022-01-04 17:39:32 +01:00
Penar Musaraj 879e35195a
DEV: Small refactor to header offset (#15421)
Centralizes calculations in a helper under the site header component.

This also reverts a small CSS change to the composer: since ac79c5ef,
the composer height was not including the grippie, which means that the
composer height was off by 11 pixels, and the topic progress widget was
sometimes being displayed cut off by 11 pixels.
2021-12-29 11:03:21 -05:00
Discourse Translator Bot c665003203
Update translations (#15416) 2021-12-28 14:13:58 +01:00
Jarek Radosz 0b34d5ac6c
UX: Maximize the preview space in composer (#15188)
A follow-up to #15117 and #15141. Applies the previous changes to PM-specific fields, makes the preview area take the all the available height of the composer, and unifies more spacing between composer elements.
2021-12-24 12:38:33 +01:00
Discourse Translator Bot 8a67be0339
Update translations (#15353) 2021-12-22 18:30:09 +01:00
Penar Musaraj 48b7696dbc
DEV: Remove jQuery animate calls (#15321)
Affects j/k navigation and PM interaction with @discobot.
2021-12-16 11:00:09 -05:00
Penar Musaraj 9fd92f329e
DEV: remove `showHtml` jQuery plugin (#15316) 2021-12-15 13:13:06 -05:00
Joffrey JAFFEUX 27fda37a8f
DEV: removes jQuery usage from extend-for-poll (#15289) 2021-12-14 16:52:18 +01:00
Discourse Translator Bot 4afd6f0189
Update translations (#15292) 2021-12-14 14:53:35 +01:00
David Taylor a6230b8138
UX: Improve composer presence-display positioning (#15235)
Previously the discourse-presence plugin was using a `position: absolute` hack to display the 'replying...' users in the top right of the composer. This commit adds a more suitable plugin outlet, and updates the discourse-presence styling so it slots into the flex-box layout at the top of the composer
2021-12-08 16:18:49 +00:00
Discourse Translator Bot 3fec579ede
Update translations (#15210) 2021-12-07 16:19:44 +01:00
Penar Musaraj 732678f642
UX: Fix alignment in group navigation bar (#15169)
Same as #15145.
2021-12-02 09:45:33 -05:00
Martin Brennan 4bdb956a0d
Revert "UX: Fix alignment in group navigation bar (#15145)" (#15150)
This reverts commit 01830f9d28.

This broke sidebar and could have affected customer themes
on a full enterprise deploy.
2021-12-01 16:13:03 +11:00
Penar Musaraj 01830f9d28
UX: Fix alignment in group navigation bar (#15145) 2021-12-01 11:49:34 +11:00
Discourse Translator Bot b12f89e351
Update translations (#15140) 2021-11-30 21:06:39 +01:00
David Taylor 2eb162e25b
FEATURE: Show user cards for 'replying...' users (#15142)
Also removes some unneeded parameters from the `avatar` helper.
2021-11-30 18:57:57 +00:00
Jarek Radosz 2971d03307
DEV: Don't create unnecessary scope methods (#15104)
Skipping methods we don't use gives us mem/perf gains (minuscule but still), but more importantly fixes warnings about `Poll#open` (created by `enum :status`) conflicting with some internal AR method. 😃
2021-11-26 16:34:07 +01:00
Natalie Tay 4c46c7e334
DEV: Remove xlink hrefs (#15059) 2021-11-25 15:22:43 +11:00
Discourse Translator Bot 563b27b763
Update translations (#15065) 2021-11-23 17:29:39 +01:00
Jarek Radosz 5a8e6de42c
FIX: Don't publish polls on message bus when there are no polls (#15041)
`poll` plugin was publishing on `/polls/[topic_id]` every time a non-first post was created. I can't imagine this being needed. It regressed 3 years ago in https://github.com/discourse/discourse/pull/6359
2021-11-22 12:31:53 +01:00
Mark VanLandingham a9d5921901
FIX: Allow poll feature to be disabled in discourse-markdown (#15025) 2021-11-19 15:10:47 -06:00
Alan Guo Xiang Tan 1d0faedfbc
FIX: Validate number of votes allowed per poll per user. (#15001)
* DEV: Remove spec that we no longer need.

As far as we know, the migration has been successful for a number of
years.

* FIX: Validate number of votes allowed per poll per user.
2021-11-19 09:50:08 +08:00
Discourse Translator Bot 8420cf047e
Update translations (#14970) 2021-11-16 16:17:10 +01:00
Jarek Radosz 4f14e012a7
DEV: Replace `$.extend` with `Object.assign` (#14921) 2021-11-14 10:59:22 +01:00
Jarek Radosz 906a71a607
DEV: Fix linting issues in core plugins (#14916) 2021-11-13 15:31:42 +01:00
Jarek Radosz f414d5eace
DEV: Use method definition syntax consistently (#14915) 2021-11-13 14:01:55 +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 9c6ad955aa
DEV: Fix one more use of `jQuery` global (#14910) 2021-11-12 20:22:43 +01:00
Martin Brennan 431f0dce4c
DEV: Update discourse-local-dates for eslint shorthand rule (#14872)
See 4f7aba06c0
2021-11-10 11:58:11 +11:00
Kris a87216f1f3
A11Y: set modal widths with EMs; improves scaling (#14863) 2021-11-09 14:56:05 -05:00
Discourse Translator Bot 5d20304f95
Update translations (#14855) 2021-11-09 14:54:59 +01:00
David Taylor 8063489dc9
FIX: Include admins in presence reply channel permissions (#14839)
Admins can see all regular topics, regardless of category permissions
2021-11-08 13:54:02 +00:00
Jarek Radosz d162229758
DEV: Replace `equal()` with `strictEqual()` (#14827) 2021-11-08 10:26:28 +01:00
Discourse Translator Bot 6894b3f3af
Update translations (#14792) 2021-11-02 18:49:00 +01:00
David Taylor 79ad0860a2
FIX: Cleanup PresenceChannel instances when composer closed (#14741)
I was previously relying on `this.isDestroying` returning `true` during `willDestroyElement`. This was an incorrect assumption.

This commit refactors the logic into an explicit `cleanup` function, and also adds some cleanup for empty keys in the `subscribedProxy` array
2021-10-27 15:17:10 +01:00
Discourse Translator Bot 0f71a43434
Update translations (#14714) 2021-10-27 14:24:43 +02:00
David Taylor b57b079ff2
DEV: Update discourse-presence plugin to use new PresenceChannel system (#14519)
This removes all custom controllers and redis/messagebus logic from discourse-presence, and replaces it with core's new PresenceChannel system.

All functionality should be retained. This implementation should scale much better to large numbers of users, reduce the number of HTTP requests made by clients, and reduce the volume of messages on the MessageBus.

For more information on PresenceChannel, see 31db8352
2021-10-21 12:42:46 +01:00
Discourse Translator Bot 25097fa0af
Update translations (#14648) 2021-10-19 15:23:54 +02:00
Arpit Jalan d1fc759ac4
FIX: remove 'crawl_images' site setting (#14646) 2021-10-19 17:12:29 +05:30
Krzysztof Kotlarek 9062fd9b7a
FIX: improvements for download local dates (#14588)
* FIX: do not display add to calendar for past dates

There is no value in saving past dates into calendar

* FIX: remove postId and move ICS to frontend

PostId is not necessary and will make the solution more generic for dates which doesn't belong to a specific post.

Also, ICS file can be generated in JavaScript to avoid calling backend.
2021-10-14 09:22:44 +11:00
Discourse Translator Bot b44119cdb2
Update translations (#14579) 2021-10-12 16:00:22 +02:00
David Taylor 837bd5a6e5
FIX: Fix local-dates in non-post contexts, and in long topics (#14565)
- Stop looking up the topic title from the DOM. On long topics, the topic title may not be present. Instead, we can store the topic title in a data-title attribute during decorateCookedElement, and then access it later. This approach would also allow us to add customize titles per-local-date in future. If there is no topic title available (e.g. when local dates are used elsewhere in the UI), we use the site name to build a sensible default

- Don't require a postId for creating calendar events. We don't have postIds in non-post contexts. At the moment, the 'download ICS' function will fail without a valid postId, so that will need to be fixed in a future commit.
2021-10-08 20:22:52 +01:00
Bianca Nenciu 98d2836eb4
FIX: Disable Show results if nobody voted (#14528) 2021-10-06 17:51:46 +03:00
Krzysztof Kotlarek 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
Krzysztof Kotlarek 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