feat(android): allow transparent modal backgrounds#10761
feat(android): allow transparent modal backgrounds#10761SeanKelly369 wants to merge 1 commit intoNativeScript:mainfrom
Conversation
For the modal dialogs, this removes the white with shape edges that can appear when a modal with radiused borders is used.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
@SeanKelly369 This might need some extra work as core enforces white color for fullscreen modals here: https://github.com/NativeScript/NativeScript/blob/main/packages/core/ui/core/view/index.android.ts#L255 Also, this should fix/close #10360 |
|
@CatchABus What do you propose should be done? As is, having that white background is a problem in dialogs for Android. |
Yes, indeed. |
|
@CatchABus That's work alright |
There's still this case that worries me. This is a personal opinion but how does having an android-specific property for changing window color sound? So, your example would look like this. const modalOptions: NativeDialogConfig = {
data: this.president,
nativeOptions: {
fullscreen: true,
animated: false,
android: {
windowBackgroundColor: 'transparent'
},
ios: {
presentationStyle: UIModalPresentationStyle.OverCurrentContext
}
}
}; |
|
@CatchABus Your concern is a valid one and I think your solution proposal is a good one. |
Thanks! If you feel like it, you could continue with this idea here in this PR or maybe one of us could work on it. |
For the modal dialogs, this removes the white with shape edges that can appear when a modal with radiused borders is used.
BREAKING CHANGES: Dialogs with no background colour set may become transparent.
Tests run forked repository all passed
An example app showing the changes can be accessed at https://github.com/SeanKelly369/native_dialog_tut