-
Notifications
You must be signed in to change notification settings - Fork 8
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
EXUI-2595 - Add spinner to event dropdown #1828
base: master
Are you sure you want to change the base?
Conversation
* Add the fix and tests * version updated
* checking for the availability of Other type reason * version updated * cve * version updated * version updated
* Add readCookieService and language information to client context * Add version * Add additional language setting on clientcontext Event guard also sets it * Make sonar advised change * Add sonar suggested change * Update npmpublish.yml * Add change to make client context always appear with language * version updated * release notes updated * version updated * version updated --------- Co-authored-by: Ritesh Dsouza <ritesh.dsouza@HMCTS.net>
* Update event-start.guard.ts Fix regression issue that overwrites user_task * Change version * Update event-start.guard.ts Add 'en' even if no cookie Add language to existing client_context object, not just object with user_task * Add version * Update event-start.guard.spec.ts Add helpful test * update to rel name --------- Co-authored-by: Josh <josh.glasgow@hmcts.net>
1ba5a5b
to
b22fa0f
Compare
...kit/src/lib/shared/components/case-viewer/case-event-trigger/case-event-trigger.component.ts
Show resolved
Hide resolved
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.
On reflection I don't like this approach. Let's discuss after the standup tomorrow
) { | ||
} | ||
|
||
public ngOnInit(): void { | ||
if (this.loadingService.storedSpinner){ | ||
this.loadingService.unregisterStoredSpinner(); |
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.
Good, but I don't like the public variable in loadingService
@@ -6,6 +6,7 @@ import { distinctUntilChanged } from 'rxjs/operators'; | |||
export class LoadingService { | |||
private readonly registered = new Map<string, string>(); | |||
private readonly loading = new BehaviorSubject<boolean>(false); | |||
public storedSpinner; |
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.
I don't really understand why you need to do this. It seems like a hack. I certainly frown on using a public variable to store state. The spinner token is already in the registered map somewhere. This is a shared service, so your hack probably only works until some other component starts to mess with your state.
I think you need to analyse this a bit more carefully and think about adding behaviour to the loading service that can be called at the appropriate place in the calling component that will ensure that that the spinner is taken down.
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.
Have reworked the approach and used private array to store any shared loading spinners
Quality Gate passedIssues Measures |
JIRA link (if applicable)
https://tools.hmcts.net/jira/browse/EXUI-2595
Change description
Add spinner when user triggers event from event dropdown
Does this PR introduce a breaking change? (check one with "x")