-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
refactor: rendering workflow list after perfoming action button in WorkflowToolBar #12008
Conversation
Signed-off-by: juijeong8324 <[email protected]>
Rather a follow-up to #11891
So it should reload once the Workflows are deleted, does it not? I'm not sure if I tested delete specifically, but I definitely tested resubmit and that worked as expected. The The previous behavior, before #11891, did something similar to the logic you have here, but that meant it did a secondary network request while cancelling the existing stream -- i.e. unnecessary networking. This change will result in the same behavior So I don't think this is a bug, but we could add an optimistic update on the UI for the delete scenario |
Ah!!! I got it!! Thanks for the clarification! So, It is not bug since result is same behavior! But I have some quesitons!
|
Yeah! great! |
Good question. The PR as it currently is I suppose would be more of a "refactor". It's a bit of a gray area as it does improve usability, so it could be considered a "fix" as well.
The GIF does look like everything gets updated eventually, just not instantly. Unless I'm missing something there? Deletions are perhaps slower in the event stream as they require a cache eviction on the server-side Informer as well, vs. additions, like through resubmits, are captured faster. Not sure to be honest.
Do you want to rework this PR or file a new PR for that? I think the |
I think UI improvement could be another solution. |
Ah!! You means that.. It doesn't need to care that workflow was performed but not rendered automatically in the workflow list UI?? (Did I understand corretly?) Actually I thought it should have improvement because the UI is updated by Triggers(click another button for rendering this workflow list), not automatically, even though workflows was already perfomed.
Umm I think it is better to work refactoring |
The But it seems like the
Since we already have the Clicking the delete button (an "action" in the code) creates a delete request, which will eventually result in a delete event in the event stream as well. |
Wow...thank you so much for the detailed explanation!! 😎😎 |
Following up here that the |
Follow up to #11891
Motivation
While refactoring
WorkflowsToolBar
to fucntional components, I found thatWorkflow List
wasn't rendering after performing selected workflows by clicking the action button inWorkflowsToolBar
, It was redering by clicking workflows page button.Example, below
click the delete button in
WorkflowsToolBar
, you can seeworkflow list
is not rendering while notification shows.Modifications
performed
state as boolean typeperformed
as dependency array inuseEffect
that rendering workflowListloadWorkflows
function valuesclearSelectedWorkflows
->loadPerformedWorkflows
. It updateperformed
state.Verification
DELETE
buttonRESUBMIT
button