Skip to content
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

feat: refresh float #322

Merged
merged 16 commits into from
Sep 21, 2024
Merged

feat: refresh float #322

merged 16 commits into from
Sep 21, 2024

Conversation

Ramilito
Copy link
Owner

@Ramilito Ramilito commented Sep 19, 2024

Fixes #228

This is working as we want it I believe, do you want to verify @mosheavni?

  • Don't clear content if we only want to refresh the same float view
  • Don't clear builder state if it's a refresh of the float_view
  • handle informer events (from events resource) not triggering eventhandler for other resources
  • fix ugly hacks (read comments)

lua/kubectl/mappings.lua Outdated Show resolved Hide resolved
ft = "k8s_desc",
url = { "describe", "pod", name, "-n", ns },
syntax = "yaml",
}

if not name or not ns then
def.url = nil
end
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we check if def.url is null to determine if this is a refresh, we should do this some other way, perhaps a parameter instead

@mosheavni
Copy link
Contributor

found a little issue: when i first describe a pod, then quit the float, then describe a different pod, I see the last output. I have to close it again and re-describe it in order to see the right pod description.

@mosheavni
Copy link
Contributor

found a little issue: when i first describe a pod, then quit the float, then describe a different pod, I see the last output. I have to close it again and re-describe it in order to see the right pod description.

oh i was wrong, it was just loading but now it didn't display the "Loading..." when it actually did make sense to display it for every new describe

@Ramilito
Copy link
Owner Author

Ramilito commented Sep 21, 2024

you scared me there with the first comment 😅! I'll do some small beauty fixes to the code and then merge it

hmm...I'm actually seeing what you described now

@Ramilito Ramilito merged commit 713dce2 into main Sep 21, 2024
1 check passed
@Ramilito Ramilito deleted the feat/refresh_float branch September 21, 2024 19:46
@Ramilito
Copy link
Owner Author

@mosheavni The issue you mentioned should be fixed now, if we find any more lets open new pr's since this one is getting too big now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: refresh describe resource on change
2 participants