Closed eleddie closed 9 months ago
@eleddie thanks for reporting the issue and proposing the solution!
Hey @eleddie ,
Thanks for giving our library a spin and pointing out this important issue.
Your proposed solution looks really solid. I was wondering if it might be worth adding a new optional configuration element, let's name it notificationWidth
, to give developers full control over the width.
Here's what I had in mind:
If notificationWidth
is left undefined (not set), we'd use your solution.
However, a developer might want a notification to span the full width, so they could pass something like useWindowDimensions()
to notificationWidth
, and use this size regardless of landscape/portrait orientation (the width will be constrained by the screen width).
They might also want a specific width for a certain notification or group of notifications, so they'd be able to override this configuration in a narrower scope.
What do you think about this enhancement? Maybe you'd be interested in contributing to our library and preparing a PR with these changes?
Btw, looking at your screenshots, I understood that the library could offer more extensive configuration options for notificationPosition
#218
@PdoubleU sounds good! I'll work on it and open a PR once done. I'll tag you and @Okelm in itππ»
@PdoubleU sounds good! I'll work on it and open a PR once done. I'll tag you and @Okelm in itππ»
Hi @eleddie, I just wanted to let you know that we are addressing this issue. Thanks for bringing it to our attention here :)
Hi! π
Firstly, thanks for your work on this project! π
I was facing an issue where the notifications in tablets are the size of the screen, so they are too big and don't look good.
This is a quick solution I found to have a better UI for notifications on tablets
Here is the diff that solved my problem:
This is how it looks with the current version of the library:
It can be fixed by setting maxWidth in the custom notification:
But the problem is that the PanResponder is still full width so you can't tap on the back button when the notification is shown:
And this is how it looks after the change, you can tap on the back button without any issues: