Commit Graph

18347 Commits

Author SHA1 Message Date
Neil Lalonde 6774b64aef FEATURE: add /conduct as an alias for /guidelines 2018-12-18 16:40:24 -05:00
Vinoth Kannan 9c6f77f9da DEV: Remove the unique_searches column from select query 2018-12-19 02:45:48 +05:30
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
Rishabh c279792130 FIX: Allow sending test e-mails to any email address when disable_email is set to non-staff (#6792) 2018-12-18 16:12:05 +01:00
Gerhard Schlager 32784ad11a FIX: Disable multipart backup uploads to S3
Multipart upload from within the browser result in corrupt files on S3.
2018-12-18 16:01:15 +01:00
Gerhard Schlager 081aa6ad2b UX: Use new FA5 icons on Backups tab 2018-12-18 16:01:14 +01:00
Vinoth Kannan a313b01148 DEV: raise error if search term length is less than required 2018-12-18 20:06:59 +05:30
Vinoth Kannan 341a6bd78a
REFACTOR: Calculate CTR in SearchLog model and hide unique column (#6791) 2018-12-18 19:13:46 +05:30
Maja Komel 98d09c90ac Current user serializer groups (ef7f84b follow-up) 2018-12-18 09:05:45 +01:00
Kris 2a518c88d0 Prevent bullet badge from shrinking/growing as flex item 2018-12-17 21:05:32 -05:00
Kris 7d7b6baab9 Topic-list category width restriction no longer needed 2018-12-17 21:01:04 -05:00
Vinoth Kannan ece44a44f8 UX: Change default date range of dashboard trending search report to a month 2018-12-18 03:00:30 +05:30
Bianca Nenciu f0027961c7 FIX: Properly reset controller of admin-user-index. (#6760) 2018-12-17 15:28:29 +01:00
Bianca Nenciu 1023003eba FIX: Strip remote url before import. (#6762) 2018-12-17 15:27:49 +01:00
Joffrey JAFFEUX 22cea9ce90
FIX: adusts select-kit position even if not expanded (#6785) 2018-12-17 12:29:51 +01:00
Joffrey JAFFEUX 6ee3900791
FIX: ensures nothing is triggering rendering loop in after render (#6784) 2018-12-17 12:15:03 +01:00
Gerhard Schlager 1a8ca68ea3 FEATURE: Improve backup stats on admin dashboard
* Dashboard doesn't timeout anymore when Amazon S3 is used for backups
* Storage stats are now a proper report with the same caching rules
* Changing the backup_location, s3_backup_bucket or creating and deleting backups removes the report from the cache
* It shows the number of backups and the backup location
* It shows the used space for the correct backup location instead of always showing used space on local storage
* It shows the date of the last backup as relative date
2018-12-17 11:35:11 +01:00
Maja Komel 040ddec63d Fix avatar flair styles 2018-12-17 10:44:34 +01:00
Guo Xiang Tan c0aae16f6b FIX: Clear anon cache when disabling readonly mode.
`SiteSerializer#is_readonly` is cached for an anonymous user so we have
to clear the cache when disabling readonly mode. Otherwise, the site may
appear to be in readonly mode for an extended period of time.
2018-12-17 17:27:44 +08:00
Saurabh Patel ed1a309fe4 FIX: use new key for delete topic to make it lowercased as all other buttons label around it (#6778) 2018-12-17 10:55:19 +08:00
Joffrey JAFFEUX d803dfc14a
FIX: makes more resilient select-kit positioning (#6776) 2018-12-15 16:23:23 +01:00
Kris 6213e020e6 Improving usercard badge alignment 2018-12-14 22:16:18 -05:00
Guo Xiang Tan e9ea0102a5 FIX: Consistency about our response for invalid user id in `Admin::UsersController`. 2018-12-15 08:01:35 +08:00
Neil Lalonde ef0e84e3d9 FIX: clear the site_contact_username setting if the user's staff privileges are revoked 2018-12-14 16:52:44 -05:00
David Taylor 1960236822
FIX: Suspicious login detection (#6772) 2018-12-14 16:30:34 +00:00
David Taylor 9f3e2a9e34
FIX: Only serialize group membership domains for administrators (#6771) 2018-12-14 15:47:00 +00:00
Penar Musaraj a19f69590a DEV: add "topic-list-before-relative-date" plugin outlet 2018-12-14 10:39:22 -05:00
Kris 2f70bd83a3 Increase contrast of pinned excerpt for dark themes 2018-12-14 10:04:44 -05:00
Joffrey JAFFEUX 03014b0d05
FEATURE: adds security tab to dashboard (#6768)
This commit also includes the new staff_logins report
2018-12-14 13:47:59 +01:00
Maja Komel 9f89aadd33 FIX: delete all posts in batches without hijack (#6747) 2018-12-14 11:04:18 +01:00
Guo Xiang Tan 05104600ea FIX: Incorrect translation key on admin search logs. 2018-12-14 17:12:33 +08:00
Kris 6553744e50 Fixing topic status alignment in search 2018-12-13 21:49:43 -05:00
Kris 6cbcd58603 Lighten lazyload placeholder background 2018-12-13 15:38:33 -05:00
Joffrey JAFFEUX afdd244486
UX: removes superfluous posters column header (#6765) 2018-12-13 21:29:00 +01:00
Kris 60189e8c92 Mobile alignment fixes 2018-12-13 15:26:52 -05:00
Joffrey JAFFEUX bcf4a17751
FIX: apply original margin-bottom to fix position placeholder (#6764) 2018-12-13 18:21:12 +01:00
Joffrey JAFFEUX 5cb99d08ed
FIX: define actions on connector class early (#6763)
This would prevent failure with connectors templates defining actions as closures. In this case action existence is checked at compile time and not runtime.
2018-12-13 15:43:30 +01:00
Joe 8ef2085585
UX: increase selector specificity so that "inline" lightboxes in quotes don't get backgrounds
When a quote is not expanded and it contains lightboxes, those lightboxes are not displayed and instead we show a link that looks like this `[image_title]` 

These still have the lightbox CSS class and so they still get the backgrounds we add to lightboxes while they load. Increasing the selector specificity prevents that from happening.
2018-12-13 15:17:08 +08:00
Sam 7ee9a6a7ec SECURITY: do not delete avatars uploads when deleting accounts
We rely on the clean up uploads job to do this safely
2018-12-13 16:26:07 +11:00
Sam f74ef71130 DEV: add transaction and active check to invalidate job
Follows up on 3b76f19668 this per @tgxworld a transaction makes sense here

Very minor
2018-12-13 14:59:56 +11:00
Sam 94b8ba4f8f FIX: remove slow platform detection from server side
Historically due to https://meta.discourse.org/t/why-is-discourse-so-slow-on-android/8823
we decreased page sizes of both home page and topic page on android by half.

This was done on the server side and as a side effect and caused page sizes on android
to mismatch between Android and non Android.

Unfortunately about a year ago googlebot started pretending it is Android,
this cause Google to start indexing pages as what android would see. So
it saw double the amount of pages in the index as what exists on desktop.
This in turn caused double the amount of indexing work and a large amount
of broken links on long topics.

This fix removes all special behavior which is no longer needed due to
other performance work in Discourse including raw handlebars on home page
and virtual dom on topic pages.

I tested we do not need this on Blu Advance 5.0 it has 1.3 GHZ mediatec mt6580
This phone retails for around $50 USD.

If we decide long term that we want any hacks like this we will shift them
to the client side. It can just hold data in memory without rendering.
2018-12-13 13:57:05 +11:00
Kyle Zhao 92df7b212c rename `visible` to `visibleSiteSettings` 2018-12-13 13:00:13 +11:00
Kyle Zhao c9279a118e FIX: always show filtered site settings 2018-12-13 13:00:13 +11:00
Neil Lalonde 3b76f19668 FIX: invalidating inactive admin emails should mark them as not active 2018-12-12 17:07:49 -05:00
Neil Lalonde a1db15fead FEATURE: require admins to re-validate their email addresses if they haven't been seen for a number of days, configurable with the invalidate_inactive_admin_email_after_days site setting. Social logins are also revoked. Default is 365 days. 2018-12-12 15:32:38 -05:00
Maja Komel dbbadb5c35 FEATURE: add short_site_description setting to be included in title tag on homepage 2018-12-12 11:46:58 +01:00
Joffrey JAFFEUX 793f1274d1
FIX: makes charts more resilient to resizing (#6758) 2018-12-12 11:11:56 +01:00
Joffrey JAFFEUX 3a799ed922
FEATURE: Check if draft exists before starting a new one (#6755)
Co-Authored-By: Bianca Nenciu <nbianca@users.noreply.github.com>
Co-Authored-By: zogstrip <regis@hanol.fr>
2018-12-12 10:21:51 +01:00
Sam 0ca61242b8 FEATURE: polyfill intersection observer for IE11 / iOS Safari
This feature is used for defer loading of images and in future for post cloaking

This gives us a polyfill so we can safely use the feature in problem browsers

The polyfill supports "polling" but it does not appear we need it yet.

If we discover anything odd here, consider setting poll interval per:

https://github.com/w3c/IntersectionObserver/tree/master/polyfill

```
var io = new IntersectionObserver(callback);
io.POLL_INTERVAL = 100; // Time in milliseconds.
```

Keeping the mutation observer cause we often mutate the DOM
2018-12-12 15:36:08 +11:00
Kris 6d353a1e47 Alignment & spacing fix for quote controls 2018-12-11 21:17:31 -05:00
Guo Xiang Tan 86926f4aee DEV: Let `create!` handle the check for persistence.
This is unlikely to fail but we want to know when it does.
2018-12-12 08:36:13 +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
Jeff Wong 5358f25fc6 FIX: Support RTL languages in header menu 2018-12-11 10:33:56 -08:00
Jeff Wong d2569f8e77 make linter happy 2018-12-11 09:41:40 -08:00
David Taylor 0f734e2ae2 FIX: Return authenticated=true when reconnecting
This prevents a registration popup on the client
2018-12-11 17:40:02 +00:00
Jeff Wong 71d8807fec
Full height swipe-able menus (#6566)
* Feature: Full height swipe enabled menus

support pan events on iphone
2018-12-11 09:15:20 -08:00
Gerhard Schlager 688755baf2 DEV: Improve specs and handle invalid email token
Follow-up to 7977b09025
2018-12-11 18:04:10 +01:00
Kris 8c227715ae $primary-high contrast reduction for dark themes 2018-12-11 10:08:00 -05:00
Kris 4cc0a3503b Adding space between badges for medium-sized viewports 2018-12-11 09:45:49 -05:00
David Taylor c7c56af397
FEATURE: Allow connecting associated accounts when two-factor is enabled (#6754)
Previously the 'reconnect' process was a bit magic - IF you were already logged into discourse, and followed the auth flow, your account would be reconnected and you would be 'logged in again'.

Now, we explicitly check for a reconnect=true parameter when the flow is started, store it in the session, and then only follow the reconnect logic if that variable is present. Setting this parameter also skips the 'logged in again' step, which means reconnect now works with 2fa enabled.
2018-12-11 13:19:00 +00:00
Maja Komel 2ee2e5c981 UX: fix cropped image thumbnails 2018-12-11 12:23:39 +01:00
David Taylor 3fedb2ad20 DEV: Style and performance improvements
Follow-up from 9db8291
2018-12-11 09:58:20 +00:00
Sam 671469bcc7 FIX: URLs containing two # would fail to work
Some URLs in browsers are non compliant and contain twos `#` this commit adds
special handling for this edge case by auto encoding any fragments containing `#`
2018-12-11 18:03:13 +11:00
Sam Saffron bb4ef644bf UX: reduce show dismiss.. at top of unread/new to 15
Previously we would require 30 unread or new topic to show the button at the top.
2018-12-11 14:11:54 +11:00
Gerhard Schlager 7977b09025 FEATURE: Activate users invited via email when invite is redeemed
Do not send an activation email to users invited via email. They
already confirmed their email address by clicking the invite link.
Users invited via link will need to confirm their email address before
they can login.
2018-12-11 00:09:53 +01:00
Kris 73d2fc194d UX: More consistent category lock and topic-status styles 2018-12-10 16:06:26 -05:00
David Taylor 071bd15463 FIX: Redirect to default homepage when visiting `/login`
Previously this was hard-coded to redirect to `/latest`
2018-12-10 15:39:05 +00:00
Maja Komel ef7f84b59b Add groups to current user serializer (#6748) 2018-12-10 16:23:29 +01:00
David Taylor 9db829134c
FIX: Use database to persist metadata during social registration (#6750)
Previously was using the cookie_store, which is limited to 4kb. This caused issues for providers sending large volumes of metadata about a user.
2018-12-10 15:10:06 +00:00
Joffrey JAFFEUX e06a8980fb
FIX: category-drop initial state was incorrect (#6743) 2018-12-10 14:05:00 +01:00
Penar Musaraj 7f361a546e UX: Add styling for updated twitter status icons in onebox
Minor adjustments needed by onebox version 1.8.69
2018-12-09 21:58:02 -05:00
Kris c84b837d50 category badge alignment fix 2018-12-08 22:33:11 -05:00
Gerhard Schlager 0f41770547 Make Danger happy by running prettier 2018-12-08 02:59:09 +01:00
Kris 050c02228e UX: Globally dim categories slightly 2018-12-07 20:01:38 -05:00
Penar Musaraj 67450ba402 UX: when composer is minimized, let user open composer in regular size instead of full screen 2018-12-07 17:45:13 -05:00
Jeff Wong ccd80a8b14 update png assets for push notification images 2018-12-07 14:00:39 -08:00
Kris b26d0f20cc Fixing slight misalignment of login/signup buttons 2018-12-07 13:56:54 -05:00
Kris d16a4b895f only dim categories, not all topic stats per 547eaa6 2018-12-07 13:35:57 -05:00
Kris 98c18f8349 button and alignment fixes for mobile user page 2018-12-07 12:34:37 -05:00
Kris 547eaa6060 UX: Dim visited post info along with title 2018-12-07 11:09:56 -05:00
Rafael dos Santos Silva efec2db859 FEATURE: Web Share Target Support
This adds a **very basic** support for share to Discourse.

Currently, this is only supported in Android + Chrome 71+.

After installing a Discourse site to the Home Screen, you will be
able to share from anywhere in the OS to the Discourse site.

Discourse will use the title and text from the share event.
2018-12-07 13:48:09 -02:00
David Taylor 160d29b18a
REFACTOR: Migrate TwitterAuthenticator to use ManagedAuthenticator (#6739)
No changes to functionality. TwitterAuthenticator goes from 136 lines to 24, and all twitter-specific logic elsewhere has been deleted 🎉
2018-12-07 15:39:06 +00:00
Saurabh Patel 9e3143445b DEV:add uploaded_meta option in category for category meta image (#6724) 2018-12-07 16:24:07 +01:00
David Taylor f7ce607e5d
FIX: Return 422 instead of 500 for invalid SSO signature (#6738) 2018-12-07 15:01:44 +00:00
David Taylor 5e09398c5b
FIX: Do not serialize user fields unless they are specified for display (#6736) 2018-12-07 10:57:28 +00:00
Sam 8e307e633e FIX: posts would not auto rebake unless gravatar download was enabled 2018-12-07 17:03:22 +11:00
Kris 031c252cd3 Slight alignment follow-up to db32d29 2018-12-06 20:01:38 -05:00
Kris db32d29eaa UX: Refactoring topic statuses for consistent icon sizes & colors 2018-12-06 19:22:04 -05:00
Penar Musaraj 06d1b19ca2 FIX: Refactor lightbox mobile icon
- Fixes a performance issue on a site with lots of images in posts

- turns out that "filter: invert(100%)" performs very poorly on Safari/iPhone

- also disables transition on the element on mobile
2018-12-06 15:32:26 -05:00
Kris b54b4d05c5 UX: improve code highlighting diffs for dark themes 2018-12-06 10:54:30 -05:00
Gerhard Schlager 4300ac0f4a UX: Show smaller Emojis within some HTML elements 2018-12-06 15:13:16 +01:00
Xiao Guan 7ec124fc89 FEATURE: Improved deprecation warnings (#6722)
* FEATURE: Discourse.deprecate can report version

* Ember counterpart for deprecation
2018-12-06 11:38:01 +00:00
Maja Komel 1d649e147b FEATURE: show avatar flair on group, badges and directory pages (#6732) 2018-12-06 12:18:52 +01:00
Gerhard Schlager 43cfdb1cb9 FIX: Wizard tries harder to find existing Welcome Topic
The wizard searches for:

* a topic that with the "is_welcome_topic" custom field
* a topic with the correct slug for the current default locale
* a topic with the correct slug for the English locale
* the oldest globally pinned topic

It gives up if it didn't find any of the above.
2018-12-06 10:27:22 +01:00
Guo Xiang Tan 27c793a192 FIX: `UserNotificationsHelper#logo_url' to work with S3 based uploads.
https://meta.discourse.org/t/digest-logo-not-working/103255
2018-12-06 09:39:08 +08:00
Guo Xiang Tan dcf9c6da59 DEV: Don't publish post messages to non-human users. 2018-12-06 08:24:13 +08:00
Kris a88f931d6f UX: Moving categories under topic title in topic list, removing category column (#6731)
* Starting to remove category column from topic list

* stacked nav alignment adjustment

* Revert "stacked nav alignment adjustment"

This reverts commit 98800c7058.

* remove comment

* removing function
2018-12-05 16:12:26 -08:00
Bianca Nenciu a8e8473ea5 DEV: Apply code review. 2018-12-05 21:58:55 +01:00