Skip to content

fix(settings): spell out the Webflow site token steps above its field - #1593

Merged
gkhngyk merged 1 commit into
ansvisor:mainfrom
cihan-gyk:fix/webflow-token-steps
Oct 27, 2026
Merged

gkhngyk merged 1 commit into
ansvisor:mainfrom
cihan-gyk:fix/webflow-token-steps

Conversation

@cihan-gyk

Copy link
Copy Markdown
Collaborator

Summary

Settings › Integrations › Webflow: the site token's steps, spelled out. The token hint was one line under the field. It now lists the four steps in Webflow, in order, above the field they end in. A note under the field says the token is shown once and kept.

The steps (settings.webflow.tokenSteps), as Ansvisor asked for them:

  1. In Webflow, go to Site settings › Apps & Integrations › API access and click Generate API token.
  2. Enter a token name (4–80 characters), e.g. "Ansvisor connector".
  3. Under Permissions, set CMS to Read and write and Sites to Read-only. Leave everything else on No access.
  4. Click Generate token, copy the token and paste it into the field below.

The note under the field (settings.webflow.tokenNote): "Webflow shows the token only once. We store it securely and won't display it again."

In webflow-card.tsx (TokenForm):

  • the steps are an ol labelled "How to get a site token";
  • the field's aria-describedby names both the steps and the note;
  • tokenHint is gone (nothing else read it).

Written by a side session at the user's request, and handed over for the checks, the browser check and this PR.

Related issue

None. A copy fix asked for by Ansvisor, following Send to CMS's Webflow connection (#1331, #1503).

Type of change

  • feat — New feature
  • fix — Bug fix
  • chore — Maintenance / dependencies
  • docs — Documentation only
  • refactor — Code change that neither fixes a bug nor adds a feature
  • test — Adding or updating tests

How to test

  1. cd web && yarn vitest run src/components/settings/webflow-card.test.tsx: the steps are in order, above the field, and the field is described by them and the note.
  2. Settings › Integrations › Webflow, on a server with Webflow set up, for a brand with no site token: the four steps above the field, the note under it.

Checked in the browser at 1024 px, light and dark. This server has no Webflow set up, so the card's read was stubbed in the page as "set up, not connected" to show the token form. There, the four numbered steps sit above the field, with the note under it, and nothing scrolls sideways.

Checklist

  • Branch follows the naming convention (feature/, fix/, chore/, docs/) — see CONTRIBUTING.md
  • Commits follow Conventional Commits
  • yarn lint passes (run from web/)
  • yarn typecheck passes (run from web/)
  • yarn format:check passes (run from web/)
  • Changes are focused — one concern per PR

Also run in web/: yarn format, yarn lint (0 errors), yarn typecheck, yarn test (4,139 tests) and yarn build.

Left as it is, since it wasn't asked for: settings.webflow.errors.missing_scopes still says "Sites: Read", where the steps now use Webflow's own "Read-only". It's the same permission. The Webflow docs in #1507 may want the same wording once both merge.

🤖 Generated with Claude Code

The token hint was one line under the field. It now lists the four steps
in Webflow in order, above the field they end in (Site settings › Apps &
Integrations › API access, a 4–80 character name, CMS Read and write and
Sites Read-only with everything else on No access, Generate token), and
says under the field that Webflow shows the token once and we store it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@gkhngyk gkhngyk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, with a follow-up.

What I checked:

  • Own change. One commit on 5bbd162 (main): TokenForm in webflow-card.tsx, en.json and one test. It merges as is.
    • #1578 and #1580 also edit webflow-card.tsx (the Picker export), and each still merges clean after this one.
    • No open PR reads tokenHint.
  • Keys. settings.webflow.tokenSteps (label, open, name, permissions, copy) and tokenNote are in en.json, and TOKEN_STEPS reads exactly the four steps. tokenHint is gone, and nothing else in web/ or docs/ read it.
  • The steps against the code. The connector only lists sites, lists collections, reads a collection, reads an item, and creates or updates an item (server/src/lib/cms/webflow.js).
    • So Sites read-only plus CMS read and write is all it needs.
    • "Everything else on No access" doesn't break a send or the published check.
    • Webflow's own screens aren't in the repo, so I took the token-name length and the button names as given.
  • Accessibility.
    • The steps are an ol named "How to get a site token", before the field in reading order.
    • The field's aria-describedby names the steps and the note, so a screen reader that tabs straight to the field still hears them.
    • The label still names the field (htmlFor).
    • The text uses the same text-xs text-muted-foreground as the old hint.
  • No secret shown. The field stays type="password" with autocomplete off, and it's cleared after a connect, as before. The steps and the note show no token.
  • Tests. webflow-card.test.tsx passes at the head (17). With main's card and en.json, the new test fails and the other 16 pass. CI's web job doesn't run web tests; its typecheck, lint and format pass.
  • Before the API deploy. Web only, and copy only, so nothing depends on the API. The steps show only where Webflow is set up, to admins and managers with no token, a refused token, or while replacing one.

Follow-up:

  1. One wording for the permissions (web/messages/en.json:8015, and docs/guides/send-to-cms.mdx:15 in #1507).
    • The steps say "CMS to Read and write and Sites to Read-only".
    • The error for a token without those permissions still says "Sites: Read and CMS: Read and write".
    • #1507's docs say "Apps & integrations" and "Sites: Read".
    • Use the steps' words in both, e.g. "The token needs CMS: Read and write and Sites: Read-only. Generate a new one with them." #1507 can repeat the card's four steps.

@gkhngyk
gkhngyk merged commit 65d0437 into ansvisor:main Oct 27, 2026
6 checks passed
gkhngyk pushed a commit that referenced this pull request Oct 28, 2026
…ard's error and the docs (#1669)

Follow-up from #1593. The Webflow card's steps say "set CMS to Read and
write and Sites to Read-only". The error for a token without those
permissions said "Sites: Read and CMS: Read and write", and the Send to
CMS guide (#1507) said "Apps & integrations" and "Sites: Read".

- The error reads "The token needs CMS: Read and write and Sites:
  Read-only. Generate a new one with them."
- The guide's Connect Webflow step repeats the card's four steps, in the
  card's words: Site settings › Apps & Integrations › API access, the
  token name, the permissions, and that Webflow shows the token once.

Co-authored-by: Cihan <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants