Commit Graph

922 Commits

Author SHA1 Message Date
Kyle Zhao
983dba37ce FIX: use BasicUserSerializer for user_badge.granted_by (#6266)
BasicUserSerializer contains enough information for the badges page,
while UserSerializer issues ~100 SQL queries on the fly when serializing
the field without preloading.
2018-08-14 08:11:14 +10:00
Leo McArdle
9b04921616 FIX: don't require auth providers to set full_screen_login_setting 2018-08-06 10:24:39 +01:00
David Taylor
812add18bd REFACTOR: Serve auth provider information in the site serializer.
At the moment core providers are hard-coded in Javascript, and plugin providers get added to the JS payload at compile time. This refactor means that we only ship enabled providers to the client.
2018-08-06 09:25:48 +01:00
Osama Sayegh
18b396ad56 FEATURE: add link to see new commits when updates are available for themes (#6233)
* FEATURE: add link to see new commits when updates are available for themes

* shorten regexp
2018-08-06 15:29:15 +10:00
Joffrey JAFFEUX
066010db7d
FEATURE: introduces list/compact_list components 2018-08-03 16:41:37 -04:00
Penar Musaraj
1f45215537 FEATURE: Drafts view in user profile
* add drafts.json endpoint, user profile tab with drafts stream

* improve drafts stream display in user profile

* truncate excerpts in drafts list, better handling for resume draft action

* improve draft stream SQL query, add rspec tests

* if composer is open, quietly close it when user opens another draft from drafts stream; load PM draft only when user is in /u/username/messages (instead of /u/username)

* cleanup

* linting fixes

* apply prettier styling to modified files

* add client tests for drafts, includes a fixture for drafts.json

* improvements to code following review

* refresh drafts route when user deletes a draft open in the composer while being in the drafts route; minor prettier scss fix

* added more spec tests, deleted an acceptance test for removing drafts that was too finicky, formatting and code style fixes, added appEvent for draft:destroyed

* prettier, eslint fixes

* use "username_lower" from users table, added error handling for rejected promises

* adds guardian spec for can_see_drafts, adds improvements following code review

* move DraftsController spec to its own file

* fix failing drafts qunit test, use getOwner instead of deprecated this.container

* limit test fixture for draft.json testing to new_topic request only
2018-08-01 16:34:54 +10:00
Vinoth Kannan
ece3cb73df Rename humburger_menu_categories_count site setting to header_dropdown_category_count 2018-07-31 09:12:30 +05:30
Vinoth Kannan
50df2d7241 FIX: Should not include regular categories in top_category_ids array 2018-07-30 16:06:36 +05:30
Vinoth Kannan
78d91b1daf
UX: Changes in top categories of hamburger menu (#6200) 2018-07-30 14:13:00 +05:30
Vinoth Kannan
dac29b5ebc
UX: Display only top categories in hamburger menu (#6146) 2018-07-27 12:11:07 +05:30
Guo Xiang Tan
fad9c2b971 PERF: Move EmailLog#reply_key into new post_reply_keys table. 2018-07-24 13:51:53 +08:00
Guo Xiang Tan
ae8b0a517f PERF: Split skipped email logs into a seperate table. 2018-07-24 13:14:37 +08:00
David Taylor
eda1462b3b
FEATURE: List, revoke and reconnect associated accounts. Phase 1 (#6099)
Listing connections is supported for all built-in auth providers. Revoke and reconnect is currently only implemented for Facebook.
2018-07-23 16:51:57 +01:00
Neil Lalonde
afc94ac9e4 FEATURE: add a Top Categories section to the user summary page, showing the categories in which a user has the most activity 2018-07-18 16:39:16 -04:00
Sam
ac0053f491 FEATURE: navigate to first post and auto bump category settings
### navigate_to_first_post_after_read setting for categories

When enabled on categories logged on users will return to OP after
reading the entire category. (useful for documentation categories)

### num_auto_bump_daily

Set a number of topics that will automatically bump daily on a category.

- Every 15 minutes we will check if any category has this setting
- Categories with the setting are shuffled
- We exclude pinned, closed, category description and archived topics
- Maximum of 1 topic for the list of categories is bumped till limit reached per category
- We always try to bump oldest first
- Limit is elastic using a RateLimiter that ensures that we only bump N per day

Also some minor organisation on category settings

Froze strings on category.rb
2018-07-16 18:10:35 +10:00
Leo McArdle
21ebb1cd54 FEATURE: Secondary emails support. 2018-07-16 11:09:49 +08:00
Guo Xiang Tan
258e9e35ca PERF: Make mega topics work without a stream.
There are tradeoffs that we took here. For the complete
story see
https://meta.discourse.org/t/performance-improvements-on-long-topics/30187/27?u=tgxworld.
2018-07-12 12:46:12 +08:00
OsamaSayegh
decf1f27cf FEATURE: Groundwork for user-selectable theme components
* Phase 0 for user-selectable theme components

- Drops `key` column from the `themes` table
- Drops `theme_key` column from the `user_options` table
- Adds `theme_ids` (array of ints default []) column to the `user_options` table and migrates data from `theme_key` to the new column.
- Removes the `default_theme_key` site setting and adds `default_theme_id` instead.
- Replaces `theme_key` cookie with a new one called `theme_ids`
- no longer need Theme.settings_for_client
2018-07-12 14:18:21 +10:00
Maja Komel
cb89797e9a FEATURE: shows remaining backup codes in user preferences 2018-07-04 10:45:42 +02:00
Guo Xiang Tan
969e79d7c6 PERF: Do not calculate gaps for TopicViewPostsSerializer.
The client doesn't use the gaps results when loading new posts.
2018-07-02 14:01:50 +08:00
Maja Komel
ec3e6a81a4 FEATURE: Second factor backup 2018-06-28 10:12:32 +02:00
Guo Xiang Tan
cfa7898c2d Rename TopicView#last_read_post_id to TopicView#filtered_post_id. 2018-06-27 12:33:57 +08:00
Guo Xiang Tan
cb69888758 PERF: Don't pluck all the columns just to retrieve a single value. 2018-06-27 11:41:35 +08:00
Guo Xiang Tan
0b6a2e9d1f Remove force summary mode for megatopics for now.
The logic is too hairy and we can't reliably determine
when to force summary mode. Work is underway to improve
perf for megatopics so this will not be required
eventually.
2018-06-26 12:49:06 +08:00
Guo Xiang Tan
bad6a5142c PERF: Don't include entire post stream when we're loading more posts. 2018-06-22 10:49:03 +08:00
Guo Xiang Tan
68388dfd25 Fix the build. 2018-06-21 15:57:59 +08:00
Guo Xiang Tan
9a7a079f4d Force summary mode when user enters at the top of megalodoon topics. 2018-06-21 15:18:52 +08:00
Sam
5f64fd0a21 DEV: remove exec_sql and replace with mini_sql
Introduce new patterns for direct sql that are safe and fast.

MiniSql is not prone to memory bloat that can happen with direct PG usage.
It also has an extremely fast materializer and very a convenient API

- DB.exec(sql, *params) => runs sql returns row count
- DB.query(sql, *params) => runs sql returns usable objects (not a hash)
- DB.query_hash(sql, *params) => runs sql returns an array of hashes
- DB.query_single(sql, *params) => runs sql and returns a flat one dimensional array
- DB.build(sql) => returns a sql builder

See more at: https://github.com/discourse/mini_sql
2018-06-19 16:13:36 +10: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
Arpit Jalan
94ae89f61f FIX: properly retrieve user custom fields 2018-06-14 07:33:25 +05:30
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
Jeff Wong
3d1ff8e0ad FIX: correct group membership on cards for admins 2018-06-12 14:57:26 -07:00
Joshua Rosenfeld
1bb12ee1b6 Revert "Preload custom user fields when viewing flag queue"
This reverts commit 5bd1c5cc95.
2018-06-12 16:46:31 -04:00
Robin Ward
5bd1c5cc95 Preload custom user fields when viewing flag queue 2018-06-12 16:17:22 -04:00
Arpit Jalan
59a8471308 FIX: do not show SSO external_email to moderators 2018-06-12 14:20:44 +05:30
Guo Xiang Tan
ad5082d969 Make rubocop happy again. 2018-06-07 13:28:18 +08:00
Robin Ward
c658fb6e31 Move some display logic out of model, upgrade old code patterns 2018-05-25 12:54:22 -04:00
Guo Xiang Tan
cba3942850 Refactor WebHookFlagSerializer. 2018-05-21 17:29:58 +08:00
Guo Xiang Tan
f0024f5ec7 Inherit from BasicGroupSerializer for WebHookGroupSerializer. 2018-05-21 17:29:58 +08:00
Guo Xiang Tan
00c6b078e3 Trim WebHookUserSerializer. 2018-05-21 17:29:58 +08:00
Guo Xiang Tan
60e7b13f59 Trim WebHookPostSerializer further. 2018-05-21 17:29:58 +08:00
Guo Xiang Tan
3ff0074e9d Trim WebHookTopicSerializer further. 2018-05-21 17:29:58 +08:00
David Taylor
c168639be2 Add plugin outlet in admin theme list (#5837)
This will be used by discourse-theme-creator to add avatars next to each theme.
2018-05-18 10:09:21 +02:00
Guo Xiang Tan
416d19af27 FIX: Wrong target user displayed for user actions in activity stream.
https://meta.discourse.org/t/wrong-assigned-username-in-activity-list/73816
2018-05-18 11:28:13 +08:00
Guo Xiang Tan
b74c108c09 UX: Display group tabs in user's messages tab for non-staff as well.
https://meta.discourse.org/t/group-inboxes-in-user-messages/86787
2018-05-17 18:10:17 +08:00
Guo Xiang Tan
565fa1f60e Fix regression introduced in 8cf0f51eb2. 2018-05-16 14:26:03 +08:00
Guo Xiang Tan
8cf0f51eb2 UX: Display site settings shortcut for poll and discourse-nginx-performance-report.
https://meta.discourse.org/t/improving-admin-plugins/84585/29?u=tgxworld
2018-05-08 10:34:32 +08:00
Misaka 0x4e21
ff6be3c2e3 FEATURE: add profile_background fields into SSO (#5701)
Add profile_background and card_background fields into Discourse SSO.
2018-05-07 10:03:26 +02:00
Neil Lalonde
bd77795d7a REFACTOR: move support for user card badge images to a plugin discourse-user-card-badges 2018-04-26 13:25:24 -04:00