NOTE: tldr: We are failing to maintain this component. The health of this code is below our normal standards.
1) the open product questions about the future of this feature in T24660 (should we show to anons) T204834 (should we show on pages without categories) or should we redesign it (T142124).
2) its lack of unit tests (T205126)
3) confusing behaviour (T224820)
4) neglected longstanding bugs (T224819, We should remove it or plan to give it some lT225556)
We should remove within the near futureit.
In AMC mode we make categories available to users. A blue categories button shows at the bottom of the page and clicking it opens a category overlay that lists categories on the page in two tabs "content based" and "organizational"
This is a pleasant way to view categories on a mobile browser. On long lists however it can be hard to tell whether appropriate categories are available.
{F31629812}That said it has various problems and we are doing a bad job of maintaining it.
A large "add to category" button in the top right seems inconsistent with other overlays which display an icon or a single word button. Clicking it opens an overlay which has issues with overflow - namely long category titles push buttons off the page and the save button in the top right can even be inaccessible making the overlay unusable!Removing this feature reduces our maintenance burden and adds support for editor gadgets that do a far better job than us.
# TODO
{F31629813}
Given
1) the open product questions about the future of this feature in T24660 (should we show to anons) T204834 (should we show on pages without categories) or should we redesign it (T142124).Minerva changes
2) its lack of unit tests (T205126)- [ ] Remove the code resources/skins.minerva.options/categories.js and the dependency to MobileFrontend
3) confusing behaviour (T224820- [ ] The browser test tests/selenium/specs/category.js is removed (and associated code)
4) neglected longstanding bugs (T224819, T225556)
I think we should remove this feature to reduce our maintenance burden, decline all the associated bugs and start with a clean slate.- [ ] The getCategoryButton code is removed inside includes/Skins/SkinMinerva.php
- [ ] Drop the call to hasCategoryLinks inside getSecondaryActions - `$buttons['categories']` should never be set.
- [ ] SkinMinerva::getTemplateData should set the template value `html-categories` to empty string is hasCategoryLinks is true.
- [ ] Add `{{{html-categories}}}` to skin.mustache underneath the element #page-secondary-actions
There are already suitable lighter-weight gadgets that can be used for category display in mobile that can be used in its absentMobileFrontend changes (phase 2)
- [ ] Remove src/mobile.startup/categoryOverlay.js
- [ ] Remove src/mobile.categories.overlays/ folder and associated code
- [ ] Remove associated i18n messages.