You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by julio cesar sanchez <jc...@gmail.com> on 2022/10/25 09:08:27 UTC

statusbar styles decision

The statusbar plugin has this styles:

   - *StatusBar.styleDefault*: Use the default statusbar (dark text, for
   light backgrounds)
   - *StatusBar.styleLightContent:* Use the lightContent statusbar (light
   text, for dark backgrounds).

This was enough until iOS 13 came out, then Apple added DarkContent to be
the dark text and changed default to change according to the user theme.

Since *StatusBar.**styleDefault* was setting the text to whie in some cases
now, I changed it to work as the docs say, always use dark text (asked on
the issue and users wanted it like that). But after it was merged, some
users started to say that we should provide a new
*StatusBar.styleDarkContent* and make *StatusBar.**styleDefault *work as
the native default value (change according to the configured user theme).

So, what should we do?

1) Add a new *StatusBar.styleDarkContent *method that would work as the
*StatusBar.**styleDefault* works now, dark text, and change *StatusBar.*
*styleDefault* to use the native default value so it changes according to
the user theme.

2) Add a new *StatusBar.styleDarkContent *method that would work as the
styleDefault works now, dark text, add another new *StatusBar.styleSystem*
(or similar name)  to use the native default value so it changes according
to the user theme, and deprecate *StatusBar.**styleDefault*.

3) Keep the *StatusBar.**styleDefault* for dark text and add a new
*StatusBar.styleSystem* (or similar name) to make the status bar change
according to the user theme.

Next release is going to be a major release, so we shouldn't worry about
breaking changes. But not sure which change would be the least confusing
for users, matching the style names to the native iOS names and their
bebavior, keep default as dark text as that's what is documented or use a
more neutral name for style changing according to the theme.

Note, it's not clear if we can accomplish the status bar style change
according to the user/phone theme on Android.

Re: statusbar styles decision

Posted by julio cesar sanchez <jc...@gmail.com>.
Since there is no consensus, I've created a poll on the new GitHub
discussions, hopefully we would get some user opinions/votes

https://github.com/apache/cordova/discussions/372

El mar, 25 oct 2022 a las 17:19, Jesse (<pu...@gmail.com>) escribió:

> #1
> The intent of default was always to do the platform / system default
> thing.
>
> Default on Android need not look like default on iOS
>
> > On Oct 25, 2022, at 8:01 AM, julio cesar sanchez <jc...@gmail.com>
> wrote:
> >
> > The funny thing is default is not the default value, the default value
> is
> > lightContent. It’s called default just to match the iOS name. So another
> > reason to deprecate it.
> >
> >> El El mar, 25 oct 2022 a las 16:37, Norman Breau <
> norman@normanbreau.com>
> >> escribió:
> >>
> >> I think if we (Apache) used the term "default", it should be referencing
> >> our default, and not necessarily the underlying platform's default.
> >>
> >> Therefore, I think #2 might be the best path moving forward. Adding
> >> a styleDarkContent will be symmetrical to the styleLightContent
> counterpart
> >> (we have light & dark opposites). And if the user wants to match the
> system
> >> theme, having styleSystem is think is a clear indication of that
> >> behaviour, more
> >> so than a styleDefault.
> >>
> >> So +1 for Option #2.
> >>
> >>> On 2022-10-25 6:08 a.m., julio cesar sanchez wrote:
> >>> The statusbar plugin has this styles:
> >>>
> >>>    - *StatusBar.styleDefault*: Use the default statusbar (dark text,
> for
> >>>    light backgrounds)
> >>>    - *StatusBar.styleLightContent:* Use the lightContent statusbar
> >> (light
> >>>    text, for dark backgrounds).
> >>>
> >>> This was enough until iOS 13 came out, then Apple added DarkContent to
> be
> >>> the dark text and changed default to change according to the user
> theme.
> >>>
> >>> Since *StatusBar.**styleDefault* was setting the text to whie in some
> >> cases
> >>> now, I changed it to work as the docs say, always use dark text (asked
> on
> >>> the issue and users wanted it like that). But after it was merged, some
> >>> users started to say that we should provide a new
> >>> *StatusBar.styleDarkContent* and make *StatusBar.**styleDefault *work
> as
> >>> the native default value (change according to the configured user
> theme).
> >>>
> >>> So, what should we do?
> >>>
> >>> 1) Add a new *StatusBar.styleDarkContent *method that would work as the
> >>> *StatusBar.**styleDefault* works now, dark text, and change
> *StatusBar.*
> >>> *styleDefault* to use the native default value so it changes according
> to
> >>> the user theme.
> >>>
> >>> 2) Add a new *StatusBar.styleDarkContent *method that would work as the
> >>> styleDefault works now, dark text, add another new
> >> *StatusBar.styleSystem*
> >>> (or similar name)  to use the native default value so it changes
> >> according
> >>> to the user theme, and deprecate *StatusBar.**styleDefault*.
> >>>
> >>> 3) Keep the *StatusBar.**styleDefault* for dark text and add a new
> >>> *StatusBar.styleSystem* (or similar name) to make the status bar change
> >>> according to the user theme.
> >>>
> >>> Next release is going to be a major release, so we shouldn't worry
> about
> >>> breaking changes. But not sure which change would be the least
> confusing
> >>> for users, matching the style names to the native iOS names and their
> >>> bebavior, keep default as dark text as that's what is documented or
> use a
> >>> more neutral name for style changing according to the theme.
> >>>
> >>> Note, it's not clear if we can accomplish the status bar style change
> >>> according to the user/phone theme on Android.
> >>>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
> >> For additional commands, e-mail: dev-help@cordova.apache.org
> >>
> >>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
> For additional commands, e-mail: dev-help@cordova.apache.org
>
>

Re: statusbar styles decision

Posted by Jesse <pu...@gmail.com>.
#1
The intent of default was always to do the platform / system default thing. 

Default on Android need not look like default on iOS 

> On Oct 25, 2022, at 8:01 AM, julio cesar sanchez <jc...@gmail.com> wrote:
> 
> The funny thing is default is not the default value, the default value is
> lightContent. It’s called default just to match the iOS name. So another
> reason to deprecate it.
> 
>> El El mar, 25 oct 2022 a las 16:37, Norman Breau <no...@normanbreau.com>
>> escribió:
>> 
>> I think if we (Apache) used the term "default", it should be referencing
>> our default, and not necessarily the underlying platform's default.
>> 
>> Therefore, I think #2 might be the best path moving forward. Adding
>> a styleDarkContent will be symmetrical to the styleLightContent counterpart
>> (we have light & dark opposites). And if the user wants to match the system
>> theme, having styleSystem is think is a clear indication of that
>> behaviour, more
>> so than a styleDefault.
>> 
>> So +1 for Option #2.
>> 
>>> On 2022-10-25 6:08 a.m., julio cesar sanchez wrote:
>>> The statusbar plugin has this styles:
>>> 
>>>    - *StatusBar.styleDefault*: Use the default statusbar (dark text, for
>>>    light backgrounds)
>>>    - *StatusBar.styleLightContent:* Use the lightContent statusbar
>> (light
>>>    text, for dark backgrounds).
>>> 
>>> This was enough until iOS 13 came out, then Apple added DarkContent to be
>>> the dark text and changed default to change according to the user theme.
>>> 
>>> Since *StatusBar.**styleDefault* was setting the text to whie in some
>> cases
>>> now, I changed it to work as the docs say, always use dark text (asked on
>>> the issue and users wanted it like that). But after it was merged, some
>>> users started to say that we should provide a new
>>> *StatusBar.styleDarkContent* and make *StatusBar.**styleDefault *work as
>>> the native default value (change according to the configured user theme).
>>> 
>>> So, what should we do?
>>> 
>>> 1) Add a new *StatusBar.styleDarkContent *method that would work as the
>>> *StatusBar.**styleDefault* works now, dark text, and change *StatusBar.*
>>> *styleDefault* to use the native default value so it changes according to
>>> the user theme.
>>> 
>>> 2) Add a new *StatusBar.styleDarkContent *method that would work as the
>>> styleDefault works now, dark text, add another new
>> *StatusBar.styleSystem*
>>> (or similar name)  to use the native default value so it changes
>> according
>>> to the user theme, and deprecate *StatusBar.**styleDefault*.
>>> 
>>> 3) Keep the *StatusBar.**styleDefault* for dark text and add a new
>>> *StatusBar.styleSystem* (or similar name) to make the status bar change
>>> according to the user theme.
>>> 
>>> Next release is going to be a major release, so we shouldn't worry about
>>> breaking changes. But not sure which change would be the least confusing
>>> for users, matching the style names to the native iOS names and their
>>> bebavior, keep default as dark text as that's what is documented or use a
>>> more neutral name for style changing according to the theme.
>>> 
>>> Note, it's not clear if we can accomplish the status bar style change
>>> according to the user/phone theme on Android.
>>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
>> For additional commands, e-mail: dev-help@cordova.apache.org
>> 
>> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


Re: statusbar styles decision

Posted by julio cesar sanchez <jc...@gmail.com>.
The funny thing is default is not the default value, the default value is
lightContent. It’s called default just to match the iOS name. So another
reason to deprecate it.

El El mar, 25 oct 2022 a las 16:37, Norman Breau <no...@normanbreau.com>
escribió:

