create-heresay 0.2.49 → 0.2.50
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/package.json +1 -1
- package/release/VERSION +1 -1
- package/release/functions/lib/core/version.js +1 -1
- package/release/public/dashboard.css +0 -3
- package/release/public/dashboard.js +52 -61
- package/release/public/demo.html +1 -1
- package/release/public/docs.html +20 -24
- package/release/public/guides/customize-apple.md +83 -89
- package/release/public/guides/customize-web.md +101 -98
- package/release/public/guides/index.json +3 -3
- package/release/public/guides/install-apple.md +17 -23
- package/release/public/guides/install-web.md +60 -44
- package/release/public/guides/start.md +29 -43
- package/release/public/llms.txt +1 -1
- package/release/public/sdk.js +629 -389
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
# Change how Heresay looks in an iOS or macOS app
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
The easiest way to choose is the dashboard: open the app, then **Design**. It shows a likeness
|
|
9
|
-
of the button and sheet with the choices applied and gives the exact Swift, plus a prompt for
|
|
10
|
-
you. If the person pasted that prompt, do what it says and nothing more.
|
|
3
|
+
The defaults are the recommended setup. Change something only when the person asks or the app
|
|
4
|
+
clearly needs it. It is one `HeresayStyle`, passed to `Heresay.configure`, plus `accent`. Needs
|
|
5
|
+
the Swift package 0.2.11 or later. The dashboard's **Design** page previews it and gives the
|
|
6
|
+
Swift; if the person pasted its prompt, do exactly that.
|
|
11
7
|
|
|
12
8
|
```swift
|
|
13
9
|
Heresay.configure(
|
|
@@ -18,107 +14,105 @@ Heresay.configure(
|
|
|
18
14
|
)
|
|
19
15
|
```
|
|
20
16
|
|
|
21
|
-
##
|
|
17
|
+
## Options
|
|
22
18
|
|
|
23
|
-
|
|
24
|
-
| --- | --- |
|
|
25
|
-
| Its own feedback or help button | `.heresay()` instead of `.heresayReportButton()`, and that button calls `Heresay.present()` |
|
|
26
|
-
| A macOS app | keep the default: `.heresay()` plus `.commands { HeresayCommands() }` (Help › Report a Problem…, ⌥⌘R) |
|
|
27
|
-
| A tab bar or toolbar in the bottom right | `position: .bottomLeading`, or `offset: 80` to sit above it |
|
|
28
|
-
| A brand colour | `accent:` on `configure` (the mark follows it) |
|
|
29
|
-
| Only a dark theme, or only a light one | `theme: .dark` or `.light`; otherwise leave it following the app |
|
|
30
|
-
| French, Tamil or Hindi users | nothing, if the app is localised into `fr`, `ta` or `hi`; otherwise `language:` with that code |
|
|
31
|
-
| An error screen | a button there that calls `Heresay.present(type: .broken, text: "<what failed>")` |
|
|
32
|
-
| Screens where a corner button gets in the way (checkout, sign-in) | `hiddenOnScreens: ["Checkout"]`, and those screens call `Heresay.setScreen("Checkout")` |
|
|
33
|
-
|
|
34
|
-
## Every option
|
|
35
|
-
|
|
36
|
-
`HeresayStyle(...)` takes these in this order (Swift needs the order); leave out any you don't
|
|
19
|
+
`HeresayStyle(...)` takes these **in this order** (Swift requires it); leave out any you don't
|
|
37
20
|
change. The first value is the default.
|
|
38
21
|
|
|
39
22
|
| Parameter | Values |
|
|
40
23
|
| --- | --- |
|
|
41
24
|
| `position` | `.bottomTrailing` · `.bottomLeading` · `.topTrailing` · `.topLeading` · `.bottom` |
|
|
42
25
|
| `offset` | `16` points from the edges (at most 200) |
|
|
43
|
-
| `label` | `nil` ("Report"
|
|
44
|
-
| `
|
|
45
|
-
| `size` | `.regular` · `.small` · `.large` |
|
|
46
|
-
| `fill` | `.accent` (filled with the accent, white text) · `.neutral` (system material, the mark in the accent) |
|
|
47
|
-
| `shadow` | `.soft` · `.none` · `.strong` |
|
|
48
|
-
| `hiddenOnScreens` | `[]` · screen names as set with `Heresay.setScreen` |
|
|
49
|
-
| `markFollowsAccent` | `true` · `false` (keep the Heresay teal) |
|
|
26
|
+
| `label` | `nil` ("Report") · any text up to 40 characters |
|
|
27
|
+
| `hiddenOnScreens` | `[]` · screen names set with `Heresay.setScreen` |
|
|
50
28
|
| `theme` | `.system` · `.light` · `.dark` |
|
|
51
|
-
| `
|
|
52
|
-
| `
|
|
53
|
-
| `placeholder` | `nil` · the question in the text box, up to 120 characters |
|
|
54
|
-
| `types` | all four · some of `[.broken, .confusing, .improvement, .idea]`. Their names can't change: the type sets the priority. |
|
|
55
|
-
| `thanks` | `nil` · a line after "Sent. Thank you.", up to 160 characters. Don't promise a fix. |
|
|
56
|
-
| `sheet` | `.regular` · `.compact` (half height on iPhone; narrower on Mac) · `.large` (full screen on iPhone and iPad; wider on Mac) |
|
|
57
|
-
| `showsPreferences` | `true` · `false` (hide it when the app calls `identify` and wants nothing else asked) |
|
|
58
|
-
|
|
59
|
-
`Heresay.setStyle(_:)` changes it later, for example when the app's own theme setting changes.
|
|
60
|
-
|
|
61
|
-
**The trail**
|
|
62
|
-
|
|
63
|
-
With each report, Heresay attaches what happened in the app in the last few minutes: screens
|
|
64
|
-
(named with `Heresay.setScreen` or `.heresayScreen("Settings")`), the app's own `Logger` errors,
|
|
65
|
-
the last crash, going offline, and on macOS clicks (by their accessibility label) and menu
|
|
66
|
-
commands. It is kept on disk as it happens, so after a crash the next report says what happened
|
|
67
|
-
before the app closed and whether it was the first launch after an update. The reporter sees it in the sheet and can switch it off or leave parts out. Never what
|
|
68
|
-
anyone typed. On by default; change it only when asked.
|
|
69
|
-
|
|
70
|
-
| Option | Values |
|
|
71
|
-
| --- | --- |
|
|
72
|
-
| `configure(…, trail:)` | `.all` (default) · `[]` (off) · some of `[.screens, .clicks, .errors]` |
|
|
73
|
-
| `.heresayPrivate()` | on a view whose controls are named after someone's data: clicks inside it are recorded as "button", without the label |
|
|
29
|
+
| `language` | `nil` (the app's language) · `"en"` · `"fr"` · `"ta"` · `"hi"`. Others show English. |
|
|
30
|
+
| `layout` | `.composer` · `.steps` · `.bar` (last parameter; see Layout) |
|
|
74
31
|
|
|
75
|
-
|
|
32
|
+
On `configure`: `accent:` (a `Color`; the mark follows it) and `style:`. `Heresay.setStyle(_:)`
|
|
33
|
+
changes it later.
|
|
76
34
|
|
|
77
|
-
|
|
78
|
-
not working?" and opens the sheet as Broken, with the trail. Watched on the device, never sent. At
|
|
79
|
-
most once per launch. Off by default: it appears on the app's own screen, so add it only when
|
|
80
|
-
asked.
|
|
35
|
+
## Layout
|
|
81
36
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
**Crash reports**
|
|
87
|
-
|
|
88
|
-
Off by default: a crash waits on the device and goes with the next report someone sends. Turn on
|
|
89
|
-
`crashReports: .send` when the team wants every crash, including ones nobody reports, for example
|
|
90
|
-
an app that crashes on launch for some people:
|
|
37
|
+
`layout:` is the last `HeresayStyle` parameter and picks how a report opens. The reporter never
|
|
38
|
+
sees the choice. All three send the same data, need a type and some text before Send is enabled,
|
|
39
|
+
keep the same Sent view and the same Your reports view, show no trail, and hide the floating
|
|
40
|
+
Report button while open. `Heresay.present(type:text:)` preselects the type in all of them.
|
|
91
41
|
|
|
92
42
|
```swift
|
|
93
|
-
|
|
43
|
+
HeresayStyle(layout: .steps) // .composer (default) · .steps · .bar
|
|
94
44
|
```
|
|
95
45
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
46
|
+
**`.composer` (default).** One sheet. Header: mark, "Report", Your reports (with a dot when there
|
|
47
|
+
is a reply), close. Then one row of the four type pills, a text box whose question follows the
|
|
48
|
+
type, Send, and a one-line footer. Choose it when you have no strong preference: one screen, all
|
|
49
|
+
choices visible. iPhone: a sheet that fits the form and rises with the keyboard. iPad and Mac: a
|
|
50
|
+
regular sheet.
|
|
51
|
+
|
|
52
|
+
**`.steps`.** Two screens. Screen 1: "What's going on?", Your reports (clock icon with a dot),
|
|
53
|
+
close, and four full-width rows (Broken, Confusing, Could be better, Idea), each with an icon and
|
|
54
|
+
a chevron, then "Powered by Heresay". Tapping a row goes to screen 2: back, the chosen type as a
|
|
55
|
+
pill, the text box, Send. Choose it for a guided, friendlier feel or for people who don't know what
|
|
56
|
+
to write until they have chosen a kind. `types:` shortens the list. With `present(type:)` it opens
|
|
57
|
+
on screen 2. iPhone: a sheet that fits each screen. iPad and Mac: a regular sheet.
|
|
58
|
+
|
|
59
|
+
**`.bar`.** Compact, not a sheet. A "Type" menu chip on the left (Broken, Confusing, Could be
|
|
60
|
+
better, Idea, with icons; it then shows the choice), a one-line text field "Tell the team..." that
|
|
61
|
+
grows, and a round send arrow, disabled until there is a type and text. Under it: Your reports,
|
|
62
|
+
"Powered by Heresay", close. After Send the bar shows a check, "Sent. Replies show under Your
|
|
63
|
+
reports." and Done. Your reports opens the normal Your reports sheet. Choose it when the screen
|
|
64
|
+
should stay visible and reports are usually one line. iPhone and iPad: docked at the bottom, above
|
|
65
|
+
the keyboard. Mac: a small panel in the window, in the corner `position` names (bottom corners
|
|
66
|
+
and `.bottom` dock at the bottom, top ones at the top).
|
|
67
|
+
|
|
68
|
+
**With no floating button** (`.heresay()` plus your own button calling `Heresay.present()`, or
|
|
69
|
+
macOS Help › Report a Problem… with `HeresayCommands`) every layout works the same. Every
|
|
70
|
+
`position` works with every layout.
|
|
71
|
+
|
|
72
|
+
## When to change what
|
|
73
|
+
|
|
74
|
+
| The app has... | Do this |
|
|
75
|
+
| --- | --- |
|
|
76
|
+
| Its own feedback or help button | `.heresay()` instead of `.heresayReportButton()`; that button calls `Heresay.present()` |
|
|
77
|
+
| macOS | the default: `.heresay()` plus `.commands { HeresayCommands() }` (Help › Report a Problem…, ⌥⌘R) |
|
|
78
|
+
| A tab bar or toolbar in the bottom right | `position: .bottomLeading`, or `offset: 80` |
|
|
79
|
+
| Screens where the button is in the way | `hiddenOnScreens: ["Checkout"]`, and those screens call `Heresay.setScreen("Checkout")` |
|
|
80
|
+
| An error screen | a button calling `Heresay.present(type: .broken, text: "<what failed>")` |
|
|
81
|
+
|
|
82
|
+
## Calls
|
|
103
83
|
|
|
104
|
-
|
|
105
|
-
|
|
84
|
+
- `Heresay.identify(id:label:email:)`, `Heresay.identify()` on sign-out.
|
|
85
|
+
- `Heresay.introduce()`: the one-time introduction.
|
|
86
|
+
- `Heresay.setScreen(_:)`, or `.heresayScreen("Settings")` on a screen's root view.
|
|
87
|
+
- `Heresay.present(type:text:)`: opens the sheet, filled in. The person still reviews and sends.
|
|
88
|
+
- `Heresay.onSent { event in ... }`: after each send, with `event.id` and `event.type`, never the text.
|
|
106
89
|
|
|
107
|
-
|
|
108
|
-
`.heresayScreen("<name>")` to each screen's root view.
|
|
90
|
+
## The trail
|
|
109
91
|
|
|
110
|
-
|
|
92
|
+
On by default, each report carries what happened in the last few minutes (screens, the app's
|
|
93
|
+
`Logger` errors, the last crash, going offline; on macOS clicks and menu commands) and never
|
|
94
|
+
what anyone typed. The sheet doesn't show or ask about it; it goes with every report. `.heresayPrivate()` on a view whose controls
|
|
95
|
+
are named after someone's data.
|
|
111
96
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
97
|
+
## Crash reports
|
|
98
|
+
|
|
99
|
+
Off by default. `crashReports: .send` on `configure` reports a run that ended badly (a crash, a
|
|
100
|
+
hang, out of memory, a force quit) at the next launch, as Broken, waiting in the inbox for a
|
|
101
|
+
person. Keep `configure` the first line of `init`. It sends diagnostics without asking: the
|
|
102
|
+
privacy policy should say so, and App Store privacy details should list Crash Data and Other
|
|
103
|
+
Diagnostic Data.
|
|
104
|
+
|
|
105
|
+
```swift
|
|
106
|
+
Heresay.configure(key: "KEY", url: URL(string: "HERESAY_URL")!, crashReports: .send)
|
|
107
|
+
```
|
|
117
108
|
|
|
118
109
|
## Can't be changed
|
|
119
110
|
|
|
120
|
-
The Heresay mark, the report types' names,
|
|
121
|
-
a report was declined), and "Powered by Heresay"
|
|
122
|
-
|
|
111
|
+
The Heresay mark, the report types' names, "Your reports" (people must be able to read
|
|
112
|
+
why a report was declined), and "Sent to this app's team · Powered by Heresay" at the foot of every view. Don't
|
|
113
|
+
cover or remove them.
|
|
123
114
|
|
|
124
|
-
|
|
115
|
+
Other `HeresayStyle` parameters still work (button, size, fill, shadow, markFollowsAccent,
|
|
116
|
+
typeface, placeholder, types, thanks, sheet, showsPreferences; showsPreferences now hides the "Your name and email" row at the bottom of Your reports), as do `trail:` and `nudge:` on
|
|
117
|
+
`configure` and `Heresay.nudge()`. Leave them as they are in existing apps and don't add them
|
|
118
|
+
unless asked.
|
|
@@ -1,125 +1,128 @@
|
|
|
1
1
|
# Change how Heresay looks in a web app
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
The defaults are the recommended setup. Change something only when the person asks or the app
|
|
4
|
+
clearly needs it. Options are `data-` attributes on the same script tag; no CSS is needed (and
|
|
5
|
+
the app's CSS can't reach the widget). The dashboard's **Design** page previews them and gives
|
|
6
|
+
the tag; if the person pasted its prompt, do exactly that.
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
widget with the choices applied and gives the exact tag, plus a prompt for you. If the person
|
|
10
|
-
pasted that prompt, do what it says and nothing more.
|
|
11
|
-
|
|
12
|
-
## When to change what
|
|
13
|
-
|
|
14
|
-
| The app has... | Do this |
|
|
15
|
-
| --- | --- |
|
|
16
|
-
| Its own "Send feedback" or help menu | `data-button="none"`, and make that menu item call `window.Heresay?.open()` |
|
|
17
|
-
| A chat bubble or cookie banner in the bottom right | `data-position="left"`, or `data-offset="20,96"` to sit above it |
|
|
18
|
-
| A brand colour | `data-accent="#rrggbb"` (the logo follows it) |
|
|
19
|
-
| Only a dark theme, or only a light one | `data-theme="dark"` or `"light"`; otherwise leave it following the device |
|
|
20
|
-
| French, Tamil or Hindi users | nothing, if `<html lang>` is set (`fr`, `ta`, `hi`); otherwise `data-lang` with that code, or `"auto"` |
|
|
21
|
-
| An error screen or "Something went wrong" page | a button there that calls `window.Heresay?.open({ type: 'broken', text: '<what failed>' })` |
|
|
22
|
-
| Pages where a floating button gets in the way (checkout, login) | `data-hide-on="/checkout,/login"` |
|
|
23
|
-
|
|
24
|
-
## Every option
|
|
8
|
+
## Options
|
|
25
9
|
|
|
26
10
|
The first value is the default.
|
|
27
11
|
|
|
28
|
-
**The button**
|
|
29
|
-
|
|
30
12
|
| Attribute | Values |
|
|
31
13
|
| --- | --- |
|
|
32
|
-
| `data-
|
|
33
|
-
| `data-
|
|
34
|
-
| `data-
|
|
35
|
-
| `data-
|
|
36
|
-
| `data-
|
|
37
|
-
| `data-
|
|
38
|
-
| `data-
|
|
39
|
-
| `data-shadow` | `soft` · `none` · `strong` |
|
|
40
|
-
| `data-hide-on` | comma-separated paths; each hides the button on that path and everything under it |
|
|
41
|
-
|
|
42
|
-
**Look**
|
|
43
|
-
|
|
44
|
-
| Attribute | Values |
|
|
45
|
-
| --- | --- |
|
|
46
|
-
| `data-accent` | Heresay peacock · any hex colour, `#rgb` or `#rrggbb`. Anything else is ignored. |
|
|
47
|
-
| `data-mark` | `accent` (the logo follows the accent) · `heresay` (keep the Heresay teal) |
|
|
14
|
+
| `data-key` | the app's key (required) |
|
|
15
|
+
| `data-layout` | `composer` (type pills and a text box) · `steps` (pick what it is, then say it) · `bar` (a compact box beside the button); see Layout |
|
|
16
|
+
| `data-position` | `bottom-right` · `bottom-left` · `top-right` · `top-left` · `bottom-center` · `left-tab` · `right-tab` (a tab on the side edge) · `none` (no button) |
|
|
17
|
+
| `data-offset` | `20` · px from the edges, or `x,y` like `24,96` (at most 400) |
|
|
18
|
+
| `data-hide-on` | none · comma-separated paths; each hides the button on that path and under it |
|
|
19
|
+
| `data-label` | `Report` · any text up to 40 characters |
|
|
20
|
+
| `data-accent` | Heresay peacock · a hex colour (`#rgb` or `#rrggbb`). The logo follows it. |
|
|
48
21
|
| `data-theme` | `auto` (follows the device) · `light` · `dark` |
|
|
49
|
-
| `data-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
22
|
+
| `data-lang` | the page's `<html lang>` · `auto` (the browser's) · `en` · `fr` · `ta` · `hi`. Others show English. |
|
|
23
|
+
| `data-intro` | not set (the app calls `introduce()`) · `auto` (a few seconds after the first visit) |
|
|
24
|
+
| `data-version` | the app's version, attached to every report |
|
|
25
|
+
|
|
26
|
+
## Layout
|
|
27
|
+
|
|
28
|
+
`data-layout` picks how the report form looks and behaves. The type is always required, Send stays
|
|
29
|
+
disabled until a type is chosen and something is typed, and the reporter never picks a priority
|
|
30
|
+
(the type sets it). Every layout has the same "Your reports" view (clock icon, or the "Your
|
|
31
|
+
reports" button in `composer`), the same types (`data-types` leaves some out: fewer pills, rows or
|
|
32
|
+
menu items), and the same words in English, French, Tamil and Hindi. It works with
|
|
33
|
+
`data-position`, `data-offset`, `data-accent`, `data-theme`, `data-lang`, `data-label` and
|
|
34
|
+
`Heresay.open({ type, text })`, which preselects the type and fills the text.
|
|
35
|
+
|
|
36
|
+
Choose `composer` unless the app clearly fits another, or the person asks. Compactness runs
|
|
37
|
+
bar (most compact), composer, steps; guidance runs the other way, steps (most guided), composer, bar.
|
|
38
|
+
|
|
39
|
+
**`composer`** (default). Best for most apps: web apps, sites, SaaS, anything with no strong reason
|
|
40
|
+
to pick another.
|
|
41
|
+
- The reporter taps the button. A panel opens beside it with a header (mark, "Report", "Your
|
|
42
|
+
reports" with a dot when something has an update, close), one row of four type pills (Broken,
|
|
43
|
+
Confusing, Could be better, Idea), a text box whose placeholder follows the type ("What went
|
|
44
|
+
wrong?"), Send, and one footer line.
|
|
45
|
+
- Tap a pill, type, tap Send. A check and "Sent. You'll see the reply under Your reports." appear,
|
|
46
|
+
with Done.
|
|
47
|
+
- On phones (under 600px) the panel is a bottom sheet over a dimmed page. On wider screens it
|
|
48
|
+
opens beside the button, away from the edge, and never covers the button.
|
|
49
|
+
- Tag: `<script src="SDK_URL" data-key="KEY" defer></script>` (no attribute needed), or
|
|
50
|
+
`data-layout="composer"`.
|
|
51
|
+
|
|
52
|
+
**`steps`**: one question at a time. Best for consumer apps, less-technical or mobile-first
|
|
53
|
+
audiences, and people who don't know what to write: picking "what is it" first makes the text easier.
|
|
54
|
+
- The reporter taps the button. Screen 1 reads "What's going on?" with four full-width rows (warning
|
|
55
|
+
triangle Broken, question circle Confusing, trending-up arrow Could be better, light bulb Idea),
|
|
56
|
+
a clock icon for Your reports (with an unread dot) and close. Tapping a row moves to screen 2:
|
|
57
|
+
a back arrow, the chosen type as a pill, a text box with that type's placeholder, Send and the
|
|
58
|
+
footer. Back returns to the rows and keeps what was typed.
|
|
59
|
+
- Two taps and some words. Sent view as in `composer`.
|
|
60
|
+
- With `data-types`, only those rows show. `Heresay.open({ type })` jumps straight to screen 2.
|
|
61
|
+
- On phones it is a bottom sheet over a dimmed page; the rows are large tap targets.
|
|
62
|
+
- Tag: `<script src="SDK_URL" data-key="KEY" data-layout="steps" defer></script>`
|
|
63
|
+
|
|
64
|
+
**`bar`**: a compact floating composer, not a panel. Best for dense or professional tools (dashboards,
|
|
65
|
+
editors, admin screens, data tables) where a panel would cover the work. The page behind stays usable.
|
|
66
|
+
- The reporter taps the button. A small bar opens beside it: a "Type" chip, a one-line text input
|
|
67
|
+
"Tell the team…" that grows as they type, and a round send arrow. Tapping the chip opens a small
|
|
68
|
+
menu of the four types with icons (arrow keys, Enter, Escape); the chip then shows the chosen
|
|
69
|
+
type and the placeholder follows it. The arrow is disabled until a type and some text exist
|
|
70
|
+
(Enter sends, Shift+Enter adds a line). A second row has the Your reports clock icon (with its
|
|
71
|
+
dot), "Powered by Heresay" and close.
|
|
72
|
+
- After sending, the bar shows a check, "Sent. Replies show under Your reports." and Done. Your
|
|
73
|
+
reports opens the normal Your reports panel, and its back arrow returns to the bar.
|
|
74
|
+
- On phones (under 600px) the bar docks to the bottom edge at full width and rides above the keyboard.
|
|
75
|
+
- `data-panel` is ignored by the bar. There is no backdrop.
|
|
76
|
+
- Tag: `<script src="SDK_URL" data-key="KEY" data-layout="bar" defer></script>`
|
|
77
|
+
|
|
78
|
+
**With `data-position`.** The panel or bar opens beside the button, in its corner, away from the
|
|
79
|
+
edge, with room for the button and the same `data-offset`; with `left-tab` or `right-tab` it sits
|
|
80
|
+
beside the tab, vertically centred. With `data-position="none"` (the app opens it with
|
|
81
|
+
`Heresay.open()` from its own menu) it takes the named corner, bottom-right by default, with no button
|
|
82
|
+
to leave room for. Examples:
|
|
83
|
+
`data-layout="steps" data-position="bottom-left"`, `data-layout="bar" data-position="none"`.
|
|
84
|
+
|
|
85
|
+
## Placement
|
|
86
86
|
|
|
87
|
-
|
|
|
87
|
+
| The app has... | Do this |
|
|
88
88
|
| --- | --- |
|
|
89
|
-
|
|
|
90
|
-
|
|
|
91
|
-
|
|
92
|
-
|
|
89
|
+
| Its own feedback or help menu item | `data-position="none"`; the item calls `window.Heresay?.open()` |
|
|
90
|
+
| A chat bubble, cookie banner or bottom nav in the bottom right | `data-position="bottom-left"` or `data-offset="20,96"` |
|
|
91
|
+
| A mobile bottom tab bar | `data-offset="16,72"` |
|
|
92
|
+
| Pages where it's in the way | `data-hide-on="/checkout,/login"` |
|
|
93
|
+
| An error screen | a button calling `window.Heresay?.open({ type: 'broken', text: '<what failed>' })` |
|
|
93
94
|
|
|
94
|
-
|
|
95
|
-
form as Broken, with the trail. Watched on the device, never sent. At most once per tab. Off by default:
|
|
96
|
-
it appears on the app's own page, so add it only when asked.
|
|
95
|
+
## Calls
|
|
97
96
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
97
|
+
- `Heresay?.identify({ id, label, email })`, `identify()` on sign-out.
|
|
98
|
+
- `Heresay?.open({ type, text })`: opens the form, filled in. The person still reviews and sends.
|
|
99
|
+
- `Heresay?.introduce({ title, body })`: the one-time bubble; the default words are fine.
|
|
100
|
+
- `Heresay?.setScreen(name)`: for screens that change without the URL changing.
|
|
101
|
+
- `Heresay?.on('sent', ({ id, type }) => ...)`: after each send; never gets the text. Returns an unsubscribe function.
|
|
101
102
|
|
|
102
|
-
|
|
103
|
+
## The trail
|
|
103
104
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
105
|
+
On by default, each report carries what happened in the last few minutes (pages, clicks by
|
|
106
|
+
label, failed requests, errors, device) and never what anyone typed. It is collected without
|
|
107
|
+
being shown to the reporter, who has nothing to switch. You control it with `data-trail` (`off`, or
|
|
108
|
+
the parts to keep) and `data-heresay-private` on elements whose labels are personal data.
|
|
107
109
|
|
|
108
110
|
## Can't be changed
|
|
109
111
|
|
|
110
|
-
The Heresay mark on the button, the report types' names, the "Your reports" tab (people must
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
112
|
+
The Heresay mark on the button, the report types' names, the "Your reports" tab (people must be
|
|
113
|
+
able to read why a report was declined), and "Powered by Heresay" in the panel and the
|
|
114
|
+
introduction. People should be able to tell the app uses an outside tool. Don't hide these with
|
|
115
|
+
CSS, `::part` or scripts.
|
|
114
116
|
|
|
115
117
|
## Example
|
|
116
118
|
|
|
117
119
|
```html
|
|
118
120
|
<script src="SDK_URL" data-key="KEY"
|
|
119
|
-
data-position="left" data-accent="#7c3aed" data-label="Feedback"
|
|
121
|
+
data-position="bottom-left" data-accent="#7c3aed" data-label="Feedback"
|
|
120
122
|
defer></script>
|
|
121
123
|
```
|
|
122
124
|
|
|
123
125
|
In Next.js, Nuxt and the rest, add the same attributes to the tag's existing form (for example
|
|
124
|
-
`<Script ... data-position="left" />`).
|
|
125
|
-
|
|
126
|
+
`<Script ... data-position="bottom-left" />`). Then run the app and look at the button and the panel.
|
|
127
|
+
|
|
128
|
+
Older attributes (data-button, data-style, data-size, data-fill, data-shadow, data-mark, data-font, data-panel, data-width, data-backdrop, data-preferences, data-placeholder, data-types, data-thanks, data-trail, data-nudge) still work; leave them as they are in existing apps and don't add them unless asked.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"skill_version":
|
|
2
|
+
"skill_version": 9,
|
|
3
3
|
"topics": {
|
|
4
4
|
"start": "What Heresay is, the rules, and which topic to read next",
|
|
5
5
|
"install-web": "Add the Heresay web SDK to an app, for any framework, and prove it works",
|
|
6
|
-
"customize-web": "Change
|
|
6
|
+
"customize-web": "Change the web layout (composer, steps, bar), where the button sits and a few looks: position, offset, hide-on, label, accent, theme, language",
|
|
7
7
|
"install-apple": "Add the Heresay Swift package to an iOS or macOS app",
|
|
8
|
-
"customize-apple": "Change
|
|
8
|
+
"customize-apple": "Change where Heresay sits and a few looks in an iOS or macOS app: HeresayStyle position, offset, label, theme, language",
|
|
9
9
|
"fix-brief": "Fix an accepted report: find, claim, fix, hand off, mark fixed",
|
|
10
10
|
"write-note": "Write the note the reporter reads when a report is fixed",
|
|
11
11
|
"uninstall": "Remove Heresay from an app, and disconnect the repo",
|
|
@@ -16,7 +16,7 @@ Add Package Dependencies; in a `Package.swift`,
|
|
|
16
16
|
`.package(url: "SWIFT_PACKAGE", from: "0.2.0")`. If the project uses XcodeGen or Tuist, add it
|
|
17
17
|
there instead of editing the `.xcodeproj` by hand.
|
|
18
18
|
|
|
19
|
-
## 3. Configure
|
|
19
|
+
## 3. Configure once, and put it on screen
|
|
20
20
|
|
|
21
21
|
In the `App` struct:
|
|
22
22
|
|
|
@@ -26,7 +26,7 @@ import Heresay
|
|
|
26
26
|
@main
|
|
27
27
|
struct MyApp: App {
|
|
28
28
|
init() {
|
|
29
|
-
Heresay.configure(key: "KEY", url: URL(string: "HERESAY_URL")!)
|
|
29
|
+
Heresay.configure(key: "KEY", url: URL(string: "HERESAY_URL")!) // first line of init
|
|
30
30
|
}
|
|
31
31
|
var body: some Scene {
|
|
32
32
|
WindowGroup {
|
|
@@ -36,9 +36,12 @@ struct MyApp: App {
|
|
|
36
36
|
}
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
| Platform or case | Do this |
|
|
40
|
+
| --- | --- |
|
|
41
|
+
| iOS | `.heresayReportButton()` on the root view |
|
|
42
|
+
| macOS | `.heresay()` on the root view, and `.commands { HeresayCommands() }` on the `WindowGroup` (Help › Report a Problem…, ⌥⌘R) |
|
|
43
|
+
| The app has its own feedback or help button | `.heresay()` (no corner button); that button calls `Heresay.present()` |
|
|
44
|
+
| Something in the bottom-right corner, or a tab bar | `HeresayStyle(position: .bottomLeading)` or `offset: 80`: see `customize-apple` |
|
|
42
45
|
|
|
43
46
|
## 4. Who is signed in (required if people sign in)
|
|
44
47
|
|
|
@@ -49,33 +52,24 @@ Heresay.identify(id: user.id, label: user.name, email: user.email)
|
|
|
49
52
|
Heresay.identify() // after sign-out
|
|
50
53
|
```
|
|
51
54
|
|
|
52
|
-
Then nobody is asked their name to send a report, and the team can reply to them.
|
|
53
|
-
|
|
54
55
|
## 5. Tell people it's there (required)
|
|
55
56
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
macOS, the Report button on iOS) and offers to open it. Later calls do nothing, so this is fine:
|
|
57
|
+
Call `Heresay.introduce()` once the main screen shows, after sign-in and onboarding, never over a
|
|
58
|
+
login or first-run screen. Once per install it shows where to find Heresay and offers to open
|
|
59
|
+
it. Later calls do nothing. Don't build your own dialog. If the app has a "What's new" screen,
|
|
60
|
+
add a line there too.
|
|
61
61
|
|
|
62
62
|
```swift
|
|
63
|
-
MainView()
|
|
64
|
-
.onAppear { Heresay.introduce() }
|
|
63
|
+
MainView().onAppear { Heresay.introduce() }
|
|
65
64
|
```
|
|
66
65
|
|
|
67
|
-
If the app already has a "What's new" or announcements screen, add a line there too. Don't
|
|
68
|
-
build a custom dialog for this; `introduce()` is the one.
|
|
69
|
-
|
|
70
66
|
## 6. Optional
|
|
71
67
|
|
|
72
|
-
-
|
|
73
|
-
-
|
|
74
|
-
-
|
|
68
|
+
- `Heresay.setScreen("Checkout")` in `.onAppear` of the main screens.
|
|
69
|
+
- `accent: .purple` on `configure` for a brand colour.
|
|
70
|
+
- The version is read from the bundle.
|
|
75
71
|
|
|
76
|
-
|
|
77
|
-
has a recommended default: leave it unless the person asks. Guide `customize-apple` lists every
|
|
78
|
-
option; the dashboard's **Design** page shows them. Change nothing else in the app.
|
|
72
|
+
Leave everything else; the defaults are recommended. Change nothing else in the app.
|
|
79
73
|
|
|
80
74
|
## 7. Prove it
|
|
81
75
|
|