Skip to content
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

Styles documentation is confusing #162

Open
3 tasks done
Ajaxy opened this issue Oct 17, 2019 · 5 comments · May be fixed by #181
Open
3 tasks done

Styles documentation is confusing #162

Ajaxy opened this issue Oct 17, 2019 · 5 comments · May be fixed by #181

Comments

@Ajaxy
Copy link

Ajaxy commented Oct 17, 2019

Bug Report

Problem

Styles documentation is confusing:

Issue 1: default and lightcontent are confused

StatusBarStyle (status bar style, defaults to lightcontent)

However, JS functions styleDefault and styleLightcontent have different descriptions:

StatusBar.styleDefault
Use the default statusbar (dark text, for light backgrounds).

StatusBar.styleLightContent
Use the lightContent statusbar (light text, for dark backgrounds).

Issue 2: blacktranslucent has the wrong description (equal to lightcontent)

StatusBar.styleBlackTranslucent
Use the blackTranslucent statusbar (light text, for dark backgrounds).

StatusBar.styleLightContent
Use the lightContent statusbar (light text, for dark backgrounds).

However, in fact blacktranslucent makes the text dark.

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above
@jcesarmobile
Copy link
Member

Issue 1: default and lightcontent are confused

StatusBarStyle (status bar style, defaults to lightcontent)

However, JS functions styleDefault and styleLightcontent have different descriptions:

StatusBar.styleDefault
Use the default statusbar (dark text, for light backgrounds).

StatusBar.styleLightContent
Use the lightContent statusbar (light text, for dark backgrounds).

styleDefault is iOS default, but the plugin uses styleLightcontent as default.
Apple made the names confusing, not us. On iOS 13 they have deprecated the default name and have light and dark instead.

Issue 2: blacktranslucent has the wrong description (equal to lightcontent)

StatusBar.styleBlackTranslucent
Use the blackTranslucent statusbar (light text, for dark backgrounds).

StatusBar.styleLightContent
Use the lightContent statusbar (light text, for dark backgrounds).

However, in fact blacktranslucent makes the text dark.

blacktranslucent should make the text light, not dark, so making the text dark is a bug, not a problem in the docs. In which platform are you getting dark text for blacktranslucent?

@Ajaxy
Copy link
Author

Ajaxy commented Oct 19, 2019

blacktranslucent should make the text light, not dark, so making the text dark is a bug, not a problem in the docs. In which platform are you getting dark text for blacktranslucent?

So what's the difference between blacktranslucent and lightcontent then? And how to make the text dark?

@jcesarmobile
Copy link
Member

There is no difference anymore, those all were iOS names that Apple deprecated long ago (in iOS 7 I think) and now all of them do the same, so should be deprecated.

@Ajaxy
Copy link
Author

Ajaxy commented Oct 20, 2019

Can I use this plugin to make the text dark?

@jcesarmobile
Copy link
Member

jcesarmobile commented Oct 20, 2019

There is a "bug" on iOS 13 (or new feature), default value is no longer black text, it depends on the device "theme", so if you have dark mode enabled, default is white, if you have light mode then it's still black.
The plugin needs to be updated to use a new iOS 13 value called darkContent, that always uses black text.
It's already reported #148

would be a good opportunity to deprecate default and the other values that don't work and just have light Content and darkContent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants