-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: cross-platform light/dark mode API (#11457)
* fix(ios): fetchSemanticColor returned object on iOS 13+ * fix(ios): try to make fetchSemanticColor more sane * fix: return fake TiColor on Android/older iOS * feat(android): semantic colors and night mode - generate color resources from semantic.colors.json - add Ti.UI.Android.nightModeStatus API - add Ti.UI.Android.MODE_NIGHT_* constants refs TIMOB-27501 * test: update assertions for fetchSemanticColor * docs: add Ti.UI.Color * fix(android): report dark mode on Android via Ti.UI.demanticColorType * docs: update semantic color info * refactor(android): move to common API for determining dark/light mode * docs(android): remove night mode related docs * docs(ios): deprecate ios namespaced dark/light mode stuff * docs: deprecate semanticColorType stuff, move to userInterfaceStyle * fix(ios): deprecate ios namespaced userInterfaceStyle * fix(ios): move to cross-platform userInterfaceStyle API * refactor: use cross-platform API for userInterfaceStyle * fix(ios): move fetchSemnaticColor to UIModule * fix: don't override Ti.UI.fetchSemanticColor on iOS 13+ * docs: add note that Color objects not supported by Android * docs: update any color property accepting Ti.UI.Color object on iOS * feat(ios): add userInterfaceStyle event to Ti.UI * test(android): remove android-specific night mode tests * fix: oops invert condition for overriding Ti.UI.fetchSemnaticColor * feat(android): add userInterfaceStyle event to Ti.UI * test: add tests for USER_INTERFACE constants * docs: document Ti.UI userInterfaceStyle event * fix(android): get userInterfaceStyle event working * fix: revert back to returning string color for android/iOS < 13 * test: modify to expect String on Android/iOS < 13 * feat(ios): support use of named system colors baked into ios * docs: mark Ti.UI.Color as ios-only, link to system color docs * fix(android): use lowercase userinterfacestyle event name * fix(ios): use lowercase userinterfacestyle event name * docs: use lowercase userinterfacestyle event name * docs: address review comment * build(android): address review comment, write file with ti prefix * fix(android): manage userinterfacestyle receiver in UIModule constructor Co-authored-by: Sergey Volkov <s.volkov@netris.ru> Co-authored-by: ssekhri <ssekhri@axway.com>
- Loading branch information
1 parent
271ebb4
commit 28eba34
Showing
49 changed files
with
906 additions
and
199 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.