Responsive Design

Has Discourse ever considered adopting RWD instead of AWD? I would like to hear the reasoning behind why AWD was chosen. :thinking:

Are there any technical difficulties that would prevent the implementation of RWD? I see this topic, but that was from more than four years ago. Personally, I’m not a fan of having to toggle between “mobile view” and “desktop view” on any website.

Jeff’s answer from the topic you linked to still applies today:

6 Likes

I’m talking about one view (UI) to rule them all though. The mobile view on a desktop understandably doesn’t look right (and vice versa), so why not have one view or user interface to adapt to all screen sizes? Screen sizes on mobile devices have changed a lot in the past four years or so. 4-inch screens are becoming a thing of the past, let alone the 3.5-inch screen for the iPhone 4 days.

Responsive web design should be a standard across the entire internet. I agree with everything you say. It would be convenient on all my devices. :slight_smile:

From my understanding, you’re asking for a “unified” UI standard – if this is the case, Discourse doesn’t currently have this on our roadmap.

I understand the desire to have a single simple stylesheet to cover all cases, as it feels good from a dev perspective, and is simple to reason about, but we err to give the best experience for each device - for instance we provide different sets of data to targeted mobile and desktop devices separately based on UI needs+constraints, which allows us to minimize traffic loads. This might not seem like such a big deal if you’re in a highly available, high bandwidth environment, but in other environments, being able to selectively slim down payloads depending on form factor need is a big win.

13 Likes

I suspect I can give you part of the answer:

Android.

It’s not just a case of different screen sizes. Bandwidth and device performance vary radically.

The mobile view has had to be kept technically simpler with less moving parts to cope with the rather poor javascript performance of a lot of Android devices, especially earlier models.

See The State of JavaScript on Android in 2015 is... poor

If you look at the code source, there are simplifications across the board on the mobile view to cut down the complexity of the assets pushed down to the mobile devices.

As @ Falco points out here, you also want to be able to push down simpler assets not just send the whole desktop down and hide later because that’s a waste of a lot of resources on the client (whole page in memory etc.)

This is especially important due to the fact that Discourse is a web app that uses a lot of javascript to work automagically and not a normal static web page.

Not everyone has the latest iPhone, which admittedly can crunch through most desktop websites with aplomb.

Perhaps one day it will be possible to deliver a single UI that auto-scales and responds? I’m sure any dev team would love to deliver a one-size-fits-all approach if they could … ?

In a word, ‘compromise’?

11 Likes

I think we’ll be pretty close to fully responsive at some point, especially now that we’ve dropped IE11 support. It would be nice to have one set of templates. As others have said though, we do optimize for mobile so we’ll likely always have some adaptive features either way.

Oh also, are you finding cases where mobile isn’t being detected properly? That might be something we can fix. Outside of development work I never have to manually toggle, and ideally that should be the case for everyone!

15 Likes

The state of JavaScript on Android over a half a decade later is still poor?

Of course, but don’t you think that any modern iPhone nowadays could handle it?

That is a blessing. I will pay close attention to the roadmap. :pray:

Yes, that is what I would like to see.

If I recall correctly the latest and greatest Android phones are now performing almost as well as 2017 iPhones.

7 Likes

That should be a good thing then, right? Shouldn’t that allow for true RWD in Discourse?

Designing anything for Android right now is such a headache.

Yeah, that’s what I’m wondering.

Sure, any recent iPhone is :rocket:

(Un)fortunately a lot of people don’t buy Apple.

Well the proof is in the pudding, and I think the answer is, yes, it is still relatively poor, e.g.:

That’s almost an order of magnitude slower, which, is … wow, pretty slow! :snail: :grimacing:

Now obviously there are reasons why Android works like that to provide a lot of flexibility with regards to what hardware it can run on :+1: but yeah, downsides.

I think it makes sense to have a desktop and mobile view.
One is landscape the other usually portrait.
One can be huge the other really small.

Squeezing buttons and menus onto a small screen is an art form.
It would be an amazing template that looked good on a large monitor and shrank down to be pixel perfect on a mobile.

I really like the way it works … and the way Discourse looks has improved significantly lately kudos @ Kris

4 Likes

iPhone has majority market share in the United States and a couple of other major countries I believe. Am I wrong?

1 Like

Haha. If only the US mattered. :).

6 Likes

From this site I found the following stats on market share.

5 Likes

Yes, that’s global market share. Take a look at this site.

3 Likes

I think the point here, fundamentally, is Android must be taken into account due to its huge reach. In doing so you have greater technical constraints to take account of and Discourse have navigated that as well as anyone could expect? (or we’d be seeing lots of complaints from users about performance).

In general this is true of any web app approach.

It was brave and cutting edge to go the PWA route. It’s done wonders for the industry having a major platform proving that route out instead of just falling back to using App Store apps which inhibit competition and destroy standardisation. I don’t think it’s hyperbole to state that Discourse having stuck to its guns here has had profoundly positive effect on the industry: it might seem small but there was even more at stake here imho.

To get a good deal as a consumer we must avoid proprietary solutions and narrow support.

PS iPhones are amazing too :wink:

6 Likes