plugins icon indicating copy to clipboard operation
plugins copied to clipboard

add(toggle-pane) : add `reset_state` to set other restore state

Open Jaehaks opened this issue 9 months ago • 5 comments

When restoring after max_preview, revert to the min-preview state To resolve #94

Jaehaks avatar Mar 22 '25 05:03 Jaehaks

Thanks for the PR @Jaehaks!

I'd prefer not to add extra config. Is it possible to leverage the existing state to restore the view? When toggle-pane is called for the first time, its state should be saved to st.

sxyazi avatar Mar 22 '25 08:03 sxyazi

This PR suggests returning to the reset state as the original behavior if we don't configure a default setup. Is that not enough?

Jaehaks avatar Mar 22 '25 09:03 Jaehaks

Yes, that means the user needs to configure it.

I think it would feel more natural if you enter mode A but switch to mode B without exiting, and then when you exit mode B, it restores to mode A, that should be the default behavior.

On Sat, Mar 22, 2025 at 5:46 PM Jaehaks @.***> wrote:

This PR suggests returning to the reset state as the original behavior if we don't configure a default setup. Is that not enough?

— Reply to this email directly, view it on GitHub https://github.com/yazi-rs/plugins/pull/95#issuecomment-2745183842, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEFWFIDFG5KP3E2OKWC3IED2VUWRHAVCNFSM6AAAAABZRPYUNKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONBVGE4DGOBUGI . You are receiving this because you commented.Message ID: @.***> [image: Jaehaks]Jaehaks left a comment (yazi-rs/plugins#95) https://github.com/yazi-rs/plugins/pull/95#issuecomment-2745183842

This PR suggests returning to the reset state as the original behavior if we don't configure a default setup. Is that not enough?

— Reply to this email directly, view it on GitHub https://github.com/yazi-rs/plugins/pull/95#issuecomment-2745183842, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEFWFIDFG5KP3E2OKWC3IED2VUWRHAVCNFSM6AAAAABZRPYUNKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONBVGE4DGOBUGI . You are receiving this because you commented.Message ID: @.***>

sxyazi avatar Mar 22 '25 13:03 sxyazi

Ok i'll try it. please wait. i am not good at programming

Jaehaks avatar Mar 22 '25 15:03 Jaehaks

@sxyazi I commited second one, check please

Jaehaks avatar Mar 23 '25 01:03 Jaehaks