-
Notifications
You must be signed in to change notification settings - Fork 12
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
fix(agora): updating PrimeNG, fixing toast (AG-1607) #2970
base: main
Are you sure you want to change the base?
Conversation
import { withInterceptorsFromDi, provideHttpClient } from '@angular/common/http'; | ||
import { provideAnimations } from '@angular/platform-browser/animations'; | ||
import { provideHttpClient, withInterceptors } from '@angular/common/http'; | ||
import { provideAnimationsAsync } from '@angular/platform-browser/animations/async'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is new for PrimeNG v19
label="{{ type.label }}" | ||
inputId="download-radio" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
syntax change for radio buttons in PrimeNG v19
getInstance() { | ||
return new Rollbar(this.rollbarConfig); | ||
} | ||
export function rollbarFactory() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
newest version of Angular requires a factory method for this to work.
provideHttpClient(withInterceptors([httpErrorInterceptor])), | ||
{ | ||
provide: RollbarService, | ||
useFactory: rollbarFactory, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need factory now in latest Angular
@rrchai, could you please review this PR and verify that OC functions correctly after the PrimeNG update? Thank you! |
@tschaffter The OC app would need similar adjustments if primeNG is upgraded to v19. Would you like me to create a separated pr for the changes and merge into this pr? |
@rrchai Yes, thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved if all CI checks pass! We should remove ROLLBAR_TOKEN from apps/agora/app/.env.example in a future PR though.
@import warnings are about syntax SASS will be deprecating. I have created an issue to track: AG-1637 |
Description
This fixes the issue of toasts not displaying. An http interceptor takes errors and displays a PrimeNG global toast for errors. The original design used colors that were not accessible (white on light yellow) so some contrast was added for readability but perhaps colors can be redesigned further.
Original:
Modified:
This also upgrades PrimeNG to the latest version.