Page Tools
Control visibility of the page tools menu.Page tools include actions like:
- Edit
- History
- Watch/Unwatch
- Move
- Delete
- Protect
- Links and references
ID of the portlet to attach global tools to.This allows you to move global tools (tools that appear on all pages) to a specific portlet in the interface.Example:
User Preferences
Enable or disable the client-side preferences module.Citizen provides a Vue.js-based preferences interface that allows users to customize:
- Theme mode (light/dark/auto)
- Font size (small/standard/large/xlarge)
- Page width (standard/wide/full)
- Navigation behavior (auto-hide on/off)
- Performance mode (on/off)
- Image dimming in dark mode (on/off)
- Pure black dark mode (on/off)
When disabled, users will still use MediaWiki’s standard Special:Preferences page, but Citizen-specific options won’t be available. User preferences are stored using MediaWiki’s client preferences API.
Drawer Features
Site Statistics
Enable the site statistics display in the drawer menu.Shows information like:
- Total number of articles
- Total number of pages
- Total number of edits
- Total number of files
- Total number of users
Site statistics are calculated from MediaWiki’s
SiteStats class and may be cached. Statistics may not update immediately after changes.Command Palette
Enable or disable the command palette feature.The command palette provides:See the Search Configuration page for related settings.
- Quick page search with previews
- Recent pages history
- Related articles (requires RelatedArticles extension)
- Command shortcuts (edit, history, etc.)
- Namespace filtering
- User search
When disabled, the traditional search interface (specified by
$wgCitizenSearchModule) is used instead.Client Preferences System
Citizen implements MediaWiki’s client preferences system to store user preferences locally. These preferences sync across devices when users are logged in.Available Client Preferences
Users can customize (when$wgCitizenEnablePreferences is enabled):
Theme Preferences
Theme Preferences
- Theme mode: Auto (follow system), Day (light), or Night (dark)
- Pure black: Use pure black (
#000000) for dark mode backgrounds - Image dimming: Reduce image brightness in dark mode
Typography Preferences
Typography Preferences
- Font size: Small, Standard (default), Large, or Extra Large
- Affects body text and UI elements
- Persists across pages and sessions
Layout Preferences
Layout Preferences
- Page width: Standard, Wide, or Full
- Controls maximum content width
- Useful for different screen sizes and reading preferences
Behavior Preferences
Behavior Preferences
- Auto-hide navigation: Automatically hide the navigation drawer when scrolling
- Performance mode: Reduce animations and visual effects for better performance
Default Client Preferences
Citizen sets these default client preferences (fromSkinCitizen.php:49-56):
Complete Example
Feature Detection
You can detect enabled features in JavaScript:Progressive Enhancement
Citizen follows progressive enhancement principles:-
Core functionality works without JavaScript
- Basic navigation, search, and reading always work
- Enhanced features gracefully degrade
-
Features load on demand
- Heavy features (command palette, preferences) load only when needed
- ResourceLoader ensures optimal loading
-
Performance by default
citizen-feature-performance-modeis enabled by default- Reduces animations and effects for better performance
Customizing Client Preferences
Wiki administrators can customize client preferences through on-wiki configuration:- Create
MediaWiki:CitizenPreferences.json - Define custom preferences or override defaults
See
includes/PreferencesConfigProvider.php and includes/Hooks/ResourceLoaderHooks.php:94-112 for implementation details.Accessibility
All Citizen features are designed with accessibility in mind:- Keyboard navigation support
- Screen reader compatible
- Respects prefers-reduced-motion
- High contrast mode support
- ARIA labels and landmarks