New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Title Bar Customization] Should "caption_controls_overlay" be swapped for a new "display" mode? #206
Comments
@aarongustafson It would be great to get your thoughts on the fallback order and the alternative "display-modifiers" option |
I’m kind of intrigued by the display modifiers concept, to be honest. Although I would prefer to see something like this: {
"display": "standalone",
"display_modifiers": {
"titlebar": false
}
} I could see this allowing devs to (potentially) make other modest UI tweaks as well. Like removing the refresh button from Minimal UI: {
"display": "minimal-ui",
"display_modifiers": {
"refresh-button": false
}
} Or explicitly removing the back button from standalone: {
"display": "standalone",
"display_modifiers": {
"back-button": false
}
} You could also use it to (potentially) customize the browser instance: {
"display": "browser",
"display_modifiers": {
"home-button": false,
"refresh-button": false,
"favorites-bar": false
}
} If we decided to go down this path, it would require an additional explainer that defines the various keys and the matrix of when & where they would be applicable (as well as which controls should never be disabled, probably on a per-display mode basis). |
This seems very desktop specific... I wonder how it will translate to mobile; although I get the modifiers would just be hints. I don't think we want the ability to take things away from users though (as it's the user's UI, not the websites) - the Web app should maybe be able to request things:
|
Those examples are pretty desktop-focused, but this could be used for any platform. E.g. maybe developers want to be able to use
When a developer sets the However, we could achieve the same result using your "request" approach by requesting to add UI components instead of disabling them. So instead of disabling the back button on
you could enable the refresh button with
|
…fier Per the discussion in #206 _[Title Bar Customization] Should "caption_controls_overlay" be swapped for a new "display" mode?_, this PR swaps out the current proposal of adding a new `"caption_controls_only"` member to the web app manifest with a new display modifier, `"caption-controls-overlay"`. The expected behavior and display mode compatibility would remain the same. An explainer for the `"display_modifiers"` web app manifest member will be added soon.
I've updated the explainer to use the "request things" approach:
I'll leave this issue open for a bit to leave room for more discussion/feedback |
Thanks @amandabaker. We probably want to abstract out a general set of controls that are a bit abstract. We've heard that navigation control is pretty important, obviously (but it may be that UAs just start providing those by default... or we modify the Manifest spec to suggest always including those for standalone + minimal UI). Sorry for being thick, but I'm still not sure what "caption_controls_overlay" are? 🙈 Could someone provide a screenshot with an arrow or something so I can understand what those are? |
@marcoscaceres The "caption-controls-overlay" is the black overlay in the top right corner which includes the caption controls. It's similar to standalone, except it cuts off the page title so that the developer can draw in that space instead (hence the display modifier that builds upon Like Aaron said above, this will need its own explainer, so I'll get that out in a bit. But for the scope of this Title Bar Customization explainer, I'm just going to leave the one use case we have defined here. |
Thanks for the clarification. I'm trying to think if there is an equivalent of this on MacOS or other OS... trying to figure out if it's a generalizable thing. |
@marcoscaceres The nomenclature doesn't match, but the concept is the same. MacOS calls them “window controls.” The titlebar concept is the same. I couldn't find details about a backplate, but there is a transparent titlebar option (plus textured & shadowed). We might need to render in a backplate. |
Hello, I've been meaning to reply on this for a long time. I think this conversation should move over to Manifest because it's a much wider issue than just title bar customization. This is something we've had numerous discussions on over the years, but for some reason, I don't think there's actually a Manifest issue dedicated to it. So, I just made one: w3c/manifest#856 I really don't want us to add more display modes. This is very similar to my tabbed application mode proposal, where I also initially proposed your Option 1 (inserting a new display mode that falls back to What if I want a tabbed application mode where I can also control the caption controls? What if I want caption controls with So I am very much in favour of more flexible individual controls. The I was coincidentally talking to @dmurph about this today and I think it's something he wants to look into (we kind of need to resolve this before we spec title bar customization or tabbed application mode). |
Transferring discussion to the new WICG repo: WICG/window-controls-overlay#4 |
Originally discussed in #202, but breaking it out into it's own issue.
@kenchris:
Description
Add a new
"display"
mode:"standalone-controls-overlay"
.The new fallback display mode order could be either:
fullscreen
orstandalone-controls-overlay
fullscreen
standalone
standalone-controls-overlay
minimal-ui
standalone
browser
minimal-ui
browser
Option 1: prevents an unexpected fallback from
fullscreen
tostandalone-caption-controls
when developing a web app targeted at both mobile (supportsfullscreen
) and desktop (does not surpportfullscreen
)Option 2: linear fallback pattern starting from the least UA-controlled UI and flowing down to most UA-controlled UI
Pros/Cons
Pros:
"display"
and is only ever enabled for one display mode.Cons:
Alternatives
One alternative approach would be to add a new
"display_modifiers"
member which accepts a list of modifiers which work in conjunction with specific"display"
modes.In the example below, if the PWA were installed on a mobile device that supports
fullscreen
mode, then the PWA would also enable the fictional"fullscreen-sample-modifier"
. If it were instead installed on a desktop device, then it would be installed in"standalone"
mode, and the"standalone-controls-overlay"
modifier would be enabled, which here implies that there would be a small caption controls overlay in the top corner in lieu of a full-width title bar.This approach is extensible and allows new modifications to be added to each of the display modes without having to alter the fallback order.
The text was updated successfully, but these errors were encountered: