Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Wikipedia: Wikitech

Inline styles trouble on the mobile site

 

 

First page Previous page 1 2 3 Next page Last page  View All Wikipedia wikitech RSS feed   Index | Next | Previous | View Threaded


jdlrobson at gmail

Jun 28, 2012, 11:26 AM

Post #51 of 59 (128 views)
Permalink
Re: Inline styles trouble on the mobile site [In reply to]

> Assuming you remember all the class names, which ones will "work" and
> which will not (or, worst case, you have documentation handy).

I'd hope documentation would help with identifying class names and one
could imagine extending the visual editor for the most common ones in
future.

Why would certain ones work and certain ones not? With a stylesheet
solution every class should work... (there would possibly just be
different styling rules for those elements for mobile / print etc.. )

_______________________________________________
Wikitech-l mailing list
Wikitech-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


z at mzmcbride

Jun 28, 2012, 12:54 PM

Post #52 of 59 (130 views)
Permalink
Re: Inline styles trouble on the mobile site [In reply to]

Derric Atzrott wrote:
> I like the idea of class names for different things, and I don't think that
> it would unduly burden the editor. As they are already using inline styles,
> I think that using classes shouldn't be an undue burden. It is no harder to
> say class="someClass" than it is to say style="color: #123456", in fact, I
> would argue it is easier.

Well, kind of.

Ideally these classes would be wrapped in (centralized) MediaWiki templates.
MediaWiki templates support redirects, localization, and have built-in
tracking. CSS classes, on the other hand, cannot be easily renamed, don't
support redirects/aliases, and they have no built-in tracking (it requires
scanning XML dumps to find them).

So instead of class="someClass" or style="color:#CC0000;", it'd be nice to
have {{make this row red}} (which probably already exists somewhere).

MZMcBride



_______________________________________________
Wikitech-l mailing list
Wikitech-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


krinklemail at gmail

Jun 28, 2012, 2:43 PM

Post #53 of 59 (132 views)
Permalink
Re: Inline styles trouble on the mobile site [In reply to]

Replies inline:

On Jun 28, 2012, at 7:38 PM, Jon Robson wrote:

> # "things rely on those inline styles whether we like it or not."
> No... They rely on styles not //inline// styles. This is my main
> problem with the current setup! I believe the majority of things done
> in inline styles that are essential would be better done in
> MediaWiki:Common.css - if we have text that is red this would be
> better down with a class markedRed otherwise some text risks being red
> or and other text #BE3B3B despite meaning the same thing. Most layout
> problems on mobile can be fixed with media queries. You can't do these
> in inline styles.
>

Hold on, we're in misunderstanding :). We agree.

So, they *do* rely on inline styles. But when I said "they rely" I meant: they
currently use them to do something that should not be removed. You won't hear me
say we "need" inline styles (there is not a single layout best done through
inline styles). I'm saying they are in use - right now - and fulfilling valid
needs to the point that they can break or make an article.

Obviously they should become css classes loaded through modules like
MediaWiki:Common.css and what not. I will +1 any movement towards deprecating
them entirely from wikitext in MediaWii core. But not for just for mobile and
not without at least a year of migration time for live sites (possibly with an
opt-in feature before that for users to preview articles without inline styles
to help fixing them).

Indeed, media queries work best for classes as well. But even then, those media
queries belong where the styles are defined (whether or not in a seperate
"mobile" wiki css page), but *not* in MobileFrontend, so this should not be a
concern here.

> # I believe beta users of the mobile is a very small number of
> dedicated Wikipedians. The nostyle=true suggestion by MZMcBride would
> be a great idea but my only worry is with it that no one would use it
> as users would have to add the query string to every page. This is why
> I suggested the beta as the problem would be in front of people's
> faces on every page view and the problems would get surfaced better.
> FWIW I was thinking more of a javascript implementation -
> $("[style"]).removeAttr("style") - this way disabling javascript would
> get people back their styles in a worst case of scenario and it would
> not effect performance on the server.

From JavaScript it is a lot easier to implement, but does bring issues with
interactive states (such as display: none; ) - which, although even those could
be done as a css classes, are even more common.

> I'm not sure what else to say really... I could understand backlash if
> I was suggesting turning off inline styles on the desktop site or even
> the mobile site - but all I'm suggesting here is targeting the beta of
> mobile.

I'm not doubting your judgement. If you believe it is useful to experiment with
this in the beta. I'd say go ahead, deploy it today (its not like you need our
permission or anything :-P). But as I mentioned earlier, I'm not sure what we
would get out of such experiment, since we already seem to know what it will
break and make.


> Thanks for everyones contributions so far on this long thread! I
> really do appreciate this discussion and your patience with me :-).
>


Thanks for making the mobile site awesome!

-- Krinkle



> On Thu, Jun 28, 2012 at 9:37 AM, Brion Vibber <brion [at] pobox> wrote:
>> On Wed, Jun 27, 2012 at 6:35 PM, Krinkle <krinklemail [at] gmail> wrote:
>>
>>> So, stripping inline styles:
>>> * will not fix bad layouts made with tables (which are probably at least as
>>> common as bad layouts made with inline styles).
>>> * will break unrelated things, because inline styles are not directlty
>>> related
>>> to layout, they're used for many things.
>>>
>>> I think provided that there is the following documentation:
>>> * which layout patterns are problematic (whether with inline styles,
>>> tables or
>>> by other means),
>>> * why/how they cause problems
>>> * how to solve that (and how the solution is indeed better for everyone)
>>>
>>> ... then is is a matter of spreading links to that documentation and
>>> waiting
>>> for it to be incorporated on the 700+ wikis with the many many portal
>>> pages,
>>> and other structures that have bad layouts.
>>>
>>
>> I'm generally in agreement with Krinkle on this. But I have to warn that
>> just spreading documentation doesn't magically make things happen -- we
>> probably have to put some actual human effort into finding and fixing
>> broken layouts.
>>
>> A one-button "report bad layout on this page" thingy might well be nice for
>> that; as could an easy "preview this page for mobile" from the edit page.
>> (Though to be fair, people can switch from desktop to mobile layout with
>> one click -- worth trying out!)
>>
>> -- brion
>>
>
> --
> Jon Robson
> http://jonrobson.me.uk
> @rakugojon


_______________________________________________
Wikitech-l mailing list
Wikitech-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


helder.wiki at gmail

Jun 30, 2012, 5:22 PM

Post #54 of 59 (127 views)
Permalink
Re: Inline styles trouble on the mobile site [In reply to]

On Thu, Jun 28, 2012 at 6:43 PM, Krinkle <krinklemail [at] gmail> wrote:
> Replies inline:
>
> On Jun 28, 2012, at 7:38 PM, Jon Robson wrote:
>
>> # "things rely on those inline styles whether we like it or not."
>> No... They rely on styles not //inline// styles. This is my main
>> problem with the current setup! I believe the majority of things done
>> in inline styles that are essential would be better done in
>> MediaWiki:Common.css - if we have text that is red this would be
>> better down with a class markedRed otherwise some text risks being red
>> or and other text #BE3B3B despite meaning the same thing. Most layout
>> problems on mobile can be fixed with media queries. You can't do these
>> in inline styles.
>>
>
> Hold on, we're in misunderstanding :). We agree.
>
> So, they *do* rely on inline styles. But when I said "they rely" I meant: they
> currently use them to do something that should not be removed. You won't hear me
> say we "need" inline styles (there is not a single layout best done through
> inline styles). I'm saying they are in use - right now - and fulfilling valid
> needs to the point that they can break or make an article.
>
> Obviously they should become css classes loaded through modules like
> MediaWiki:Common.css and what not. I will +1 any movement towards deprecating
> them entirely from wikitext in MediaWii core. But not for just for mobile and
> not without at least a year of migration time for live sites (possibly with an
> opt-in feature before that for users to preview articles without inline styles
> to help fixing them).

Yes, please, because fixing things such as (put your sunglasses first)
https://pt.wikipedia.org/?oldid=30926886&action=edit&section=3&preview=yes&uselang=en
is a PITA and will take years! (there are tons of it!)

Best regards,
Helder

_______________________________________________
Wikitech-l mailing list
Wikitech-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


jdlrobson at gmail

Jul 2, 2012, 7:42 AM

Post #55 of 59 (125 views)
Permalink
Re: Inline styles trouble on the mobile site [In reply to]

> Yes, please, because fixing things such as (put your sunglasses first)
> https://pt.wikipedia.org/?oldid=30926886&action=edit&section=3&preview=yes&uselang=en
> is a PITA and will take years! (there are tons of it!)

Wow! This is exactly why I think inline styles might be a bad thing
:-) - this really draws attention of the user away from the content.

I've started a wiki page for this discussion - it seems like a better
place to do this from now on since this thread has already been
confused and gained a lot of length! I've given it the generic heading
'Deprecating Inline Styles' and when I get time will add a mobile
specific section:
http://www.mediawiki.org/wiki/Deprecating_Inline_Styles

_______________________________________________
Wikitech-l mailing list
Wikitech-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


compwhizii at gmail

Jul 2, 2012, 10:20 AM

Post #56 of 59 (125 views)
Permalink
Re: Inline styles trouble on the mobile site [In reply to]

So you've found and instance of where a user has poor design skills and you
immediate response to that is to start a discussion on killing inline
styles? Give me a break.
On Jul 2, 2012 10:43 AM, "Jon Robson" <jdlrobson [at] gmail> wrote:

