|mediawiki/core||master||+4 -0||Fix rendering issues on RecentChanges Special page|
Do I understand correctly, that the task can be completed just by adding a new css rule to skins.minerva.special.styles/common.less file, which will set display property to none, checking using media query that page width is smaller than @deviceWidthTablet ?
Just a bit of progress report. Looks like I finally found the problem and made the legend render properly.
After a few hours of analyzing css and js of desktop and mobile pages, viewing diffs and grep-ing, I understood what the reason of the problem is. So legend doesn't render well because modules mediawiki.special.changeslist.legend, mediawiki.special.changeslist and mediawiki.special.changeslist.legend.js are not added to mobile version. Actually, they are added to the list of modules, which need to be loaded, but related js and css files are not loaded and not sent to client.
The solution, which I found is:
- Add needed css and js files to the resources folder in MobileFrontend extension.
- Modify js, so legend is collapsed by default on mobile devices
- Add missing modules to ResourceModules in extension.json file in MobileFrontend.
After these steps, legend is rendered properly (see screenshot below).
But I am not sure if this is the easiest possible sollution of the problem. Maybe I need to think of better ways of fixing this bug?
Great to see the progress and your analysis! :)
First of all: You, in general, don't need to copy code from mediawikiI/core to MobileFrontend, just to make sure, that it can be loaded. Simply adjust the module definition in the Resources.php file to contain a target key which is an array, e.g. [ 'mobile', 'desktop' ] :)
Secondly: I think this should be all. The legend looks well-styled now and given, that a recurring user can collapse the list by default (by clicking the "Collapse" link), I think this should be fine :)
@Florian Thank you for your reply! As I expected, there was an easier sollution. I will modify Resources.php file and upload changes to Gerrit soon.
Additionally, I have noticed, that the module mediawiki.special.recentchanges doesn't get loaded on mobile too. As the result, namespace checkboxes don't get disabled, when all namespace is selected. I think this bug is related to the one, we are working now on at the moment. So I think I will fix it too.
And I agree with your second point. Anyway, if anything needs to be changed later, please tell me and I will return and do it.
I uploaded patch to Gerrit, as you can see above. Additionally, I fixed styles of changes list too (for example, changes numbers are now colored). If anything is wrong - tell and I will fix it.