Commit Graph

630 Commits

Author SHA1 Message Date
Guo Xiang Tan 9a0eb2eeb1 Fix the build. 2017-08-08 10:03:04 +09:00
Guo Xiang Tan 1103ea7c4c Remove Rails 5 deprecation warning. 2017-08-08 00:48:57 +09:00
Guo Xiang Tan 3f24ed2b3e Can't revert due to incompatibility of new site setting types.
Revert "Revert "FEATURE: Site settings defaults per locale""

This reverts commit 439fe8ba24.
2017-08-07 10:43:09 +09:00
Guo Xiang Tan 439fe8ba24 Revert "FEATURE: Site settings defaults per locale"
This reverts commit 468a8fcd20.
2017-08-07 10:31:50 +09:00
Erick Guan 468a8fcd20 FEATURE: Site settings defaults per locale
This change-set allows setting different defaults for different locales. 

It also:

- Adds extensive testing around site setting validation

- raises deprecation error if site setting has the default property based on env

- relocated site settings for dev and tests in the initializer

- deprecated client_setting in the site setting's loading process

- ensure it raises when a enum site setting being set

- default_locale is promoted to `required` category.

- fixes incorrect default setting and validation

- fixes ensure type check for site settings

- creates a benchmark for site setting

- sets reasonable defaults for Chinese
2017-08-02 12:24:19 -04:00
Neil Lalonde 5d528f0d15 Merge pull request #4958 from dmacjam/search_posts_by_filetype
FEATURE: Search posts by filetype
2017-07-31 11:55:34 -04:00
Guo Xiang Tan 6e74f726cf FIX: Staged users did not have a `UserEmail` record. 2017-07-31 12:40:32 +09:00
Guo Xiang Tan 4620dfe92d FEATURE: Add group settngs to allow users to leave a group freely.
https://meta.discourse.org/t/split-join-leave-freely-setting-on-groups/65565
2017-07-28 15:00:25 +09:00
Guo Xiang Tan 5012d46cbd Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
Neil Lalonde 24cb950432 FEATURE: Watched Words: when posts contain words, do one of flag, require approval, censor, or block 2017-07-26 11:01:09 -04:00
Neil Lalonde d8c27e3871 Merge branch 'master' into search_posts_by_filetype 2017-07-25 14:41:20 -04:00
Leo McArdle d0b027d88d FEATURE: phase 1 of supporting multiple email addresses 2017-07-20 11:22:27 +09:00
Robin Ward 97e211f837 FEATURE: Log Search Queries 2017-07-14 14:30:58 -04:00
Jakub Macina bb392973ca Add migration with extension column to uploads. 2017-07-06 19:15:30 +02:00
Sam Saffron d0d60af510 add back column temporarily to make deployment smoother 2017-07-04 10:31:10 -04:00
Sam 845170bd6b FEATURE: add support for group visibility level
There are 4 visibility levels

- public (default)
- members only
- staff
- owners

Note, admins and group owners ALWAYS have visibility to groups

Migration treated old "non public" as "members only"
2017-07-03 15:26:57 -04:00
Arpit Jalan 16d356ab4e FEATURE: resending invite should include original custom message
https://meta.discourse.org/t/will-resent-invite-include-original-custom-message/64699
2017-06-30 18:13:33 +05:30
Jakub Macina 67ce4b70a6 Add index to extension column in TopicLink. 2017-06-20 13:01:31 +02:00
Jakub Macina 4c22f3a0e2 Add file extension column to TopicLinks. 2017-06-09 13:56:18 +02:00
Guo Xiang Tan 0ecb668d49 Merge pull request #4893 from tgxworld/remove_unused_columns
Remove columns that are no longer being used.
2017-06-06 10:07:00 +09:00
Guo Xiang Tan 0c203e61cd Raise `ActiveRecord::IrreversibleMigration` instead of `StandardError`. 2017-06-05 11:02:24 +09:00
Guo Xiang Tan 1c05ca91ea Remove columns that are no longer being used. 2017-06-05 10:59:05 +09:00
Guo Xiang Tan ac6c1acbed FIX: Groups that do not have any owners should not allow membership requests. 2017-06-05 10:02:37 +09:00
Sam 0aed2533ac Revert unread optimisation, has too many edge cases 2017-05-26 09:04:13 -04:00
Sam Saffron 6674611960 correct migration so it always populates column 2017-05-25 18:50:51 -04:00
Sam Saffron 7d59ff67b8 adjust qurey to include messages, once everything is read
then mark first_topic_unread_at to be current time
2017-05-25 18:40:32 -04:00
Sam Saffron 1a1f5d2101 create or replace 2017-05-25 18:12:45 -04:00
Sam 29fac1ac18 PERF: improve performance of unread queries
Figuring out what unread topics a user has is a very expensive
operation over time.

