Commit Graph

16264 Commits

Author SHA1 Message Date
Penar Musaraj 015ea28778
UX: Small fix for Chrome focus style on replies button (#11996) 2021-02-05 14:02:30 -05:00
Kris a2946b0728
Move category dropdown changes to desktop only (#11995)
follow-up to 615a091
2021-02-05 11:30:08 -05:00
Kris 3ed6747bf2
UX: Show caret icon on user notification dropdown (#11991) 2021-02-05 10:30:36 -05:00
David Taylor d1b289daaa
DEV: Cleanup detection of user summary route for header collapsing (#11985)
Previously it was using various willTransition and didTransition hooks
which can be quite fragile, especially when removing the
intermediate loading state.
2021-02-05 09:16:18 +00:00
Ahmed Gagan f6e6ae5e24
DEV: Allows widgets to extend post-controls (#11897) 2021-02-05 09:27:47 +01:00
Vinoth Kannan 792c2b94f6
UX: don't display tag notification menu on category page. (#11989)
If both category and tag are selected then we shouldn't display a notification menu.
2021-02-05 09:19:00 +05:30
Kris 13dba16e7b
UX: Fix reply where modal layout (#11990) 2021-02-05 14:37:02 +11:00
Martin Brennan 4af77f1e38
FEATURE: Allow durations < 1 hour and < 1 day for topic timers where duration is specified (auto delete replies, close based on last post) (#11961)
This PR allows entering a float value for topic timers e.g. 0.5 for 30 minutes when entering hours, 0.5 for 12 hours when entering days. This is achieved by adding a new column to store the duration of a topic timer in minutes instead of the ambiguous both hours and days that it could be before.

This PR has ommitted the post migration to delete the duration column in topic timers; it will be done in a subsequent PR to ensure that no data is lost if the UPDATE query to set duration_mintues fails.

I have to keep the old keyword of duration in set_or_create_topic_timer for backwards compat, will remove at a later date after plugins are updated.
2021-02-05 10:12:56 +10:00
Kris 0fb1c122f4
UX: Clarify user rejection modal (#11967) 2021-02-04 15:20:07 -05:00
Joe c307604d7f
DEV: adds below-suggested-topics plugin outlet (#11980) 2021-02-05 03:41:12 +08:00
Kris 6d6436e9e7
UX: Fix & clarify bulk notification change modal (#11969) 2021-02-04 14:35:47 -05:00
Kris c40c858233
REFACTOR: Remove d-button block helpers (#11970) 2021-02-04 14:35:23 -05:00
Penar Musaraj 2bc739eaa5
UX: Use bright color for primary button hover on dark schemes (#11979) 2021-02-04 13:31:09 -05:00
Penar Musaraj 85310f82f5
FIX: Don't cancel filtering on second "n replies" tap (#11975)
Fixes an issue introduced in 0f31a221c9.
2021-02-04 11:41:01 -05:00
Penar Musaraj eb29827e9d
UX: Adjust focus styles for topic post menu, composer cancel (#11977) 2021-02-04 10:28:35 -05:00
Kris dbb5c373ce
UX: popup menu buttons need focus style (#11962) 2021-02-04 09:37:45 -05:00
Osama Sayegh b580e3e657
DEV: Add more @ember modules for plugins compatibility with Ember CLI (#11972)
Some plugins (like discourse-calendar) import things from `@ember/string` and `rsvp`, so we need to add them in order for the plugins to work with Ember CLI.
2021-02-04 16:26:06 +03:00
Arpit Jalan 309adb82ba
UX: add a confirmation modal to "Remove All Tags" action (#11973)
UX: update label for "Remove Tags" action
2021-02-04 18:30:01 +05:30
Osama Sayegh 97b55af9cf
DEV: Use @action decorator (#11955)
Follow up to db7b7eed9d
2021-02-04 14:41:53 +11:00
Rafael dos Santos Silva d518b302a0
FIX: Composer upload icon regression because of WEBP (#11959)
Similar to
ba9fbb3443

Reported on
https://meta.discourse.org/t/image-icon-has-changed-to-upload-icon/178247?u=falco
2021-02-04 14:41:07 +11:00
Kris e7ca1ed6bf
UX: remove unneeded margin from user stream (#11964) 2021-02-04 14:39:43 +11:00
Kris 4f588a0569
UX: fix button alignment on log-in required page (#11965) 2021-02-04 14:38:58 +11:00
Kris 615a091707
UX: ensure category breadcrumbs have consistent height (#11966) 2021-02-04 14:38:12 +11:00
Robin Ward 61f5d501cb
DEV: Migrate to Ember CLI (#11932)
This encompasses a lot of work done over the last year, much of which
has already been merged into master. This is the final set of changes
required to get Ember CLI running locally for development.

From here on it will be bug fixes / enhancements.

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
Co-authored-by: romanrizzi <rizziromanalejandro@gmail.com>

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
Co-authored-by: romanrizzi <rizziromanalejandro@gmail.com>
2021-02-03 14:22:20 -05:00
Penar Musaraj 2dc48fd6c1
UX: Uniformize styles for focus states (#11933) 2021-02-03 11:45:54 -05:00
Penar Musaraj 04dd4a75af
UX: Always show confirmation dialog when converting themes/components (#11953) 2021-02-03 11:45:25 -05:00
Jarek Radosz 155ae06f62
DEV: Remove `group-members-dropdown` (#11948)
It was introduced in c82b2dcc24, but since b76731d722 and 58ee947b35 it's a single-option dropdown, so there's no need to show it (and keep it) instead of a button. We use a button for non-admins already.
2021-02-03 17:42:12 +01:00
Osama Sayegh db7b7eed9d
FIX: Restore support for pasting multiple PM recipients (#11945)
This is a regression from 98201ecc24.

Meta topic: https://meta.discourse.org/t/-/178167?u=osama.

Signed-off-by: OsamaSayegh <asooomaasoooma90@gmail.com>
2021-02-03 18:06:16 +03:00
Bianca Nenciu 901cee55cd
FEATURE: Improve group settings and members management (#11878)
This pull requests contains a series of improvements to groups
settings and member management such as:

- Showing which users have set a group as primary
- Moving similar settings together under Effects
- Adding bulk select and actions to members page
2021-02-03 16:11:08 +02:00
Bianca Nenciu 3744e49190
FIX: Refresh category order after save (#11936)
The changes were not visible immediately after saving reordered
categories.
2021-02-03 16:44:13 +11:00
Martin Brennan 6d72c8ab19
FEATURE: Topic timer UI revamp (#11912)
This PR revamps the topic timer UI, using the time shortcut selector from the bookmark modal.

* Fixes an issue where the duration of hours/days after last reply or auto delete replies was not enforced to be > 0
* Fixed an issue where the timer dropdown options were not reloaded correctly if the topic status changes in the background (use `MessageBus` to publish topic state in the open/close timer jobs)
* Moved the duration input and the "based on last post" option from the `future-date-input` component, as it was only used for topic timers. Also moved out the notice that is displayed which was also only relevant for topic timers.
2021-02-03 10:13:32 +10:00
Vinoth Kannan e6a02469ad
DEV: refresh all CDN endpoint URLs except the S3 uploads & assets. (#11937)
Using this added a temporary query param to force browsers to redownload all CDN endpoints.
2021-02-03 02:22:01 +05:30
Kris 2ee63a6a83
DEV: Update icon structure in bootbox buttons (#11925) 2021-02-02 15:47:10 -05:00
Kris 75d766499f
Update a couple buttons to use correct markup (#11926) 2021-02-02 15:46:48 -05:00
Joffrey JAFFEUX 12a4fefef6
FIX: ensures rects is present before using it (#11930)
I don't have a clear reproduction ATM, but I imagine that in fast tests element can get destroyed before we get to use it.
2021-02-02 14:43:13 +01:00
Gerhard Schlager d055552994
Fix i18n issues reported on Crowdin (#11747)
* Pluralize `groups.errors.adding_too_many_users`
  This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/248/en-ar#53882

* Pluralize `js.composer.error.title_too_short`
  This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/246/en-ar#41172

* Pluralize `js.composer.error.title_too_long`
  This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/246/en-ar#41174

* Pluralize `js.composer.error.post_length`
  This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/246/en-ar#41178

* Pluralize `js.topic.progress.jump_prompt_of`
  This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/246/en-ar#41958

* Use translations to join strings about posters
  This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/248/en-ar#49334
  It also makes some changes to the crawler view:
    * Removes `poster.moreCount` which is only available on the client for PMs
    * CSS class names are actually stored in `poster.extras` instead of `poster.extraClasses`

* Stop concatenating category stats
  This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/246/en-ar#40740

* Pluralize `js.summary.description`
  This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/246/en-ar#40782

* Pluralize `js.summary.description_time_MF`
  This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/246/en-ar#40784

* Use translation to join list of tags
  This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/246/en-ar#43372

* Pluralize `admin_js.admin.groups.manage.membership.automatic_membership_user_count`
  This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/246/en-ar#43720

* Pluralize `js.post.controls.delete_topic_confirm_modal`
  This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/246/en-ar#54804

* Stop concatenating `js.post.last_edited_on`
  This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/246/en-ar#42358

* Stop concatenating `js.post.wiki_last_edited_on`
  This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/246/en-ar#42356
  It also fixes a regression because `js.post.wiki_last_edited_on` wasn't used anymore since 2017.
2021-02-02 10:50:04 +01:00
Vinoth Kannan 9d2eaec88f
DEV: enable CORS to all CDN get requests from workbox. (#11896)
To prevent opaque cache files, now all the CDN files will be requested in 'cors' mode if the cdn_cors_enabled global setting is enabled. Before enabling the setting, should enable the cors in the CDN server by adding the response header `access-control-allow-origin: *` or `access-control-allow-origin: https://discourse.example.com.`

And other external file requests other than CDN will not be cached if the response type is opaque.
2021-02-02 11:38:29 +05:30
Martin Brennan ea1ffe390b
FIX: Show bookmark name in quick access hover (#11924)
This PR makes it so the bookmark name shows on hover in the quick access menu. A change was necessary to quick-access-item for the title to render for the link.
2021-02-02 15:04:02 +10:00
Penar Musaraj 0f31a221c9
DEV: Performance fixes to filtered replies (#11916) 2021-02-01 11:53:13 -05:00
Osama Sayegh 6efdeef461
FIX: Emoji search/autocomplete should respect selected skin tone (#11917)
This commit makes our emoji autocomplete in the composer respect the skin tone you select in the emoji picker.
2021-02-01 19:36:35 +03:00
Dan Ungureanu dd175537f3
FIX: Existing shared drafts should be accessible (#11915)
Disabling shared drafts used to leave topics in an inconsistent state
where they were not displayed as shared drafts and thus there was no
way of publishing them. Moreover, they were accessible just to users
who have permissions to create shared drafts.

This commit adds another permission check that is used for most
operations and the old can_create_shared_draft? remains used just when
creating a new shared draft.
2021-02-01 16:16:34 +02:00
Robin Ward f113648107
DEV: Migrate more tests to our Ember CLI format. (#11899)
This should be fully backwards compatible.

Co-authored-by: Jarek Radosz <jradosz@gmail.com>

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2021-02-01 09:01:47 -05:00
Osama Sayegh 98201ecc24
DEV: {{user-selector}} replacement (#11726)
This PR is the first step towards replacing our `{{user-selector}}` and eventually deprecating and removing it from our codebase. Some of `{{user-selector}}` problems are:

1. It's called `{{user-selector}}`, but in reality in can also select groups and emails.
2. It's an Ember component, yet it doesn't have a handlebars template and uses jQuery to render itself and modify the DOM. An example of this problem is when you want to clear the selected users programmatically, see [this](6c155dba77/app/assets/javascripts/discourse/app/components/user-selector.js (L179-L185)).
3. We now have select kit which does very similar things but a lot better.

This PR introduces `{{email-group-user-chooser}}` which is meant to replace `{{user-selector}}`. It extends select kit and has the same features that `{{user-selector}}` has. `{{user-selector}}` is still used in a few places in core, but they'll all be replaced with the new component in a separate commit. 

Once `{{user-selector}}` is not used anywhere in core, it'll be deprecated and then removed after the 2.7 release.
2021-02-01 13:07:11 +03:00
Robin Ward 184cd766ac Apply suggestions from code review
Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2021-02-01 10:36:02 +08:00
Robin Ward 5546fe609c Add autofocus to the change ownership modal 2021-02-01 10:36:02 +08:00
awesomerobot 2f2dd94217 left align popup-menu button text 2021-02-01 10:30:52 +08:00
Martin Brennan 0fab711e4a
FIX: Stop trying to set values on destroyed bookmark component (#11909)
* sometimes the AJAX promise to create/save the bookmark did
  not come back before the component destroyed, causing an error
  when trying to set the model id afterward. this just eliminates
  the set code and uses the response.id instead
2021-02-01 10:23:06 +10:00
Martin Brennan 3e3f3f7b7e
DEV: Add time shortcut picker component and libs and refactor bookmark modal controller into component which uses time shortcut picker (#11802)
This PR moves all of the time picking functionality from the bookmark modal and controller into a reusable time-shortcut-picker component, which will be used for the topic timer UI revamp. All of the utility JS for getting dates like tomorrow/next week/next month etc. have also been moved into a separate utility lib.

The time-shortcut-picker has a couple of options that can be passed in:

* prefilledDatetime - The date and time to parse and prefill into the custom date and time section, useful for editing interfaces.
* onTimeSelected (callback) - Called when one of the time shortcuts is clicked, and passes the type of the shortcut (e.g. tomorrow) and the datetime selected.
* additionalOptionsToShow - An array of option ids to show (by default `later_today` and `later_this_week` are hidden)
* hiddenOptions - An array of option ids to hide
* customOptions - An array of custom options to display (e.g. the option to select a post date for the bookmarks modal). The options should have the below properties:
    * id
    * icon
    * label (I18n key)
    * time (moment datetime object)
    * timeFormatted
    * hidden

The other major work in this PR is moving all of the bookmark functionality out of the bookmark modal controller and into its own component, where it makes more sense to be able to access elements on the page via `document`. Tests have been added to accompany this move, and existing acceptance tests for bookmark are all passing.
2021-02-01 09:03:41 +10:00
Kris 363170513e
UX: Allow some overflow in composer preview (#11902) 2021-01-29 20:28:56 -05:00
Robin Ward 11c812f042
Quite a few Ember-CLI / Upgrade related changes (#11867)
* Quite a few Ember-CLI / Upgrade related changes

They should all be backwards compatible. This is all to help merge our
branches.

* REFACTOR: DRY up username validation

Also avoids overwriting computed properties for compatibility with newer
Ember releases.
2021-01-29 10:19:54 -05:00