Cannot assign to read only property 'unseenBadgeBackgroundColor' of object 'Object'

Getting the above stated issue when attempting to use the notification center as per docs (react component). I did find that there was a PR that was created and merged for this issue. Here is the code in use:
<PopoverNotificationCenter onNotificationClick={() => { console.log('onclick') }} colorScheme={'dark'}>
{({ unseenCount }) => <NotificationBell unseenCount={unseenCount} />}
/PopoverNotificationCenter>
<PopoverNotificationCenter onNotificationClick={() => { console.log('onclick') }} colorScheme={'dark'}>
{({ unseenCount }) => <NotificationBell unseenCount={unseenCount} />}
/PopoverNotificationCenter>
Referenced PR: https://github.com/novuhq/novu/pull/2010
GitHub
fix: copy bell theme instead of using merge by sofferjacob · Pull R...
What change does this PR introduce? Fixes an issue where the notification center would break whenever the useDefaultBellColors was used. This was due to defaultNotificationTheme being a frozen obje...
26 Replies
empe
empe3y ago
@Moderator @Support , I know it’s Saturday, but if anyone could provide any assistance - it would be awesome!
dr.really
dr.reallyOP3y ago
just got to thinking - should I be pulling v0.9.0 packages or is there a 'next' branch based packages?
empe
empe3y ago
@Engineering ?
Dima Grossman
Dima Grossman3y ago
@dr.really unfortuently we don't have a next branch based package at the moment. Do you have some information on how this might be achieved? It would be great to provide a nightly build version. Perhaps we can do it as .alpha notations for next version? Anyways, today we don't have it and it will be released only next minor release. Is it blocking you critically? I could do a patch release for you if this will help
dr.really
dr.reallyOP3y ago
Hey thanks for the reply! I'll have to look into how to do a next branch style release. We do it at work, however we do not use github actions so i'll have to figure out to convert bamboo builds lol also it is blocking, right now you cannot use the notifications react component with v0.9.0 - any time you click on it the app crashes @dimagrossman can you describe the release process that you guys are using now? I'm willing to make an issue and PR for this if you guys are good with that
Dima Grossman
Dima Grossman3y ago
@dr.really so it's failing when you are passing the bellcolors in the theme? Could you please write here the pseudo-theme object you are passing, just want to make sure this pr fixes the issue Unfortnently today the release process is semi manual with running some lerna scripts and publishing, my dream is to have a github action to automate this 😐
dr.really
dr.reallyOP3y ago
Hey good morning! Here is that actual code that I'm writing in for the notification's bell:
<PopoverNotificationCenter onNotificationClick={() => { console.log('onclick') }} colorScheme={'dark'}>
{({ unseenCount }) => <NotificationBell unseenCount={unseenCount} />}
</PopoverNotificationCenter>
<PopoverNotificationCenter onNotificationClick={() => { console.log('onclick') }} colorScheme={'dark'}>
{({ unseenCount }) => <NotificationBell unseenCount={unseenCount} />}
</PopoverNotificationCenter>
I'll see what I can come up with 😄 More on the bell colors, as of the version I'm using (0.9.0) it requires that colorScheme prop be set on the PopoverNotificationCenter
Dima Grossman
Dima Grossman3y ago
Oh, this is very strange. We are using a very similiar snippet and it works as expected 😮
<PopoverNotificationCenter
colorScheme={colorScheme}
onNotificationClick={handlerOnNotificationClick}
onActionClick={handlerOnActionClick}
>
{({ unseenCount }) => {
return <NotificationBell colorScheme={colorScheme} unseenCount={unseenCount} />;
}}
</PopoverNotificationCenter>
<PopoverNotificationCenter
colorScheme={colorScheme}
onNotificationClick={handlerOnNotificationClick}
onActionClick={handlerOnActionClick}
>
{({ unseenCount }) => {
return <NotificationBell colorScheme={colorScheme} unseenCount={unseenCount} />;
}}
</PopoverNotificationCenter>
could you send me an image or the the text of the error message you see?
dr.really
dr.reallyOP3y ago
yessir one sec let me get that
Dima Grossman
Dima Grossman3y ago
I was sure you are passing some custom theme props there, but looks like not 😐
dr.really
dr.reallyOP3y ago
just waiting for my dev container to start
Dima Grossman
Dima Grossman3y ago
sure thing
dr.really
dr.reallyOP3y ago
dr.really
dr.reallyOP3y ago
in the first screenshot i did put placeholders for subscriberId and appId but returned them in the screenshots
Dima Grossman
Dima Grossman3y ago
Thanks! Thats really helpful
dr.really
dr.reallyOP3y ago
welcomes 🙂
Dima Grossman
Dima Grossman3y ago
And you are using @Novu/notification-center version 0.9.1 right ?
dr.really
dr.reallyOP3y ago
checking yep
dr.really
dr.reallyOP3y ago
Novu_Bot
Novu_Bot3y ago
@dr.really, you just advanced to level 3!
Dima Grossman
Dima Grossman3y ago
The strange thing for me is that we are using 0.9.1 on web.novu.co too and I don't see this error with a similiar implementation I will release a patch with this PR cherry picked regardless Will try to push it today, max-tomorrow
dr.really
dr.reallyOP3y ago
no worries, ping me when you push it out and I'll give it a test
Dima Grossman
Dima Grossman3y ago
@dr.really could you try upgrading 0.9.2 for notification center packcage?
dr.really
dr.reallyOP3y ago
doing it now Fixed!
Dima Grossman
Dima Grossman3y ago
🎉 Thanks for being patient and helping solve this
dr.really
dr.reallyOP3y ago
no problem at all! thank you for the quick fix!
Want results from more Discord servers?
Add your server