From bcb69b6227499e4920ecab42555ba0177b5cff6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Tejero-Cantero?= <807608+alvorithm@users.noreply.github.com> Date: Mon, 7 Jul 2025 09:44:06 +0200 Subject: [PATCH] :bug: Restore viewport and selection when exiting focus mode (#6827) * :books: Provide guidance on how to exit focus mode * :bug: Restore viewport & selection post focus mode * :paperclip: Update changelog --- CHANGES.md | 1 + docs/user-guide/layer-basics/index.njk | 9 ++++-- .../app/main/data/workspace/selection.cljs | 28 ++++++++++++++----- 3 files changed, 28 insertions(+), 10 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 49c2a820ea..228397eca7 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -19,6 +19,7 @@ - Copying font size does not copy the unit [Taiga #11143](https://tree.taiga.io/project/penpot/issue/11143) - Fix text-decoration line-through that displays a wrong property value [Taiga #11145](https://tree.taiga.io/project/penpot/issue/11145) - Fix display error message on register form [Taiga #11444](https://tree.taiga.io/project/penpot/issue/11444) +- Fix toggle focus mode did not restore viewport and selection upon exit [GitHub #6280](https://github.com/penpot/penpot/issues/6820) ## 2.8.0 (Next / Unreleased) diff --git a/docs/user-guide/layer-basics/index.njk b/docs/user-guide/layer-basics/index.njk index ff17a77738..317857423c 100644 --- a/docs/user-guide/layer-basics/index.njk +++ b/docs/user-guide/layer-basics/index.njk @@ -281,12 +281,15 @@ press Shift/⇧ + left click over the right arrow of a group or a boa

Focus mode

-

Select the elements of a page you want to work with in a specific moment hiding the rest so they don’t get in the way of your attention. This option is also useful to improve the performance in cases where the page has a large number of elements.

+

Focus mode zooms into the elements of a page you want to work with in a specific moment, and hides the rest so that they don’t get in the way. When the page has many elements, focus mode can also improve performance.

To activate focus mode:

-
    +
    1. Select one or more elements.
    2. -
    3. Right click to show the menu and select the option "Focus on" or press F.
    4. +
    5. Right click on the selection to show the menu and select the option “Focus on” or press F.
    +

    Notice that the layer panel will now only show the focused layers. A focus mode status line will also appear at the top.

    +

    To exit focus mode and return to the original viewport and selection, right click anywhere and select “Focus off” or just press F again. You can also click anywhere on the focus mode status line at the top of the layer panel. +