-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(android): allow transparent modal backgrounds #10761
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
base: main
Are you sure you want to change the base?
feat(android): allow transparent modal backgrounds #10761
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. |
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