> > Yes, please, because fixing things such as (put your sunglasses first)
> >
> https://pt.wikipedia.org/?oldid=30926886&action=edit&section=3&preview=yes&uselang=en
> > is a PITA and will take years! (there are tons of it!)
>
> Wow! This is exactly why I think inline styles might be a bad thing
> :-) - this really draws attention of the user away from the content.
>
> I've started a wiki page for this discussion - it seems like a better
> place to do this from now on since this thread has already been
> confused and gained a lot of length! I've given it the generic heading
> 'Deprecating Inline Styles' and when I get time will add a mobile
> specific section:
> http://www.mediawiki.org/wiki/Deprecating_Inline_Styles
>
> _______________________________________________
> Wikitech-l mailing list
> Wikitech-l [at] lists
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
>
_______________________________________________
Wikitech-l mailing list
Wikitech-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


brion at pobox

Jul 2, 2012, 10:37 AM

Post #57 of 59 (125 views)
Permalink
Re: Inline styles trouble on the mobile site [In reply to]

On Mon, Jul 2, 2012 at 7:42 AM, Jon Robson <jdlrobson [at] gmail> wrote:

> > Yes, please, because fixing things such as (put your sunglasses first)
> >
> https://pt.wikipedia.org/?oldid=30926886&action=edit&section=3&preview=yes&uselang=en
> > is a PITA and will take years! (there are tons of it!)
>
> Wow! This is exactly why I think inline styles might be a bad thing
> :-) - this really draws attention of the user away from the content.
>

I'm not a big fan of the colors, but they all render fine on mobile. The
primary difficulty I see with that page is the table layout, which doesn't
scale down well to 320px. (Tested in iOS simulator.)

-- brion
_______________________________________________
Wikitech-l mailing list
Wikitech-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


jdlrobson at gmail

Jul 2, 2012, 10:38 AM

Post #58 of 59 (127 views)
Permalink
Re: Inline styles trouble on the mobile site [In reply to]

Hey John
Sorry it seems my e-mail wasn't worded well... it makes it seem like
that specific example was the catalyst for creating that wiki page
when in fact the wiki page was created to discuss the __whole of this
thread__ (I'm not sure if you've been following it or not).

I would personally appreciate your input on it as I believe you've got
a lot of experience in mobile development.
Best wishes
Jon

On Mon, Jul 2, 2012 at 10:20 AM, John Du Hart <compwhizii [at] gmail> wrote:
> So you've found and instance of where a user has poor design skills and you
> immediate response to that is to start a discussion on killing inline
> styles? Give me a break.
> On Jul 2, 2012 10:43 AM, "Jon Robson" <jdlrobson [at] gmail> wrote:
>
>> > Yes, please, because fixing things such as (put your sunglasses first)
>> >
>> https://pt.wikipedia.org/?oldid=30926886&action=edit&section=3&preview=yes&uselang=en
>> > is a PITA and will take years! (there are tons of it!)
>>
>> Wow! This is exactly why I think inline styles might be a bad thing
>> :-) - this really draws attention of the user away from the content.
>>
>> I've started a wiki page for this discussion - it seems like a better
>> place to do this from now on since this thread has already been
>> confused and gained a lot of length! I've given it the generic heading
>> 'Deprecating Inline Styles' and when I get time will add a mobile
>> specific section:
>> http://www.mediawiki.org/wiki/Deprecating_Inline_Styles
>>
>> _______________________________________________
>> Wikitech-l mailing list
>> Wikitech-l [at] lists
>> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
>>
> _______________________________________________
> Wikitech-l mailing list
> Wikitech-l [at] lists
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l



--
Jon Robson
http://jonrobson.me.uk
@rakugojon

_______________________________________________
Wikitech-l mailing list
Wikitech-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


thewub.wiki at googlemail

Jul 2, 2012, 11:11 AM

Post #59 of 59 (125 views)
Permalink
Re: Inline styles trouble on the mobile site [In reply to]

On 28 June 2012 04:21, MZMcBride <z [at] mzmcbride> wrote:
> Jon Robson wrote:
>> More concretely can anyone give me a specific example of an inline
>> style that is essential on mobile that we simply cannot scrub?
>
> We've been over this repeatedly, haven't we? Sometimes there is _data_ in
> the styling. If you strip out the styling, you'll be throwing away this
> data. I'm not sure why you're still questioning this or how you've been
> unable to find specific examples of this. Search the English Wikipedia for
> phrases such as "marked in green" or "marked in red" or whatever.
>

I just want to point out that colour alone *should not* be used to
convey data, for accessibility reasons.
https://en.wikipedia.org/wiki/Wikipedia:Manual_of_Style/Accessibility#Color
(Yes I realise that's an en.wikipedia guideline, but similar
principles ought to apply across all projects)


Pete / the wub

_______________________________________________
Wikitech-l mailing list
Wikitech-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

First page Previous page 1 2 3 Next page Last page  View All Wikipedia wikitech RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.