Last modified: 2014-06-10 20:45:18 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T67498, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 65498 - mobile-friendly templates should be easy to create
mobile-friendly templates should be easy to create
Status: RESOLVED WONTFIX
Product: MobileFrontend
Classification: Unclassified
Feature requests (Other open bugs)
unspecified
All All
: Unprioritized enhancement
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-05-19 17:46 UTC by darklama
Modified: 2014-06-10 20:45 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description darklama 2014-05-19 17:46:40 UTC
mobile-friendly templates should be easy to create either by
having separate desktop and mobile templates, or by providing
a means for templates and Scribunto to tell when a person is
viewing the website through the mobile front end.

This should make redesigning template for mobile use easier
because this continues to be a problem as presented in
bug #36674 or presented as an alternative solution in
bug #53437 and hiding templates based on class isn't a
viable long term solution as it can break mobile user's
ability to navigate between related pages, or hide
important information that even mobile users should know.
Comment 1 Bingle 2014-05-19 17:50:13 UTC
Prioritization and scheduling of this bug is tracked on Trello card https://trello.com/c/xn4GbsPV
Comment 3 darklama 2014-05-19 19:53:43 UTC
Jon, I think layout and style separation is a good plan.
However sometimes the layout of templates may need to be
different between desktop and mobile browsers as well.

* compact vs expanded layout
* vertical vs horizontal layout
* visual vs textual layout
* more vs less information
* delay vs immediate display

Maybe have mw.IsMobile() in Scribunto, and
{{#mobile:{{MOBILEUSER}}|mobile layout|desktop layout}}
for pure template.
Comment 4 Max Semenik 2014-05-19 20:29:10 UTC
(In reply to darklama from comment #3)
> Maybe have mw.IsMobile() in Scribunto, and
> {{#mobile:{{MOBILEUSER}}|mobile layout|desktop layout}}
> for pure template.

No way, this would result in every page being parsed twice: once for mobile and once for desktop. Not acceptable for performance reasons.
Comment 5 darklama 2014-05-19 22:46:37 UTC
(In reply to Max Semenik from comment #4)
> (In reply to darklama from comment #3)
> > Maybe have mw.IsMobile() in Scribunto, and
> > {{#mobile:{{MOBILEUSER}}|mobile layout|desktop layout}}
> > for pure template.
> 
> No way, this would result in every page being parsed twice: once for mobile
> and once for desktop. Not acceptable for performance reasons.

Mobile already uses a different layout, and different skins. Are you
suggesting parsing doesn't already happen at least twice when caching
the page with different skins, like mobile and vector?
Comment 6 Max Semenik 2014-05-19 23:20:13 UTC
Yes.
Comment 7 Jon 2014-05-19 23:26:44 UTC
Yeh so what Max is getting at is the bit of code that turns wikitext into HTML. This is currently generated on a save. What you are talking about would require 2 versions of the content to be maintained and generated on every save.

Currently the mobile skin simply injects the same parser output as desktop into a different layout.

What you talk about could be possible for a 3rd party site with lower traffic but not really a Wikimedia sites :-/
Comment 8 darklama 2014-05-21 11:26:32 UTC
Multilingual Wikimedia projects like Meta, Commons, Incubator, etc.
often include templates that change with a person's language choice,
which requires far more parsing to achieve. Translations are sometimes
included within the same template and sometimes using separate pages.

How about {{name}} using Mobile_template:Name or Template:Name/mobile
for the mobile view?
Comment 9 Max Semenik 2014-06-10 20:45:18 UTC
Yes, and you're proposing to multiply this number by 2.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links