-
Notifications
You must be signed in to change notification settings - Fork 186
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
frontend: Add a way for plugins to react to Headlamp events #1455
Conversation
8ab3689
to
0c92a0c
Compare
6989416
to
5a26357
Compare
74fd2f2
to
8aafc95
Compare
8aafc95
to
7a91a5f
Compare
78f6ab8
to
b2cc779
Compare
b2cc779
to
11d9a3d
Compare
@ashu8912 walked me through the PR. Nice.
|
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.
Left a couple of notes for your consideration.
Hi. There were some notes and questions that were missed because they were obscured with the other comment below. I'll repeat them here.
I have some other feedback, but I'm not sure of the entire context or requirements. So I'm not clear if all of this applies.
On redux...
names
add types to datainterface ErrorBoundaryEvent {
type: HeadlampEventType.ERROR_BOUNDARY;
data?: { error: string };
}
interface DeleteResourceEvent {
type: HeadlampEventType.DELETE_RESOURCE;
data?: { resourceId: string };
}
type HeadlampEvent =
| ErrorBoundaryEvent
| DeleteResourceEvent
| /* others */; |
a12499c
to
d65373e
Compare
I updated the PR with a more complex, single commit, but I think it makes sense as it now makes things more structured, type checked, and easier to use. Also added an example plugin but that's still WIP as I haven't finished adding the details in the README, etc. |
963ec82
to
13e4c89
Compare
c419faf
to
eb685dd
Compare
Some notes for future selves... I remember we spoke verbally, but I wanted to have it written down somewhere.
|
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.
Very very Nice.
I left a few comments, now I'm testing it locally.
eb685dd
to
5ef65ed
Compare
Plugins may be interested in reacting to when e.g. all plugins are loaded, in order to show a notification or perform some different action. These changes allows plugins to do that by registering callbacks that are run when some events in the app happen. Co-Authored-By: Ashu Ghildiyal <[email protected]> Signed-off-by: Joaquim Rocha <[email protected]>
Signed-off-by: Joaquim Rocha <[email protected]>
5ef65ed
to
b38d029
Compare
Thanks for the review @illume . I have updated the branch after your suggestions. |
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.
Great job! Thanks.
Plugins may be interested in reacting to when e.g. all plugins are
loaded, in order to show a notification or perform some different
action. These changes allows plugins to do that by registering
callbacks that are run when some events in the app happen.
fixes #1451