0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-07 15:39:42 -05:00

🐛 Fix history panel remains open after restoring a version

This commit is contained in:
Pablo Alba 2024-12-05 15:55:14 +01:00
parent f2f3d9f7eb
commit b0a3f2b72a
2 changed files with 5 additions and 1 deletions

View file

@ -71,4 +71,7 @@ test("Save and restore version", async ({ page }) => {
); );
await page.getByRole("button", { name: "Restore" }).click(); await page.getByRole("button", { name: "Restore" }).click();
// check that the history panel is closed after restore
await expect(page.getByRole("tab", { name: "design" })).toBeVisible();
}); });

View file

@ -126,7 +126,8 @@
ptk/WatchEvent ptk/WatchEvent
(watch [_ _ _] (watch [_ _ _]
(rx/concat (rx/concat
(rx/of ::dwp/force-persist) (rx/of ::dwp/force-persist
(dw/remove-layout-flag :document-history))
(->> (rx/from-atom refs/persistence-state {:emit-current-value? true}) (->> (rx/from-atom refs/persistence-state {:emit-current-value? true})
(rx/filter #(or (nil? %) (= :saved %))) (rx/filter #(or (nil? %) (= :saved %)))
(rx/take 1) (rx/take 1)