Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
3a39b48
feat: [NRP-2394] : GDPR banner (#10014)
stavros-tomas Nov 12, 2025
3de885e
feat: NRP-2396 : Preferences overview (#10079)
stavros-tomas Nov 18, 2025
2c67d70
feat: [NRP-2397] : Cookies service (#10116)
stavros-tomas Nov 21, 2025
7a80d34
feat: NRP-2429 : GDPR Cookies context (#10156)
stavros-tomas Nov 24, 2025
96f30cf
chore: NRP-2452: rephrase preferences to settings (#10167)
stavros-tomas Nov 24, 2025
61208e0
feat: NRP-2398: Cookie settings button (#10191)
stavros-tomas Dec 1, 2025
204e348
feat: NRP-2443 : Consent versioning (#10289)
stavros-tomas Dec 17, 2025
4608eb8
chore(UI): Run knip. (#10554)
aidanCQ Jan 6, 2026
a287e12
Configure vitest and fix up cookie component paths.
sburton84 Mar 31, 2026
3cdf773
Use "ssr: false" instead of "RenderOnClient"
sburton84 Mar 31, 2026
4ef79a1
Fix remaining failing tests
sburton84 Mar 31, 2026
c3a8831
Use TypeScript v5 consistent with other packages and use ESLint for l…
sburton84 Mar 31, 2026
dfb2fce
Update semantic-release and update Node version used for build since
sburton84 Apr 1, 2026
e352397
feat: attempting to add GDPR cookie prompt to Sphinx template
sburton84 Apr 2, 2026
cc7b125
Merge branch 'main' into gdpr
sburton84 Apr 2, 2026
2101232
Fix styles
sburton84 Apr 2, 2026
22d573a
Fixes to analytics and navbar, move from unmaintained tsup to tsdown
sburton84 Apr 2, 2026
cbedd16
Update paths on CI and ensure analyytics ID is configured
sburton84 Apr 2, 2026
149b328
Make job name more accurate
sburton84 Apr 2, 2026
a0b441a
Fix indentation
sburton84 Apr 2, 2026
20df86c
chore: add some additional hooks for checking formatting
sburton84 Apr 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ on:
- '!main' # excludes main

jobs:
release:
pre_release:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 20
node-version: 22
cache: 'npm'
# Path to the lock file needs to be specified explicitly as it is not in the root of the repository
cache-dependency-path: 'documentation-ui/package-lock.json'
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 20
node-version: 22
cache: 'npm'
# Path to the lock file needs to be specified explicitly as it is not in the root of the repository
cache-dependency-path: 'documentation-ui/package-lock.json'
Expand Down Expand Up @@ -48,13 +48,15 @@ jobs:
python-version: "3.12"
- name: Generate UI Assets
working-directory: sphinx-ui/react
env:
NEXT_PUBLIC_GA_ID: "G-YPQ1FTGDL3"
run: |
echo "🔨 Generating UI assets..."
npm update @quantinuum/documentation-ui
npm install
npm run build
cp ./build/injectNav.global.js ../quantinuum_sphinx/static/injectNav.global.js
cp ./build/syncTheme.global.js ../quantinuum_sphinx/static/syncTheme.global.js
cp ./build/injectNav.iife.js ../quantinuum_sphinx/static/injectNav.iife.js
cp ./build/syncTheme.iife.js ../quantinuum_sphinx/static/syncTheme.iife.js
cp ./node_modules/@quantinuum/quantinuum-ui/dist/tokens.css ../quantinuum_sphinx/static/styles/quantinuum-ui-tokens.css
npx tailwindcss --postcss ./postcss.config.cjs -i ./index.css -o ../quantinuum_sphinx/static/styles/quantinuum-ui-tailwind.css
echo ✅ "Done. Generated UI assets."
Expand Down
28 changes: 28 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,34 @@
default_install_hook_types:
- pre-commit
- commit-msg

repos:
- repo: builtin
hooks:
- id: trailing-whitespace
exclude: '^sphinx-ui/demo/'
- id: end-of-file-fixer
exclude: '^sphinx-ui/demo/'
- id: check-yaml
- id: check-json
exclude: 'tsconfig.*\.json$'

- repo: local
hooks:
- id: no-tabs
name: No tabs in source files
language: pygrep
entry: '\t'
types_or: [ts, tsx, javascript, jsx, python, css]
exclude: '(node_modules|sphinx-ui/demo/build)'

- id: documentation-ui-format
name: Biome format check (documentation-ui)
language: system
entry: bash -c 'cd documentation-ui && npx biome format src stories'
pass_filenames: false
files: '^documentation-ui/(src|stories)/.*\.(ts|tsx|js|jsx|css|json)$'

- id: commitlint
name: commitlint
language: system
Expand Down
54 changes: 54 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# documentation-ui

Monorepo containing the Quantinuum documentation UI component library
(`documentation-ui/`) and the Sphinx theme (`sphinx-ui/`).

## Pre-commit hooks

This repository uses [prek](https://prek.j178.dev/) to enforce formatting and
commit message conventions before each commit. prek is a fast, dependency-free
alternative to `pre-commit`, written in Rust.

### Prerequisites

- **Node.js / npm** — required by the Biome format check and commitlint hooks.

No Python or other runtime is needed to run prek itself.

### Installation

1. Install prek using the standalone installer:

```sh
curl -LsSf https://prek.j178.dev/install.sh | sh
```

Or via pip / pipx if you prefer a Python-managed install:

```sh
pipx install prek
```

2. Install the git hooks into the repository:

```sh
prek install
```

Because the config sets `default_install_hook_types`, this single command
installs both the `pre-commit` and `commit-msg` shims automatically.

### Running hooks manually

To run all hooks against every file (useful after initial setup or to check
the full codebase):

```sh
prek run --all-files
```

To run a single hook by id:

```sh
prek run no-tabs --all-files
```
33 changes: 33 additions & 0 deletions documentation-ui/biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"$schema": "https://biomejs.dev/schemas/2.4.10/schema.json",
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2,
"lineWidth": 100
},
"linter": {
"enabled": false
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"semicolons": "asNeeded",
"trailingCommas": "es5"
}
},
"css": {
"parser": {
"tailwindDirectives": true
}
},
"files": {
"includes": [
"**",
"!dist/**",
"!storybook-static/**",
"!coverage/**",
"!node_modules/**"
]
}
}
45 changes: 45 additions & 0 deletions documentation-ui/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import js from "@eslint/js";
import globals from "globals";
import reactHooks from "eslint-plugin-react-hooks";
import reactRefresh from "eslint-plugin-react-refresh";
import tseslint from "typescript-eslint";

export default tseslint.config(
{
ignores: ["dist", "node_modules", "storybook-static", "coverage"],
},
{
files: ["**/*.{ts,tsx}"],
extends: [js.configs.recommended, ...tseslint.configs.recommended],
languageOptions: {
ecmaVersion: 2022,
sourceType: "module",
globals: {
...globals.browser,
...globals.node,
},
},
plugins: {
"react-hooks": reactHooks,
"react-refresh": reactRefresh,
},
rules: {
...reactHooks.configs.recommended.rules,
"react-refresh/only-export-components": [
"warn",
{ allowConstantExport: true },
],
},
},
{
files: ["**/*.{js,mjs,cjs}"],
extends: [js.configs.recommended],
languageOptions: {
ecmaVersion: 2022,
sourceType: "module",
globals: {
...globals.node,
},
},
}
);
Loading