Robin Ward
95f263995d
FIX: Previous annotations were broken
2019-01-11 14:30:19 -05:00
Robin Ward
a3839495e0
Update annotations
2019-01-11 12:19:43 -05:00
Robin Ward
dbe42068a2
REFACTOR: Move option to return emails into the serializer
...
This makes more sense than having the guardian take an accessor.
The logic belongs in the Serializer, where the JSON is calculated.
Also removed some of the DRYness in the spec. It's fewer lines
and made it easier to test the option on the serializer.
2019-01-11 11:17:23 -05:00
Robin Ward
9ba8bfb1aa
FIX: Multisite DB was leaving old data in test mode
...
This commit introduces a new helper to enable transactional fixtures
when testing multisite. This would show up as tests that passed the
first time then failed the second time due to stale data being leftover.
2019-01-09 15:20:37 -05:00
Robin Ward
312e282b6a
FIX: Apply classes when lazily loading images
...
If an image had extra classes (for example oneboxes), then while loading
the copy of the image would lose those classes and look differently
until the image had loaded fully.
This fix copies the classes while loading.
2019-01-09 12:56:25 -05:00
Robin Ward
8b3ddcf646
FIX: Add topic status to flagged topics list
...
Previously at a glance it was impossible to tell if a topic was closed
before digging deeper.
2019-01-09 10:59:35 -05:00
Robin Ward
5eaf3cb104
Adjusts the minimum_flag_threshold for TL3/TL4 actions
...
Before this patch, a high trust level user could flag something
and have an action be taken, as well as skipping the flag queue.
Now, if a TL3/TL4 cause an action, the flag will skip the minimum
visibility check and allow staff to review it.
2019-01-04 13:16:44 -05:00
Robin Ward
0e710dc573
Improvements to Lazy Loading
...
- Now applied to all images over 150x150px
- Stores the width and height in the WeakMap rather than using
percentages for accuracy
- When oneboxed images are hidden, they are given a subtle border for better
visibility.
- Don't apply when in the composer. Causes flickering.
2018-12-21 11:31:27 -05:00
Robin Ward
a2ae67509d
Don't use getAttribute if we don't need to
2018-12-20 16:41:04 -05:00
Robin Ward
6080e3a2c0
FIX: Broken spec
2018-12-18 14:55:09 -05:00
Robin Ward
662cfc416b
FEATURE: Show a blurry preview when lazy loading images
...
This generates a 10x10 PNG thumbnail for each lightboxed image.
If Image Lazy Loading is enabled (IntersectionObserver API) then
we'll load the low res version when offscreen. As the image scrolls
in we'll swap it for the high res version.
We use a WeakMap to track the old image attributes. It's much less
memory than storing them as `data-*` attributes and swapping them
back and forth all the time.
2018-12-19 01:57:30 +08:00
Robin Ward
e593d68beb
Use an options hash instead of boolean parameters
2018-12-19 01:57:30 +08:00
Robin Ward
6797a710aa
FEATURE: Lazily Load Images as they scroll into the viewport.
...
This feature uses the Intersection Observer API
https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API
It should be compatible with all modern browsers. Non-Edge IE is *NOT*
supported, so in that particular browser images are loaded by default.
2018-12-12 10:12:49 +11:00
Robin Ward
8bca2647ea
FIX: Upwards scrolling occasionally broken
...
This fixes a bug in Chrome where upwards scrolling would occasionally
not work properly.
2018-11-26 13:37:12 -05:00
Robin Ward
e37c4a4525
FIX: Don't show the Quote popup if posting is disabled
2018-11-16 11:00:22 -05:00
Robin Ward
ea075fa4f7
FIX: Don't hide information from the card that is visible in the topic
...
It doesn't make sense to show less information on the card than already
visible.
2018-11-14 09:56:31 -05:00
Robin Ward
fc9aafaa6a
New outlet above the main container
2018-11-13 14:34:20 -05:00
Robin Ward
467be59d75
FEATURE: Allow expanded posts to return user custom fields
2018-11-13 12:44:54 -05:00
Robin Ward
0cb33d2b52
UX: Rename Most Disagreed Flaggers report to "User Flagging Ratio"
2018-11-12 16:23:37 -05:00
Robin Ward
242a5fc5ef
Add DiscourseEvents for when users as unsuspended/unsilenced
2018-11-08 16:33:38 -05:00
Robin Ward
71460fc203
PERF: Use mini_sql for the query
...
On sites with many flages, it could take quite a long time for
ActiveRecord to return all the joined data.
It's now 3 queries instead of one, but significantly faster, especially
if you have a minimum threshold set.
2018-11-05 14:44:27 -05:00
Robin Ward
5194313133
Revert "Add base_url to config locales ( #6510 )"
...
This reverts commit 8a443e051b .
2018-11-02 10:58:28 -04:00
Robin Ward
931c3d165b
Revert "FIX: We shouldn't include topics when mobile view is enabled"
...
This reverts commit 2feadcdafb .
2018-11-02 10:29:44 -04:00
Robin Ward
c4ca5ed50b
FIX: Translation error
2018-11-01 17:44:55 -04:00
Robin Ward
2feadcdafb
FIX: We shouldn't include topics when mobile view is enabled
...
This setting was set to be the opposite of what we want
2018-11-01 14:47:06 -04:00
Robin Ward
ec91450aae
FEATURE: Track how many user flags are agreed/disagreed/ignored
...
Display the percentage when reviewing flags.
2018-11-01 09:59:50 -04:00
Robin Ward
c2c99c7c39
FIX: Don't seed flags if ids don't exist
...
This can happen if you use the `replace_flags` plugin API to remove
a flag.
2018-10-25 15:36:24 -04:00
Robin Ward
f0af61da41
FIX: User AvatarLookup for looking up avatar details ( #6508 )
...
This allows plugins with their own avatar logic to work in the user
summary sections.
2018-10-18 15:49:34 -04:00
Robin Ward
2178f7768f
FIX: Don't show empty user stats in the card when profile is hidden
2018-10-12 12:33:27 -04:00
Robin Ward
c2add85e75
FIX: Typo, should be authentication
...
cc @xrav3nz
2018-10-11 14:58:46 -04:00
Robin Ward
a566ed42ae
FEATURE: Option to disable user presence and profile
...
This allows users who are privacy conscious to disable the presence
features of the forum as well as their public profile.
2018-10-10 17:34:33 -04:00
Robin Ward
02da022c70
PERF: Quit out of the email job quickly if disabled ( #6423 )
...
This prevents sidekiq from doing a bunch of queries when email is
disabled.
Critical emails are a special case and will be sent.
2018-10-01 01:15:45 +08:00
Robin Ward
3bb4f4c5ef
Adds test to make sure moderators can't make master keys
...
It wasn't obvious from the code, plus we'd never want this to regress!
2018-09-11 12:02:06 -04:00
Robin Ward
410b0f591f
FIX: Flagged Post custom fields were not respecting type
2018-08-21 15:33:15 -04:00
Robin Ward
a83f662492
FIX: Allow silenced users to like / bookmark, just not flag.
2018-08-17 11:06:18 -04:00
Robin Ward
87fa26b6c8
FIX: Silenced users shouldn't be able to act on posts
2018-08-14 11:43:39 -04:00
Robin Ward
5895507153
FEATURE: Ability for plugins to whitelist custom fields for flags
...
You can now call `whitelist_flag_post_custom_field` from your plugins
and those custom fields will be available on the flagged posts
area of the admin section.
2018-08-09 10:49:14 -04:00
Robin Ward
cc90ed3870
Don't look for the only argument, but the first one
2018-08-09 10:14:45 -04:00
Robin Ward
4eef41ea1b
FIX: Error with debouncing mentions
2018-08-01 15:57:24 -04:00
Robin Ward
d7b463a03d
FIX: Remove unused import
2018-08-01 11:54:47 -04:00
Robin Ward
7c950321d1
FIX: Allow non-english usernames in autocomplete
...
Also add support for username formatters
2018-08-01 11:53:20 -04:00
Robin Ward
4b166cccc1
FIX: Linting error
2018-07-31 14:19:45 -04:00
Robin Ward
b6bb8df622
FIX: We loosened username restrictions some time ago
...
Additionally, remove `Discourse.User` constant
2018-07-31 13:53:31 -04:00
Robin Ward
7058205f70
FIX: Broken specs
2018-07-24 12:00:34 -04:00
Robin Ward
236243f38a
SECURITY: Consider 0.0.0.0 a private IP
2018-07-24 11:16:27 -04:00
Robin Ward
bec53426c4
Remove pointless method
2018-07-17 12:34:20 -04:00
Robin Ward
5350429870
FIX: Don't replace the wiki button if the user can't edit
2018-06-28 14:48:28 -04:00
Robin Ward
5d1d7e0e7d
PERF: Scanning the id for this is signficantly slower in production
2018-06-28 11:04:40 -04:00
Robin Ward
fd7bb8e656
FIX: Scope the cn to the subfolder
2018-06-28 11:03:36 -04:00
Robin Ward
6901e0e043
FIX: Rails.logger isn't always available when loading plugin locales
2018-06-22 10:20:20 -04:00
Robin Ward
c08c725c54
Allow plugins to omit base locales if they want
2018-06-22 09:46:23 -04:00
Robin Ward
45a2c94fb3
FIX: Margin on post-info should be present in mobile and desktop
2018-06-20 15:39:36 -04:00
Robin Ward
5290138e84
Support for a decorator within the user name
2018-06-20 15:26:37 -04:00
Robin Ward
02cb944fee
FIX: Linting error
2018-06-20 13:44:03 -04:00
Robin Ward
e7fbcf4ba4
UX: Refactor topic metadata's many floats into flexbox ( #6018 )
2018-06-20 13:06:20 -04:00
Robin Ward
fbc194c330
Don't use !important for wiki color. Allow themes to override it.
2018-06-20 10:47:27 -04:00
Robin Ward
bb11375590
FIX: Don't add undefined as a class name
2018-06-20 10:37:24 -04:00
Robin Ward
e5c156b226
Add characters-required to official plugins list
2018-06-18 10:30:46 -04:00
Robin Ward
4a4406de8c
FIX: Properly avoid n+1 query on flagged posts
...
This code was in here previously but some columns were included that
were not used.
2018-06-14 09:46:52 -04:00
Robin Ward
fd54c92a52
FEATURE: New site setting, whitelisted_link_domains
...
If provided, users who normally couldn't post links (say, due to a
low trust level), can post links to those specific hosts.
2018-06-13 16:11:22 -04:00
Robin Ward
ae728702a6
Revert "Revert "Preload custom user fields when viewing flag queue""
...
This reverts commit 1bb12ee1b6 .
2018-06-13 11:44:13 -04:00
Robin Ward
5bd1c5cc95
Preload custom user fields when viewing flag queue
2018-06-12 16:17:22 -04:00
Robin Ward
e0096b0d1c
Safety in case translations are missing root keys
2018-06-12 10:09:57 -04:00
Robin Ward
fab59c66f0
FIX: Protection against dangling category group records
2018-06-04 15:43:26 -04:00
Robin Ward
597ffd7e3f
FIX: Keyboard shortcuts didn't work on subfolders
2018-06-01 14:38:09 -04:00
Robin Ward
587a9c82f5
FIX: Use the username formatter when updating cooked usernames
2018-05-25 17:29:06 -04:00
Robin Ward
4195c7c9ea
FEATURE: Ability to clear a user's penalty history
...
You can do this manually if you want to allow them to reach TL3 without
their penalty history counting against them.
2018-05-25 12:54:22 -04:00
Robin Ward
c658fb6e31
Move some display logic out of model, upgrade old code patterns
2018-05-25 12:54:22 -04:00
Robin Ward
3c8369def6
The isSilenced and isSuspended aliases were useless
...
We already had `silenced` and `suspended` on the model with the same
effect!
2018-05-25 10:29:26 -04:00
Robin Ward
a31a458a67
Trivially fix some odd whitespace, indentation
2018-05-24 12:29:55 -04:00
Robin Ward
2c4da30f1b
UX: The first sentence in the line had a period but the second did not.
2018-05-08 16:36:36 -04:00
Robin Ward
8262fc5d15
Merge pull request #5807 from discourse/min-flags-by-topic
...
FEATURE: New site setting `min_flags_staff_visibility`
2018-05-08 09:17:29 -04:00
Robin Ward
ac60a84329
FEATURE: New site setting min_flags_staff_visibility
...
When set higher than 1, flags won't show up for staff in the admin
section unless the minimum threshold of flags on a post is reached.
2018-05-07 16:05:13 -04:00
Robin Ward
84cc52d8fc
FIX: Show a nicer message when there aren't any flagged topics.
2018-05-04 10:24:18 -04:00
Robin Ward
05dddcb2fd
Add an event that is triggered when a user is anonymized
2018-05-02 12:25:29 -04:00
Robin Ward
e4a184543e
Merge pull request #5796 from rizka10/patch-2
...
deferred -> ignored
2018-05-01 16:24:12 -04:00
Robin Ward
079caf08d6
FIX: leftover debug statement
2018-04-30 14:41:11 -04:00
Robin Ward
e21a4ce1dd
FEATURE: Support anonymizing a user's IP addresses
2018-04-30 14:09:03 -04:00
Robin Ward
93b40d5e59
Don't use puts here since it happens in tests
2018-04-30 12:26:43 -04:00
Robin Ward
1e5e5acd4d
UX: Don't show the group full name if it's the same as the title
2018-04-26 16:28:16 -04:00
Robin Ward
0bef734c35
Missing tr tag
2018-04-26 12:57:26 -04:00
Robin Ward
416c79daa5
FIX: Opening options menu did not dismiss emoji menu
2018-04-25 15:50:16 -04:00
Robin Ward
a5172a37e0
Allow staff members to enable safe mode, even if disabled
2018-04-25 11:49:57 -04:00
Robin Ward
456e40a709
FIX: Don't allow a user to become TL3 if they've ever been penalized
...
Previously the code would only check if they were *currently* suspended
or silenced.
2018-04-24 15:15:32 -04:00
Robin Ward
fd14ee4797
FEATURE: Allow safe mode to be disabled
2018-04-24 11:03:33 -04:00
Robin Ward
cfcdc4b420
Output when a locale is invalid
2018-04-20 15:29:18 -04:00
Robin Ward
3d7dbdedc0
FEATURE: An API to help sites build robots.txt files programatically
...
This is mainly useful for subfolder sites, who need to expose their
robots.txt contents to a parent site.
2018-04-16 15:43:20 -04:00
Robin Ward
9d0ff0dc68
FIX: Use new-password instead
2018-04-13 14:38:16 -04:00
Robin Ward
1a410660f6
FIX: Don't autocomplete the password confirmation field
...
We currently use that field for our honeypot. However, since it's a
`type=password` certain browsers like chrome were autofilling it.
Normally this isn't a problem, but if you are using subfolders on the
same host the challenge would be different and Discourse would fail the
challenge.
2018-04-13 09:38:59 -04:00
Robin Ward
88324a13fe
Copy edit
2018-04-11 10:19:36 -04:00
Robin Ward
e27edfe597
FIX: Don't give two errors about not being able to post links
2018-04-05 12:54:48 -04:00
Robin Ward
17f12c0ce4
Add new plugin outlet below admin user names
2018-04-04 15:47:14 -04:00
Robin Ward
76d734ea6e
A more extensible way to disable expanding/contracting of user profiles
2018-04-03 14:19:56 -04:00
Robin Ward
0188cbb650
UX: New dropdowns work well on mobile for category notifications
2018-04-03 12:09:00 -04:00
Robin Ward
a383b368c6
FIX: The order of import globbing is not deterministic
...
Using a wildcard would load in a different order on some installs
resulting in unpredictable behavior (for example, `is-hidden` being
displayed due to a `display: flex` in a different file.)
2018-04-03 11:40:53 -04:00
Robin Ward
d690ae0281
FIX: Broken specs too. Quotes are fragile!
2018-04-02 14:23:10 -04:00
Robin Ward
895bca5f5b
FIX: Broken JS tests
2018-04-02 14:18:10 -04:00
Robin Ward
58c81db279
Apply a 'no-group' class to quotes for styling
2018-04-02 14:02:16 -04:00
Robin Ward
90d3544db8
UX: Add a class we can use to target quotes without groups
2018-04-02 14:02:16 -04:00
Robin Ward
23e97a3c3a
UX: Add classes for extensibility
2018-04-02 11:55:25 -04:00