Commit Graph

1652 Commits

Author SHA1 Message Date
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
5cce1b38e4 Update translations (#14336) 2021-09-14 16:21:00 +02:00
299d0ca445 UX: Minor layout tweaks to dropdowns (#14299)
- fixes mini-tag-chooser validation message
- fixes ellipsis overflow in mini-tag-chooser
- removes redundant `border-radius: 0` styles
- simplifies `user-notifications-dropdown` styling and adds example to styleguide
2021-09-10 09:00:41 -04:00
24e71acf3f UX: Normalize sizing for inputs, buttons, dropdowns (#14226)
See PR for details
2021-09-09 11:01:56 -04:00
5c0ad215af UX: adjust button spacing (#14230) 2021-09-07 13:19:03 -04: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
c995b20ca4 Update translations (#14063) 2021-08-24 15:25:44 +02:00
6c0efd50bc linting (#14115) 2021-08-23 14:21:58 +02:00
d7c185bf3d DEV: updates chart.js to 3.5.1 (#14107) 2021-08-23 13:49:49 +02:00
cb59681d86 DEV: select-kit third major update with focus on accessibility (#13303)
Major changes included:
- better support for screen readers
- trapping focus in modals
- better tabbing order in composer
- alerts on no content found/number of items found
- better autofocus in modals
- mini-tag-chooser is now a multi-select component
- each multi-select-component will now display selection on one row
2021-08-23 10:44:19 +02:00
5eb4e642a6 DEV: Rename discourse-presence endpoints and messagebus channels (#14089)
We are working to introduce a general core API for presence, which will clash with this plugin's `/presence` namespace

This commit introduces no functional change. There may be a slight interruption in discourse-presence functionality during a deploy of this commit.
2021-08-19 13:04:31 +01:00
0e53769f71 Update translations (#13994) 2021-08-14 10:18:05 +02: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
e68c1d5ba5 DEV: Use key over the deprecated keyCode (#13795)
Makes the code a bit more readable. Inspired by https://github.com/emberjs/ember.js/pull/19185
2021-08-09 11:41:36 +02:00
11668ee85b PERF: generates dates tooltip on demand (#13944) 2021-08-04 16:28:07 +02:00
6b87ae3d4c Update translations (#13929) 2021-08-04 14:14:52 +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
465db1e5b5 FIX: Adjust poll buttons (#13924)
* FIX: Adjust poll buttons

* REFACTOR: Move styles to desktop stylesheet
2021-08-03 10:03:18 +08:00
0c422cff1e Update translations (#13898) 2021-07-30 11:30:10 +02:00
e951cb9aef Update translations (#13860) 2021-07-27 15:24:03 +02:00
3667cc6447 Update translations (#13821) 2021-07-22 12:31:19 +02:00
5eb6e9281a FIX: manually adds frowning_face_with_open_mouth for apple (#13528) 2021-07-21 23:27:20 +02:00
28b5e6e47d Update translations (#13796) 2021-07-21 10:30:34 +02:00
5f7e60d9dc discourse/discourse change from 'master' to 'main' 2021-07-19 11:46:15 -04:00
ec9a2a04f3 Fix i18n issues reported on Crowdin (#13769)
* Removes unused strings
* Clarifies some of the strings
* Fixes typos

@discourse-translator-bot keep_translations_and_approvals
2021-07-19 09:30:48 +08:00
8b89787426 SECURITY: Sanitize YouTube Onebox data (#13748)
CVE-2021-32764
2021-07-15 19:31:50 +01:00
53fe8b2e77 Update translations (#13647) 2021-07-13 20:30:09 +02:00
87c1e98571 FEATURE: Let users select flair (#13587)
User flair was given by user's primary group. This PR separates the
two, adds a new field to the user model for flair group ID and users
can select their flair from user preferences now.
2021-07-08 10:46:21 +03:00
573a71fdd9 DEV: Do not skip pages when loading polls (#13649)
In some conditions, pages were skipped. This was implemented in the past
in f490a8d, but then reverted in 04ec543, because sometimes it was stuck
reloading the first page.

The code that loads more results was simplified and a lot of duplicate
code was removed. The logic to remove users who changed their vote was
also introduced again, but just for the regular polls.
2021-07-07 13:06:08 +03:00
7925a76d93 DEV: An endpoint to check if the current user voted in a poll. (#13648)
The endpoint the existence of the poll and if the current user can see it. It
will facilitate using a poll programmatically, especially if we'd like to create an external poll through a theme component.
2021-07-06 14:46:34 -03:00
38332cae21 FIX: Multiply ratelimiter leniency for own discobot certs (#13639) 2021-07-06 10:23:57 +10:00
04ec5439f3 FIX: Poll wasn't showing all voters (#13620)
Partially revert f490a8d39a12ed2c6b125b3380f08b2d1d43ee7f because we aren't able to
load more than the initially preloaded voters.

We were always trying to load the 1st page of voters.

Also removed the "remove users who changed their vote" logic as it was not properly working in multiple choices polls.

cc @nbianca
2021-07-05 13:52:17 +03:00
37b8ce79c9 FEATURE: Add last visit indication to topic view page. (#13471)
This PR also removes grey old unread bubble from the topic badges by
dropping `TopicUser#highest_seen_post_number`.
2021-07-05 14:17:31 +08:00
b8a0e47913 UX: make poll content selectable (#13529)
When initially released, the polls had a different design that didn't interact
well with the quote button - https://meta.discourse.org/t/31586

Now that the design has evolved, not being able to select text from inside a poll is
counter productive, so it's enabled again.
2021-06-30 15:25:59 +10:00
aa56e2a758 DEV: Don't use the Ember global (#13535) 2021-06-29 19:54:18 +02:00
23930738a7 Update translations (#13565) 2021-06-29 16:02:02 +02:00
a216862fe1 Fix spelling in discourse_narrative_bot.new_user_narrative.flag.instructions
This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/278/en-fr#51512

@discourse-translator-bot keep_translations_and_approvals
2021-06-25 00:16:29 +02:00
a2b744ae25 DEV: Allow plugin tests to run in Ember CLI qunit 2021-06-24 10:13:35 -04:00
5968dc07a5 DEV: Promote historic post_deploy migrations
This commit promotes all post_deploy migrations which existed in Discourse v2.6.7 (timestamp <= 20201110110952)
2021-06-23 17:43:38 +01:00
252dd169a4 Update translations (#13476) 2021-06-22 15:21:20 +02:00
f490a8d39a FIX: Do not display twice a user who changed vote (#13284)
* FIX: Fetch last page again if incomplete

The next fetched page number used to increase continuously even if the
last page was incomplete and fetching it again could have new voters.

* FIX: Do not display twice a user who changed vote

A user could appear under two voting options when they changed their
vote because pressing the Load More Voters button updated only the
current option.
2021-06-18 18:56:54 +03:00
e305365168 FEATURE: Use responsive image sizes in post stream (#13343) 2021-06-18 09:15:03 -04:00
fc61a7c0de FIX: count is not defined lint error (#13347) 2021-06-09 11:26:26 -04:00
77d33ebe21 FIX: Lots of plugin tests were using old, non-Ember compat CLI APIs (#13320) 2021-06-09 10:58:55 -04:00
21e8a33177 DEV: Clean up QUnit tests (#13328)
* DEV: Use `query` helper instead of `queryAll()[0]`
* DEV: Replace `queryAll().length` w/ `exists()`/`count()`
* DEV: Use `exists()` instead of `count() > 0`, `count() === 0`
* DEV: Use `count()`/`exists()` instead of `find().length`
2021-06-08 17:54:12 +02:00
f941bbc147 Update translations (#13327) 2021-06-08 16:32:36 +02:00
bd2b2bcf9c DEV: Clean up the spec 2021-06-08 09:28:40 +08:00
f875079b1a DEV: Fix spec filename typo 2021-06-08 09:28:40 +08:00
0a259b94f0 DEV: Fix an ActiveModel::Errors deprecation
The warning was:

DEPRECATION WARNING: Calling `<<` to an ActiveModel::Errors message array in order to add an error is deprecated. Please call `ActiveModel::Errors#add` instead. (called from block (3 levels) in activate! at discourse/plugins/poll/plugin.rb:519)
2021-06-07 11:34:38 +08:00