Users can easily accumulate 10s of thousands of tracking state rows
(1 for every topic they ever visit)

When figuring out what a user has that is unread we need to join
the tracking state records to the topic table. This can very quickly
lead to cases where you need to scan through the entire topic table.

This commit optimises it so we always keep track of the "first" date
a user has unread topics. Then we can easily filter out all earlier
topics from the join.

We use pg functions, instead of nested queries here to assist the
planner.
2017-05-25 15:07:30 -04:00
Guo Xiang Tan 0984763013 Remove use of `rescue nil` in migration. 2017-05-17 09:18:49 +08:00
Guo Xiang Tan eccfab6a19 Use `execute` instead of `exec_sql` in migration. 2017-05-17 09:18:42 +08:00
Neil Lalonde 7821400141 FEATURE: staff can set a timer to remind them about a topic 2017-05-16 14:49:50 -04:00
Sam e1dd543a93 FEATURE: allow users to select theme on single device 2017-05-15 12:48:16 -04:00
Neil Lalonde 8b9799507c fix deploy problems due to renamed table 2017-05-12 15:17:25 -04:00
Sam 2d96a0785d FEATURE: theme selection is now global per-user 2017-05-12 12:41:34 -04:00
Neil Lalonde 55b61e9bea rename topic_status_update to topic_timer 2017-05-11 18:27:53 -04:00
Pat David b7d16de914 Fix migrate AddCssClassNameToEmbeddableHosts 2017-05-11 15:16:16 -04:00
Pat David 84cd19686c Fix migration file problem 2017-05-11 15:16:16 -04:00
Pat David 4bf8548dc5 Add embed class name setup for embeddable hosts 2017-05-11 15:16:16 -04:00
Régis Hanol eabfc59d51 rename 'convert_pasted_images_quality' site setting to 'png_to_jpg_quality' 2017-05-11 10:01:20 +02:00
Régis Hanol 53257a87ff remove 'convert_pasted_image' site setting 2017-05-11 09:16:53 +02:00
Guo Xiang Tan 71a266b673 Remove daily mailing mode option as it doesn't scale.
https://meta.discourse.org/t/daily-updates-option-for-mailing-list-mode/45029/14?u=tgxworld
2017-05-05 12:21:50 +08:00
Sam 6a6eed4ed2 DEV: column dropper class for cleaner removal of superflous columns
Also fixes issues during deploy cause target column was renamed in
theme_fields
2017-05-04 10:15:41 -04:00
Sam 946f25098f Refactor theme fields so they support custom theme defined vars
This paves the way to allowing themes to specify uploads and so on.
2017-05-02 16:02:14 -04:00
Guo Xiang Tan 1f6418f907 Track error message in `SchedulerStats`. 2017-04-26 01:34:25 +08:00
Arpit Jalan aeead60036 FIX: make TopicEmbed trashable 2017-04-25 18:40:39 +05:30
Sam 7a9eee1b71 FEATURE: default notification level for group messages
also fixes it so staff can amend other user's group notification level
2017-04-20 15:47:35 -04:00
Sam 7eabb90b71 FEATURE: added error messages for bad theme CSS / JS 2017-04-19 16:46:46 -04:00
Sam 5e3a0846f7 FEATURE: allow themes to share color schemes 2017-04-17 15:56:24 -04:00
Guo Xiang Tan 04016f0dec Support Ruby 2.4. 2017-04-15 12:29:00 +08:00
Sam a3e8c3cd7b FEATURE: Native theme support
This feature introduces the concept of themes. Themes are an evolution
of site customizations.

Themes introduce two very big conceptual changes:

- A theme may include other "child themes", children can include grand
children and so on.

- A theme may specify a color scheme

The change does away with the idea of "enabled" color schemes.

It also adds a bunch of big niceties like

- You can source a theme from a git repo

- History for themes is much improved

- You can only have a single enabled theme. Themes can be selected by
    users, if you opt for it.

On a technical level this change comes with a whole bunch of goodies

- All CSS is now compiled using a custom pipeline that uses libsass
    see /lib/stylesheet

- There is a single pipeline for css compilation (in the past we used
    one for customizations and another one for the rest of the app

- The stylesheet pipeline is now divorced of sprockets, there is no
   reliance on sprockets for CSS bundling

- CSS is generated with source maps everywhere (including themes) this
    makes debugging much easier

- Our "live reloader" is smarter and avoid a flash of unstyled content
   we run a file watcher in "puma" in dev so you no longer need to run
   rake autospec to watch for CSS changes
2017-04-12 10:53:49 -04:00