-
Notifications
You must be signed in to change notification settings - Fork 3
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
chore(ui): update no events messaging #527
base: main
Are you sure you want to change the base?
Conversation
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.
Please add padding to between the text and the header of the table in the events table page view
I was playing with that and wasn't sure since the figma showed more for the events widget and i thought it looked a little odd on the table. Will do though! |
ui/src/lib/features/k8s/types.ts
Outdated
@@ -51,6 +51,8 @@ export interface ResourceStoreInterface<T extends KubernetesObject, U extends Co | |||
numResources: Writable<number> | |||
// The url for the EventSource | |||
url: string | |||
// The message to display when there are no resources | |||
noResourcesMsg: { msg: string; style: string }[] |
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.
Thoughts on making this type a little more defined? something like { title: string; titleStyle: string; msg?: string; msgStyle?: string}
? Where msg and msgStyle are optional. Or is there a case where you would have more than 2 msg, styles as is?
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'm not sure if there's a potential for more than 2 child message styles, but my guess is no. so yeah i like this idea of making it 1 object instead of a string[].
@@ -191,7 +193,7 @@ export class ResourceStore<T extends KubernetesObject, U extends CommonRow> impl | |||
this.#eventSource.onmessage = ({ data }) => { | |||
try { | |||
this.#table = this.#tableCallback(JSON.parse(data)) | |||
this.#resources.set(this.#table) | |||
this.#resources.set([]) |
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.#resources.set([]) | |
this.#resources.set(this.#table) |
assume you did this for debugging and just forgot to put back
Description
Adds a field to the Resource Store for customizing the messaging when there are no resources found. The default is still 'no resources found'. With that enabled, we are updating the messaging for Events tables when no events are found.
Related Issue
Resolves #521