== Background
During the discussions around page previews deployment, most enwiki and dewiki participants preferred a configuration where previews are off for existing editors and on for new accounts.
== Acceptance criteria
[] Allow page previews to be on by default for new accounts on a per-wiki basis
[] This will be deployed in a separate task
== Signoff criteria
[] Inform all wikis of upcoming change
[] Set up deployment task
[] Conversation has been documented in some way in the code to point to this conversation and potential need to revisit the decision here.
== QA Steps
=== Phase 1 (verify old behavior, create test accounts)
- Go to beta cluster and check that as anonymous user you can see Page Previews
- Create a new user account (let's call him User A)
- Log in as User A
- Verify that, when logged in as User A Page Previews are disabled
- Create a new user account (let's call him user B)
- Login as User B
- Enable Page Previews in the Preferences Tab for User B
- Verify that user B has Page Previews enabled
- Log out
- Check that Page Previews are visible
- Log in as User B
- verify that Page Previews are Visible
- Log out
===Phase 2 (developer updates the config)
- @pmiazga updates the beta cluster (sets `PopupsOptInStateForNewAccounts` = 1)
===Phase 3 - check new behaviour
- Go to beta cluster and check that as anonymous user you can see Page Previews
- Login as user A
- Verify that you don't see Page Previews
- Login as user B
- Verify that you see Page Previews
- Create a new Account (lets call him user C)
- Log in as User C
- verify that you see Page Previews
= Developer notes
The https://www.mediawiki.org/wiki/Manual:Hooks/LocalUserCreated hook runs when in account is created. With the provided user set a user preference.
I assume we can ignore doing this for accounts where $autocreated is set to true.