vitest-dev / vitest

Next generation testing framework powered by Vite.
https://vitest.dev
MIT License
12.89k stars 1.15k forks source link

UI splitpanes sizes are no longer persisted to local storage #6678

Open posva opened 5 days ago

posva commented 5 days ago

Describe the bug

It seems that there was a regression of https://github.com/vitest-dev/vitest/pull/5166

I think that the initOnMounted option no longer takes effect since they were moved outside of a component. Maybe they should be exposed as functions instead of variables const useDetailsSizes = () => useLocalStorage(...)

Reproduction

https://stackblitz.com/edit/vitest-dev-vitest-enxjhj?file=README.md&initialPath=__vitest__/

(default repro, might have outdated deps but I tested locally too)

System Info

na

Used Package Manager

pnpm

Validations

userquin commented 5 days ago

I guess we need to split logic for ui and browser ui: right now using mainSizes on UI when we should use detailSizes (in the new UI there is no details, the middle panel has been removed)

userquin commented 5 days ago

Check the video, it is working again: https://streamable.com/8tzfxh

EDIT: we'll have some side effect when switching between UI and Browser UI: mainSizes and detailSizes for Browser UI and we should add a new sizes for UI /cc @sheremet-va

imagen