brave / brave-ios

Brave iOS Browser
https://brave.com
Mozilla Public License 2.0
1.7k stars 441 forks source link

"Request Desktop Site" as a site setting #2976

Open xaocon opened 3 years ago

xaocon commented 3 years ago

Problem Description

Some sites operate much better when the desktop site is requested. It would be nice if you didn't have to load the page then drill down into the share settings to load the site again to get the desktop version.

This is a long requested feature on the discussion forum and I think I saw it requested more than once.

Feature Overview

I think the concept is simple enough but there is a bit of a design issue. The only per-site settings I see are for shields. It seems fine to me to add a switch there and use the same storage backend for it (I haven't dug into the code very much yet). However, I'd love to hear some other opinions because I'm going to try my hand at implementing and don't want to waste too much time on it if that isn't acceptable.

I'm primarily worried because this seems like such an obvious feature that it's really surprising to me it's not in here already.

Design

image

This has a strange boarder but I think the idea is clear enough.

Implementation Details

I don't know a lot about internals yet so I'm not sure about details. My plan is to use whatever storage is used for shields stuff, assume they are checked on page load. Try to find that one first, then instead of loading the normal page, load the desktop page the same way it would work if you did the "Share.." "Request Desktop Site". There is a question about how to handle the specificity of the page but I assume the other site settings have thought that out some and I'll follow the lead there.

User Experience

  1. Open shield settings
  2. Click the "always open desktop site" button
  3. Profit!

Additional information

I would love some initial thoughts or mentoring. I dev by trade but this would be my first swift, ios, and brave PR so any help would be welcome.

iccub commented 3 years ago

Great writeup @xaocon, this however is a product decision and we should not proceed with code implementation until we decide whether we want it.

At the moment the desktop site setting via share menu persists until the app is killed which is okay for me personally. I will pass this ticket to the product team

xaocon commented 3 years ago

Thanks for the heads up. Please let me know.

bsclifton commented 3 years ago

Thanks for describing in detail, @xaocon 😄 I had a similar request in the old version of our product and forgot to move it to this new repo https://github.com/brave/browser-ios/issues/1709

@karenkliu @jamesmudgett @anthonypkeane what do you think about adding another item to shields, Always desktop site (or similar wording)?

xaocon commented 3 years ago

I don't know if it matters, but just to be clear, I have no attachment to the wording or even implementation. I was just throwing something together that fit the current layout.

isaacjara17 commented 3 years ago

up