Skip to content

block: rewrite user type options for more modularity + adjust some#2311

Open
IlyasLebleu wants to merge 2 commits intowikimedia-gadgets:masterfrom
IlyasLebleu:blockoptions
Open

block: rewrite user type options for more modularity + adjust some#2311
IlyasLebleu wants to merge 2 commits intowikimedia-gadgets:masterfrom
IlyasLebleu:blockoptions

Conversation

@IlyasLebleu
Copy link
Copy Markdown
Contributor

Replaced the forIPsOnly, forTempAccountsOnly and forRegisteredOnly by a single userTypes array that can take 'ip', 'ta' and 'named' as values, to cover more options without multiplying variables. Allowed me to also fix a few that couldn't be treated previously (such as username blocks not showing for TAs anymore). Tested on test.wikipedia.org, block options menu works exactly as intended.

sig: null
},
oversightblock: {
userTypes: ['ip', 'ta', 'named'],
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can treat this as the default. No need to write it out for every preset.

'uw-softerblock': {
userTypes: ['named'],
expiry: 'infinity',
forRegisteredOnly: true,
Copy link
Copy Markdown
Member

@NovemLinguae NovemLinguae Apr 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can remove forRegisteredOnly: true here, I think.

userTypes: ['named'],
autoblock: true,
expiry: 'infinity',
forRegisteredOnly: true,
Copy link
Copy Markdown
Member

@NovemLinguae NovemLinguae Apr 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can remove forRegisteredOnly: true here, I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants