kafka-ui icon indicating copy to clipboard operation
kafka-ui copied to clipboard

FE: Do not refetch data on window focus

Open Haarolean opened this issue 1 year ago • 3 comments

Some components like ui/clusters/local/schemas/test/edit does refetch data via tsquery on window focus. This is considered a harmful behavior, because if there are any unsaved changes made to the schema itself the data will be refetched and the changes would be lost.

TODO:

  1. Check all the places where window focus refetch is on but shouldn't be
  2. Add QUERY_REFETCH_OFF_OPTIONS in these places

Haarolean avatar May 03 '24 21:05 Haarolean

Hey could I have this issue assigned to me please?

masonwoodford avatar May 05 '24 21:05 masonwoodford

Just to clarify, how were you thinking of determining if "window focus refresh is on but shouldn't be". Should it just be disabled on components that have editable portions?

masonwoodford avatar May 05 '24 22:05 masonwoodford

Just to clarify, how were you thinking of determining if "window focus refresh is on but shouldn't be". Should it just be disabled on components that have editable portions?

yeah sounds like a good approach. And we could always adjust this in the future.

Haarolean avatar May 06 '24 09:05 Haarolean