empty() should only be used to suppress errors
When the type of the variable is array,
a falsy check is the same (checks for null, false and empty array)
Found by a new phan plugin (T234237)
Change-Id: I84ced7c17157b322f858640362e1013e37773d43
- Added Key 'beta' to features config in skin.json. As usual this also supported by global configs.
- Added feature management logic to check for beta feature enabled status and the user's selection of utilising the vector beta features.
- Added VECTOR_BETA_FEATURES to Constants.php which is an array that holds features names that would be enabled.
- Removed final from class declaration of OverridableConfigRequirement class, as it does interfere with the mocking in the current setup
Remaining Work:
- Missing images to be added in the hook to show in beta features under Special:Preferences -- this will be added in a followup
Bug: T347772
Change-Id: I7bf8284e328c66c019c392f57207cab21ce0d4f6
Read Value from user preference for logged-in users.
Depends-On: I041a0cb21e872700ceeeddd3a39922e456aa7bb8
Bug: T346954
Change-Id: I6afa39624c3cadd31632d63a36b919d641983ae6
Adds a config option to control the Readability prototype
survey tool on a per-wiki basis.
Minor fixes:
- Adds missing i18n messages to the tool for slider labels
- Ensures tool only runs on Vector 2022 skin
- Wraps the initialization in an IIFE
Change-Id: Ia65a0043dab5e9a23d4ef401ed83914e4f3d2882
Currently only features that are associated with LocalSettings configuration
can be overriden by query string. Going forward we'd like to expand this to apply
to user preference too.
A generic OverrideableRequirement is created.
The existing OverridableConfigRequirement is refactored to extend OverrideableRequirement
The /UserPreferenceRequirement now extends it
This allows http://localhost:8888/wiki/Spain?vectortypographysurvey=1
to work
Bug: T347900
Change-Id: I11efd6b07192d5d2333f4506e9d87a8c0638d657
Problem: Edit-links are shown in static order in sticky header always source edit 1st, then visual editor
Patch Changes:
- We now read the configuration from the visual editor extension.
- Based on the order that page views portlet shows of the tabs, we add the icons to the sticky header in the same order as it shows in the portlet.
Bug: T318447
Change-Id: I2d926bf84131b13c881b09c87ccd5d2010c0dffc
Additional change: Skin Style is limited to Vector 2022
as none of the styling rules apply to legacy Vector
Bug: T348530
Change-Id: Iad310bbc6732135832986c287571744c846cea7f
Adds screen resolution (`${window.innerWidth} x ${window.innerHeight}`)
to the prefilled feedback form for the typography prototype.
Change-Id: I38ec6fe5232c1d90df6d5d56b0f0cb32acdcc64e
The font size preference sets a preference to disabled rather than 0.
Rather than save this as 0, it would be useful to store this as a string
given in future it will evolve to have values small, medium, large
Change logic in UserPreferenceRequirement to support non-binary options.
Bug: T346987
Change-Id: I399aa1b1be4a45cab0aa3b8addb482e5af6c5bf3