-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Preserve Filter State When Navigating History #3220
New issue
Have a question about this project? Sign up for 8000 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
Comments
Hi, I like this idea! When I implemented navigation, I considered but omitted this feature to keep complexity down and hopefully get the feature into hands quicker and also because I wasn't confident this would be functionality every user would want implemented this way. I'd prefer to give users choice or make intelligent, reasonable decisions for them and I wanted the project to have feedback like this to inform what's best for k9s for everyone. As an aside, you don't need to ping me or other contributors on features they've added. I've only submitted a couple PRs to k9s as a hobbyist - others could come in and try to implement this feature without me, or if they had questions they could ask me then. Thank you! |
Noted on the pinging. I just wanted to acknowledge your previous work, but I’ll keep that in mind going forward. |
Since this seems like a great feature and no one else has picked it up to work on, I'll start working on it (especially since I would appreciate this feature too 😀) I'll probably implement it as "preserve filter when paging back and forth by default" and if a further feature request comes for configurable behavior, I'll add that option to the config then to be conservative with adding config complexity. |
Is this issue being worked on? |
Yes, but I'm stuck. I need to access the filter history at a point in the code where accessing it requires doing stuff that doesn't seem right. I asked a question in the Slack about it but didn't get any response. |
Uh oh!
There was an error while loading. Please reload this page.
Description:
K9s currently supports navigating back (
[
) and forward (]
) through view history. However, when switching between views (e.g., from Pods to Services) and then using the back command, K9s does not restore the previous filter state applied in the Pods view. Instead, it resets to an unfiltered view.It would be helpful if K9s remembered and restored the filter state when navigating back/forward in history. This would allow users to seamlessly return to their previous context without needing to reapply filters manually.
Use Case:
1. A user filters the Pods view to show only a specific subset of pods.
2. They navigate to the Services view.
3. They press
[
to go back to the Pods view.4. Expected behavior: The filtered state is restored.
5. Current behavior: The filter is lost, and the Pods view resets.
The text was updated successfully, but these errors were encountered: