Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change default to single column UI #10847

Merged
merged 1 commit into from
May 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ defaults: &defaults
noindex: false
theme: 'default'
aggregate_reblogs: true
advanced_layout: true
advanced_layout: false
notification_emails:
follow: false
reblog: false
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
class PreserveOldLayoutForExistingUsers < ActiveRecord::Migration[5.2]
disable_ddl_transaction!

def up
# Assume that currently active users are already using the layout that they
# want to use, therefore ensure that it is saved explicitly and not based
# on the to-be-changed default

User.where(User.arel_table[:current_sign_in_at].gteq(1.month.ago)).find_each do |user|
next if Setting.unscoped.where(thing_type: 'User', thing_id: user.id, var: 'advanced_layout').exists?
user.settings.advanced_layout = true
end
end

def down
end
end
2 changes: 1 addition & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 2019_05_19_130537) do
ActiveRecord::Schema.define(version: 2019_05_29_143559) do

# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
Expand Down