Feedback button
A Feedback button on every page lets signed-in people send a message, a voice note, or both, with a screenshot of what they see. Admins read everything in one inbox.
What it is
The button sits in the bottom right corner. Pressing it opens a panel and takes a screenshot behind it (the panel is not in the picture). The person types what happened or records a voice note, can remove the screenshot, and presses Send.
Sent with it, without asking: the page path (not the full address, which can carry codes) and title, the browser and system, screen and window size, whether the app is installed, and the language. The sender's name, email and phone are added on the server from their record.
The button shows only to signed-in people with an Arc CMS record, and never on admin pages.
Turn it on or off
The feedback button is core and belongs to no switchable feature. It has its own switch: Admin, Feedback, the switch at the top. It is off by default. A change takes effect on each person's next page load, with no deploy.
When it is off, the button is hidden and the security rules refuse new feedback too, so a script cannot keep sending it. The inbox and what was already sent stay.
Set it up
Deploy the functions, Firestore rules, Storage rules and indexes (see Deploy).
Open Admin, Feedback and turn the switch on.
Sign in as a normal user, send a test, and check that it appears in the inbox and rings the admin bell.
Voice notes need https (or localhost). On a plain http address the record button is not shown and people can only type.
Use it
Voice notes
A voice note can be up to 2 minutes; recording stops by itself. The browser asks for the microphone the first time. Where the microphone is blocked, the panel says how to allow it, or to type instead. Where a browser cannot record at all, there is no record button.
| Browser | Records as |
|---|---|
| Safari (Mac, iPhone, iPad), recent Chrome and Edge | MP4, which plays everywhere |
| Firefox, older Chrome | WebM or Ogg |
The screenshot
It is drawn from the page itself, since a browser cannot capture the real screen without asking each time. It shows the visible part of the page, taken a moment after the tap, as a JPEG. Images still loading are left out, and so is any image or font that takes more than 2 seconds. If it cannot be made, the feedback is sent without it.
A game canvas (Phaser, WebGL) comes out blank unless the game keeps its drawing: set preserveDrawingBuffer: true in the renderer settings (in Phaser, render: { preserveDrawingBuffer: true }).
The inbox
Admin, Feedback (/admin/feedback) lists feedback newest first, filtered New, Done or All. Each item shows who sent it and when, the message, the voice note, the screenshot (open it full size), the page and the device. Mark done moves it out of New, Mark as new moves it back, and Delete removes it with its files.
Each new item rings the admin bell (notification type admin_new_feedback), for up to 10 items an hour from one person. Past that the feedback is still saved, without a notification. See Notifications.
Extend it
-
Hide the button on a page, for example during a game, with route data. Any route on the way to the page can say it:
{ path: 'play', loadComponent: ..., data: { feedbackButton: false } }A full-screen page (
data: { fullScreen: true }, see Add pages and routes) hides it too. -
Open the panel from your own button, which works on pages that hide the floating button too:
import { FeedbackService } from '../../app/core/feedback/feedback.service'; inject(FeedbackService).openPanel();FeedbackServiceis insrc/app/core/feedback/feedback.service.ts; the import above is from a file one folder insidesrc/custom/. Checkavailable()first: it is true only when the button is on and the person is signed in with an Arc CMS record. Keep something private out of screenshots: give the element the attribute
data-feedback-ignore.
What it stores
| Where | What |
|---|---|
Feedback/{id} | uid, userDocId, message (up to 5,000 characters), screenshotPath, voicePath, voiceSeconds, page, device, status (new or done), createdAt, and sender (name, email, phone), which only the server adds. |
Storage users/{userDocId}/feedback/{id}/ | screenshot.jpg (JPEG, under 5 MB) and voice.mp4, voice.webm or voice.ogg (audio, under 10 MB), in the sender's own folder, under the install's upload folder if it has one. |
Settings/feedback | { enabled }: the switch. |
Cloud Function: onFeedbackCreated runs on each new Feedback document. It adds sender from the sender's record and notifies the admins. See Cloud Functions.
Deleting an account deletes the person's feedback and its files (see Users and roles).
Who can do what
| Action | Who |
|---|---|
| Send feedback | A signed-in person with an Arc CMS record, while the switch is on. The rules check that it is theirs, new, points only at those two files in their own folder, and describes the page and device with the known fields only. |
| Upload the screenshot and voice note | The sender, into their own folder, as new files only (never over an existing file). |
| Read, mark done, delete feedback | Admins |
| Read the files | The sender and admins |
| Turn the button on or off | Admins. Anyone can read Settings/feedback. |
The inbox links only to pages on this site, and opens or deletes only the item's own files, whatever the stored paths say.
Troubleshooting
| Symptom | Cause and fix |
|---|---|
| No button anywhere | The switch is off, the person is not signed in, or it is an admin page. After turning it on, reload the page. |
| No button for one signed-in person | Their token has no arccms_uid claim, such as another app's user with no Arc CMS record. Signing out and in again refreshes the claim for a person who has a record. |
| No record button | The page is not on https, or the browser cannot record. |
| "Could not send." | The connection dropped, or the switch was turned off after the page loaded. |
| The inbox shows no sender name | It shows "Someone": the onFeedbackCreated function is not deployed, or the sender's record has no name, email or phone. |