> I think if we (Apache) used the term "default", it should be referencing
> our default, and not necessarily the underlying platform's default.
>
> Therefore, I think #2 might be the best path moving forward. Adding
> a styleDarkContent will be symmetrical to the styleLightContent counterpart
> (we have light & dark opposites). And if the user wants to match the system
> theme, having styleSystem is think is a clear indication of that
> behaviour, more
> so than a styleDefault.
>
> So +1 for Option #2.
>
> On 2022-10-25 6:08 a.m., julio cesar sanchez wrote:
> > The statusbar plugin has this styles:
> >
> >     - *StatusBar.styleDefault*: Use the default statusbar (dark text, for
> >     light backgrounds)
> >     - *StatusBar.styleLightContent:* Use the lightContent statusbar
> (light
> >     text, for dark backgrounds).
> >
> > This was enough until iOS 13 came out, then Apple added DarkContent to be
> > the dark text and changed default to change according to the user theme.
> >
> > Since *StatusBar.**styleDefault* was setting the text to whie in some
> cases
> > now, I changed it to work as the docs say, always use dark text (asked on
> > the issue and users wanted it like that). But after it was merged, some
> > users started to say that we should provide a new
> > *StatusBar.styleDarkContent* and make *StatusBar.**styleDefault *work as
> > the native default value (change according to the configured user theme).
> >
> > So, what should we do?
> >
> > 1) Add a new *StatusBar.styleDarkContent *method that would work as the
> > *StatusBar.**styleDefault* works now, dark text, and change *StatusBar.*
> > *styleDefault* to use the native default value so it changes according to
> > the user theme.
> >
> > 2) Add a new *StatusBar.styleDarkContent *method that would work as the
> > styleDefault works now, dark text, add another new
> *StatusBar.styleSystem*
> > (or similar name)  to use the native default value so it changes
> according
> > to the user theme, and deprecate *StatusBar.**styleDefault*.
> >
> > 3) Keep the *StatusBar.**styleDefault* for dark text and add a new
> > *StatusBar.styleSystem* (or similar name) to make the status bar change
> > according to the user theme.
> >
> > Next release is going to be a major release, so we shouldn't worry about
> > breaking changes. But not sure which change would be the least confusing
> > for users, matching the style names to the native iOS names and their
> > bebavior, keep default as dark text as that's what is documented or use a
> > more neutral name for style changing according to the theme.
> >
> > Note, it's not clear if we can accomplish the status bar style change
> > according to the user/phone theme on Android.
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
> For additional commands, e-mail: dev-help@cordova.apache.org
>
>

Re: statusbar styles decision

Posted by Norman Breau <no...@normanbreau.com>.
I think if we (Apache) used the term "default", it should be referencing
our default, and not necessarily the underlying platform's default.

Therefore, I think #2 might be the best path moving forward. Adding
a styleDarkContent will be symmetrical to the styleLightContent counterpart
(we have light & dark opposites). And if the user wants to match the system
theme, having styleSystem is think is a clear indication of that 
behaviour, more
so than a styleDefault.

So +1 for Option #2.

On 2022-10-25 6:08 a.m., julio cesar sanchez wrote:
> The statusbar plugin has this styles:
>
>     - *StatusBar.styleDefault*: Use the default statusbar (dark text, for
>     light backgrounds)
>     - *StatusBar.styleLightContent:* Use the lightContent statusbar (light
>     text, for dark backgrounds).
>
> This was enough until iOS 13 came out, then Apple added DarkContent to be
> the dark text and changed default to change according to the user theme.
>
> Since *StatusBar.**styleDefault* was setting the text to whie in some cases
> now, I changed it to work as the docs say, always use dark text (asked on
> the issue and users wanted it like that). But after it was merged, some
> users started to say that we should provide a new
> *StatusBar.styleDarkContent* and make *StatusBar.**styleDefault *work as
> the native default value (change according to the configured user theme).
>
> So, what should we do?
>
> 1) Add a new *StatusBar.styleDarkContent *method that would work as the
> *StatusBar.**styleDefault* works now, dark text, and change *StatusBar.*
> *styleDefault* to use the native default value so it changes according to
> the user theme.
>
> 2) Add a new *StatusBar.styleDarkContent *method that would work as the
> styleDefault works now, dark text, add another new *StatusBar.styleSystem*
> (or similar name)  to use the native default value so it changes according
> to the user theme, and deprecate *StatusBar.**styleDefault*.
>
> 3) Keep the *StatusBar.**styleDefault* for dark text and add a new
> *StatusBar.styleSystem* (or similar name) to make the status bar change
> according to the user theme.
>
> Next release is going to be a major release, so we shouldn't worry about
> breaking changes. But not sure which change would be the least confusing
> for users, matching the style names to the native iOS names and their
> bebavior, keep default as dark text as that's what is documented or use a
> more neutral name for style changing according to the theme.
>
> Note, it's not clear if we can accomplish the status bar style change
> according to the user/phone theme on Android.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org