@goflowstate/widget-sdk 0.3.1 → 0.3.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
@@ -160,8 +160,9 @@ before the first state arrives.
160
160
 
161
161
  A flow that calls `CanvasWidget.initSession()` carries the feedback icon with no code of its own.
162
162
  While the ring has feedback switched on, the session state says so and the SDK puts a round
163
- button in the corner of the page. A tap takes a screenshot of the page, then opens a sheet with
164
- one field. The note is sent through the flow's session to `POST /api/w/:slug/feedback`.
163
+ button in the corner of the page. A tap opens a sheet with one field at once and takes a
164
+ screenshot of the page behind it; the sheet shows "Taking a screenshot" until the picture is
165
+ attached, and neither the icon nor the sheet is in it. The note is sent through the flow's session to `POST /api/w/:slug/feedback`.
165
166
 
166
167
  The icon and the sheet take the look of the page they sit on: its fonts, ground, ink, the fill
167
168
  and shape of its main button, and its corner radius. To pin a role, set a custom property on
@@ -174,6 +175,27 @@ and shape of its main button, and its corner radius. To pin a role, set a custom
174
175
  }
175
176
  ```
176
177
 
178
+ The sheet's type comes from the words the flow is drawing, not from `<body>`: the title takes
179
+ the face, weight and letter spacing of the flow's largest heading, the note and the field take
180
+ the face most of the flow's smaller text is set in, and the send button takes the face, weight,
181
+ letter spacing and case of the flow's main button. Pin `--fs-feedback-font` or
182
+ `--fs-feedback-font-display` when the reading is off.
183
+
184
+ The button floats over the flow and belongs to the person using it. They can drag it anywhere,
185
+ and it settles on the nearer side. A flick at an edge, or a drag into one, docks it there as a
186
+ slim tab with the bug still showing; a tap on the tab opens the sheet, and pulling the tab
187
+ inward floats it again. The sheet also has a "Tuck the button to the side" link. Where a person
188
+ leaves the button is remembered.
189
+
190
+ Until a person moves it, the button keeps clear of the page's own controls. It starts in the bottom corner and, whenever
191
+ the page changes, resizes or stops scrolling, looks up the right edge for the lowest spot that is empty. It sits over a line of text only
192
+ when empty space is far above it, and on a control only when the whole edge is controls. Pinning
193
+ `--fs-feedback-bottom` turns that off and holds the icon where the flow puts it.
194
+
195
+ To take the icon off one screen of a flow (a film, a full-screen picture), set
196
+ `--fs-feedback-display: none` from the flow's stylesheet while that screen is up, for example
197
+ `:root:has(.film) { --fs-feedback-display: none; }`.
198
+
177
199
  Name each screen so a report says where it came from: `document.body.dataset.pageKey = 'question-2'`.
178
200
  A page that must not show the icon (a projected wall) sets `<html data-fs-feedback="off">`.
179
201