Skip to content

feat(docs): add "Create a support ticket" to the page feedback toolbar - #480

Merged
ketanyekale merged 3 commits into
mainfrom
feature/feedback-toolbar-support-ticket
Aug 24, 2026
Merged

feat(docs): add "Create a support ticket" to the page feedback toolbar#480
ketanyekale merged 3 commits into
mainfrom
feature/feedback-toolbar-support-ticket

Conversation

@ketanyekale

@ketanyekale ketanyekale commented Aug 22, 2026

Copy link
Copy Markdown
Member

Description

Adds a third option — Create a support ticket — to the page feedback toolbar, next to Mintlify's built-in "Suggest edits" and "Raise issue". It links to the Help Center request form at help.cometchat.com/hc/en-us/requests/new.

Both built-in buttons are hard-wired to this GitHub repo. A reader who spots a typo is asked to fork the repository to propose a change, which means a GitHub account and a PR flow for a one-line fix. Readers without a GitHub account currently have no way to report a docs problem at all.

Why this is a script and not config: the feedback toolbar is not configurable. There is no feedback key anywhere in the live docs.json schema (no suggestEdit, raiseIssue, or thumbsRating), and the built-in toggles live in the Mintlify dashboard under Add-ons. There is no option to point "Suggest edits" at a custom URL. So the third option is injected client-side, following the existing assets/*.js pattern (consent.js, version-aligner.js) — Mintlify loads every .js file in the content directory on every page (custom scripts).

Implementation notes:

  • Copies the sibling button's className, so styling and dark mode stay in sync automatically if Mintlify restyles the toolbar
  • Re-injects on client-side navigation (the toolbar is re-rendered on every route change) and is idempotent
  • Falls back to building its own row if "Suggest edits" and "Raise issue" are ever switched off in the dashboard

Related Issue(s)

Raised by Nisha in Slack: the "Suggest edits" flow requires a GitHub login and a repository fork, which is a lot of friction for a quick documentation improvement.

Type of Change

  • Improvement to existing documentation

Checklist

  • I have read the CONTRIBUTING document
  • My branch name follows the naming convention
  • My changes follow the documentation style guide
  • I have checked for spelling and grammar errors
  • All links in my changes are valid and working
  • My changes are accurately described in this pull request

Additional Information

Verified by running the same code against the live docs site:

  • Renders third in the row: ["Suggest edits", "Raise issue", "Create a support ticket"]
  • Computed padding, border radius, border, colour and font size are identical to the sibling buttons
  • Icon renders at 14x14, matching the others
  • After a client-side navigation to another page: still injected, exactly one copy, no duplicates

Two open questions for reviewers:

  1. No page context reaches the ticket. The Help Center form is a custom theme whose inputs carry ids but no name attributes, so Zendesk's ?tf_subject= / ?tf_description= prefill has no effect. Support will receive a docs ticket with no indication of which page it is about, unless the reader pastes the URL. Worth asking the Help Center owners for a prefill parameter we can pass.
  2. This is coupled to Mintlify's DOM (.feedback-toolbar and the GitHub anchors). If Mintlify restructures the toolbar the button silently stops appearing. That degrades to today's behaviour rather than breaking a page, but nothing will alert us.

Layout (second and third commits)

Adding a third button pushed the toolbar past the width it had to spare. Mintlify groups it as [question] [[thumbs] [links]], where both inner groups are unbreakable flex items, so the question, the thumbs and the links each landed on a line of their own — and at 375px the link group was 508px wide, giving every docs page a horizontal scrollbar on mobile.

assets/feedback-support-ticket.css drops the thumbs/links wrapper out of the layout with display: contents, so the thumbs sit beside the question. The links keep their own wrapper and gain flex-wrap, so they stay one group that wraps together and wraps internally rather than overflowing the viewport.

The two groups are separated by 36px when they share a line, against 12px within a group. "Yes" and "No" answer "Was this page helpful?" and belong with it; suggesting an edit, raising an issue or opening a ticket are independent of that answer. Production drew the same distinction via justify-between. Below 640px the extra margin is dropped — there the links always wrap to their own line, and the margin only pushed the question off the thumbs' line.

Measured on this branch's preview deploy:

Toolbar width Result
960px One line; gaps 12 / 12 / 36 / 12 / 12
632px (the common case, with the right-hand TOC) Row 1 question + thumbs, row 2 the three links as a group
375px viewport No horizontal overflow (was 528px scroll width)

Note: this relies on CSS :has(), which is baseline across current browsers. Where it is unsupported the toolbar falls back to the stacked layout — nothing breaks.

🤖 Generated with Claude Code

@mintlify

mintlify Bot commented Aug 22, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
cometchat 🟢 Ready View Preview Aug 22, 2026, 3:55 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

Mintlify's page feedback toolbar only offers "Suggest edits" and "Raise
issue", both hard-wired to the GitHub repo. Readers without a GitHub
account (or unwilling to fork the repo to propose a one-line change) have
no way to report a docs problem.

Add a third option that links to the Help Center request form. The
toolbar is not configurable — docs.json has no feedback settings and the
built-in toggles live in the Mintlify dashboard — so the link is injected
client-side, following the existing assets/*.js pattern. It inherits the
sibling buttons' classes so styling and dark mode stay in sync, and
re-injects on client-side navigation.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…al scroll

Mintlify groups the feedback toolbar as [question] [[thumbs] [links]],
where each inner group is an unbreakable flex item. Adding a third link
pushed that group past the available width, so the question, the thumbs
and the links each ended up on a line of their own — and at 375px the
link group was 508px wide, overflowing the viewport and giving every
docs page a horizontal scrollbar on mobile.

Drop the two wrapper divs out of the layout with `display: contents` so
each button wraps individually. The thumbs keep their own wrapper and
stay beside "Was this page helpful?"; the links wrap only when they run
out of room.

Measured on the branch preview: 375px goes from 528px of horizontal
overflow to none, and 820px/1440px go from three lines to two with the
thumbs back beside the question.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The previous rule gave all five buttons the same 12px gap, which read as
one undifferentiated row. "Yes" and "No" answer "Was this page helpful?"
and belong with the question; suggesting an edit, raising an issue or
opening a ticket are independent of that answer, and production's
justify-between layout separated them.

Keep the links as one group (so they wrap together instead of trailing
after the thumbs one at a time) and put 36px between the two groups when
they share a line. The group wraps internally rather than overflowing, so
the mobile horizontal scrollbar stays fixed. Below 640px the margin is
dropped — there the links always wrap to their own line, and the extra
24px only pushed the question off the thumbs' line.

Measured on the branch preview:
- 960px toolbar: one line, gaps 12 / 12 / 36 / 12 / 12
- 664px toolbar: question + thumbs, then the three links as a group
- 375px viewport: no horizontal overflow

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@ketanyekale
ketanyekale merged commit a30d69d into main Aug 24, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants