Skip to content

Rename marketplace / mp identifiers to kb everywhere (data-kb-headless, .kb-*, KB_HEADLESS, knowledge-base.css) — hard cut #77

Description

@oto-macenauer-absa

Part of #73.

Problem

The project was once "docs marketplace". The name is gone from the UI, but it is still the identifier prefix across the whole contract and codebase, and it collides with unrelated AbsaOSS projects:

Where Today
Release asset dist.tar.gz (renamed by #74)
Manifest marketplace.json, bundle.json, field marketplaceVersion (unified by #74)
HTML attribute data-mp-headless="true" on <html>
CSS classes .mp-doc, .mp-single-page, other mp-* in src/styles/marketplace.css, src/templates/shadow-compat.js, the single-page action's template.js
Env var MP_HEADLESS (read via isHeadlessBuild())
Stylesheet src/styles/marketplace.css, "marketplace CSS" alias logic in build-vite.js
Prose "marketplace" throughout contract/*.md, README.md, AGENTS.md, CLAUDE.md, comments, nginx config comments, test names

Roughly 25 source files, plus the contract documents and both actions.

Proposal: hard cut, kb prefix everywhere

Old New
data-mp-headless data-kb-headless
mp-* CSS classes kb-*
MP_HEADLESS KB_HEADLESS
marketplaceVersion kbVersion (owned by #74; listed here for completeness)
src/styles/marketplace.css src/styles/knowledge-base.css
"marketplace" in prose "knowledge base"

No compatibility shim. Nothing is in production, the single-page action is the only producer of single-page HTML, and packaged repos republish through #76, which verifies the new attribute. The knowledge-base build warns on data-mp-headless with a message saying the artifact was produced against the old contract, exactly as it warns on a missing attribute today, so a stale release is diagnosable rather than silently accepted.

--color-kb-* design tokens already use the kb prefix; this brings everything else in line with them.

Scope

  • transform.js, hoist-inline-scripts.js, fetch-apps.js, build-vite.js, Base.astro, [...path].astro, shadow-compat.js: attribute, class and env names
  • src/utils/config.js: isHeadlessBuild() reads KB_HEADLESS; package.json scripts and scripts/build-vite.js export the new name
  • src/styles/knowledge-base.css renamed; the dist/style.css alias logic in build-vite.js keeps working (it identifies the stylesheet by what the landing page loads, not by filename, so this should be a rename only — verify with the existing build-integrity test)
  • actions/publish-single-page-docs/src/template.js emits data-kb-headless and kb-doc
  • Tests: tests/*.spec.js, tests/support/fragment.js, scripts/setup-test-apps.mjs, tests/fragment-server.mjs, fixtures regenerated
  • nginx.conf / nginx.headers.conf comments; Dockerfile comments
  • Contract documents, README.md, AGENTS.md, CLAUDE.md
  • AbsaOSS/knowledge-base-docs-example: theme/main.html sets data-kb-headless, prose updated (goes with its migration in actions/publish-docs: one reusable action that validates, packs and publishes kb-docs.tar.gz for packaged doc sites #76)
  • git grep -i marketplace and git grep -E -- '\bmp[-_]' return nothing outside git history

Sequencing

Touches the same files as #74 / #75. Do it either first, as a pure mechanical rename before the behavioural changes, or last, after they merge — not in parallel.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

refactoringImproving code quality, paying off tech debt, aligning APIs

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions