dsh-conversation-float 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -10,13 +10,13 @@ The float is **DSH's own** — the dock kit's floating panel, the same one the r
10
10
 
11
11
  **Entry**: the small window icon at the right of the session title bar (*Conversation float*).
12
12
 
13
- One click opens the float and the rest of the DSH chrome steps aside; the same button then brings DSH back, so it is one toggle. Closing the float, stowing it in the left sidebar or docking it into the right sidebar brings the chrome back on its own.
13
+ One click opens the float **with the rest of DSH still on screen**: both sidebars open, and the float sits centred in the room they leave. The *same* button then hides the DSH interface and leaves the float alone — its tooltip reads *Hide DSH* before that press and *Show DSH* while hidden — and the press after that brings the interface back. Closing the float, stowing it in the left sidebar or docking it into the right sidebar hands the sidebars back on its own.
14
14
 
15
15
  The float **opens large** (about 920×711, scaled to the window) by calling the dock kit's own `resizeFloat` intent — `sidebarRight.require()` → `actions.resizeFloat(sessionId, paneId, rect)`, with `paneId` read from `data-dockkit-float` on the float. It only grows a float; one you already enlarged is never shrunk back.
16
16
 
17
17
  A collapsed right sidebar is **expanded before** the float opens, so "stow back into the sidebar" has somewhere to land, and a collapsed left sidebar is expanded too — collapse is detected by measuring width, so a narrow window never gets a collapse flag written.
18
18
 
19
- **Closing the float and returning the conversation to the middle column restores the sidebars exactly as they were before it opened.** If you touched a sidebar **yourself** while the float was open, that last setting wins. "Yourself" counts only your own press or key, in both directions: DSH narrowing the left sidebar on a small window, or a hidden sidebar being re-laid-out, does not count. The snapshot is taken once, before any sidebar is touched, and is never overwritten while the float is up.
19
+ **Closing the float — or leaving the hidden state — puts the sidebars back the way the window had them.** If you closed or opened a sidebar **yourself** while the float was open, that last arrangement is what comes back, and it is what comes back even when you close the float from the hidden state: a window you pared down to the right column stays that way. "Yourself" counts only your own press on a sidebar or a key, in both directions: DSH narrowing the left sidebar on a small window, a hidden sidebar being re-laid-out, or a press inside the float itself does not count. The snapshot of the earlier window is taken once, before any sidebar is touched, and is never overwritten while the float is up.
20
20
 
21
21
  ## Drag it left, centre or right
22
22
 
@@ -26,17 +26,20 @@ The three bands are the window's real columns: **left sidebar** (frame column 0,
26
26
 
27
27
  | Drop | After release |
28
28
  | --- | --- |
29
- | **Left** | The float is **stowed in the left sidebar drawer**: it is not closed, only invisible, so the middle column stays empty; the left sidebar grows a *Conversation float* row that brings it back |
29
+ | **Left** | The float is **stowed in the left sidebar drawer**: it is not closed, only invisible, so the middle column stays empty; the left sidebar grows a row **named after that Conversation** that brings it back |
30
30
  | **Centre** | The float closes and the conversation returns to the middle column |
31
31
  | **Right** | The conversation docks as a **page in the right sidebar** — a native DSH tab with its own *Return to sidebar* and close |
32
32
 
33
- The left-sidebar row exists only after a float has actually been put there; before that the left sidebar stays empty and no permanent entry is added.
33
+ The left-sidebar row exists only after a float has actually been put there; before that the left sidebar stays empty and no permanent entry is added. The row carries the stowed Conversation's title — not the plugin's name — and switching Conversations leaves that title alone: pressing the row returns to *that* Conversation and puts its float back on screen.
34
+
35
+ **Or skip the drag.** The left sidebar's *More* menu carries **Stow the conversation here**, and the guide's *More tools* card in the right sidebar carries **Move the conversation here**. Both are ordinary DSH menu rows below the shipped ones, and each hides itself once the conversation is already where it would send it.
34
36
 
35
37
  ## How it works (and why the conversation is not redrawn)
36
38
 
37
39
  - The conversation exists as **one DOM**: the plugin moves the column that carries it into the panel body (same document, same React root) and moves it back on close or host change; if its original seat is gone, the fallback is the middle column.
38
40
  - **Stow left** = a marker on the float's root makes it hidden (`visibility`/`opacity`); the panel is **not closed**, which is why the middle column can stay empty.
39
41
  - **Dock right** = hands the tab to the right sidebar (`openResource(..., { destination: 'sidebar' })`) and lets DSH do the move and the docking.
42
+ - **The docked tab keeps its body**: the tab type is registered with `keepMounted`, so switching to another tab of the right sidebar leaves the conversation in that tab's body instead of handing it back to the middle column. The column follows whichever retained body is on screen while its own Session is the current one; for any other Session the middle column is the seat again, exactly as before.
40
43
 
41
44
  ## Performance
42
45
 
@@ -45,10 +48,17 @@ Each animation frame does at most one measurement; the three bands are measured
45
48
  ## Known limits
46
49
 
47
50
  - A conversation has exactly one host: the left-sidebar row is an **entry**, never a second live copy of the conversation.
51
+ - The float belongs to the Session that opened it: switching to another Session hands the Conversation back to that Session's middle column (or to its own float, if that Session has one), and switching back brings this Session's float back.
52
+ - The left-sidebar row is named after the Conversation that was stowed and keeps that name while the window looks at other Conversations. Pressing it switches to that Conversation and un-hides its float; it never floats whichever Conversation happens to be on screen.
53
+ - The drawer holds **one** Conversation. Stowing another replaces the resident one: the replaced float is released back to being an ordinary float (losing only the drawer marker), so the left sidebar never grows a second row.
48
54
  - Taking the float back out of the drawer puts it back **where it was stowed** (possibly over the left sidebar); it does not recentre.
49
55
  - This is a float inside the DSH window, not a separate OS window.
50
56
  - Restart DSH and the drawer state is gone; the conversation returns to the middle column.
51
57
 
58
+ ## Moving the float
59
+
60
+ The float is moved by DSH's own drag. While a hand is on the panel the plugin applies no seat of its own — re-applying the remembered rectangle mid-drag is what used to snap the float back on the first movement.
61
+
52
62
  ## Install
53
63
 
54
64
  Requires DSH **>= 0.2.2-rc.1** — the version this bundle is developed and tested against.
@@ -61,7 +71,7 @@ npm i dsh-conversation-float
61
71
 
62
72
  Then register it in the **profile's `package.json`** — both steps are required:
63
73
 
64
- 1. add `"dsh-conversation-float": "^0.1.1"` to `dependencies`
74
+ 1. add `"dsh-conversation-float": "^0.1.4"` to `dependencies`
65
75
  2. add `"dsh-conversation-float"` to `dsh.profile.bundles` — only a registered bundle shows up in the plugin list and can be toggled
66
76
 
67
77
  ### From source