Re: [w3c/manifest] Add a way to query whether there is a UA-provided back button (#693)

@fchristant What is the specific problem you're trying to solve with your proposal to let the site read the orientation or position of the system back button? Can you describe a concrete situation where it would be useful to distinguish between a system back button at the top versus bottom? What is "interfering bottom navigation"?

Generally, apps should show a back button if there is no system back button, and not show one if there is a system back button.

@tomayac I agree.

> This sort of a control (back button, but also forward, etc.) requires JavaScript to work, so wouldn’t it make more sense to have the feature detection happen in JavaScript?

No, it can be controlled through CSS just by setting the display property of the buttom.

> That way we’re steering developers toward the best practice of only adding the control to the DOM when it’s useful rather than having it in the DOM for everyone and hiding it when it’s redundant.

I think the best practice is to control it through CSS; that way you don't need to write complex and possibly error-prone event handler logic to update the state. Having a simple hidden DOM element is not a big overhead, though I'm willing to be proven wrong with data. Note that this mirrors the display-mode property which is also a CSS media query. I'd rather make it possible to do it in CSS or JS, whereas the JS-only approach forces you to use JS.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/manifest/issues/693#issuecomment-402080496

Received on Tuesday, 3 July 2018 09:40:34 UTC