Repository navigation
svdoc: pilot shared @nais/ui in documentation search - #925
Merged
Merged
Conversation
Consume published @nais/ui 0.1.0 through the local Modal adapter while preserving doc styles, accessible naming and search behavior. Add SSR and browser coverage for themes, portals, keyboard focus and mobile layouts. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the documentation-search UI pilot.
No open issues 🎉
1 file not reviewed
svdoc/pnpm-lock.yaml: Generated file
What changed in this PR
This PR pilots @nais/ui@0.1.0 in documentation search through the existing Modal adapter, while keeping the site’s root theme, production buttons and styling local.
Changes:
- Configure the public package registry, pin the shared UI dependency and exempt it from the release-age delay.
- Adapt the shared Modal to preserve search accessibility, layout and unmounting, replacing timeout-based focus with Bits UI behavior.
- Add server-rendering and zero-retry browser tests, an isolated component fixture and installation guidance.
| File | Description |
|---|---|
svdoc/tsconfig.json |
Include browser tests and Playwright configuration in type checking. |
svdoc/tests/browser/vite.config.ts |
Configure the isolated fixture server. |
svdoc/tests/browser/search.spec.ts |
Test search behavior, focus, themes and responsive styling. |
svdoc/tests/browser/pilot.ts |
Mount the browser fixture. |
svdoc/tests/browser/Pilot.svelte |
Exercise package buttons, nested themes and modal lifecycle. |
svdoc/tests/browser/pilot.html |
Provide the fixture’s HTML entry point. |
svdoc/src/routes/+layout.svelte |
Expose hydration readiness for browser tests. |
svdoc/src/lib/shadcn/ui/Modal.test.ts |
Test server rendering with the modal open and closed. |
svdoc/src/lib/shadcn/ui/Modal.svelte |
Wrap the package Modal with local accessibility, lifecycle and styling adaptations. |
svdoc/src/lib/SearchModal.svelte |
Remove timeout-based input focus. |
svdoc/src/css/app.css |
Import package tokens and theme styles alongside local styles. |
svdoc/README.md |
Document setup, test coverage and package limitations. |
svdoc/pnpm-workspace.yaml |
Exempt @nais/ui from the release-age delay. |
svdoc/pnpm-lock.yaml |
Lock the shared UI and Playwright dependencies. |
svdoc/playwright.config.ts |
Configure zero-retry tests and app/fixture servers. |
svdoc/package.json |
Add shared UI, Playwright and the browser-test script. |
svdoc/.npmrc |
Map the Nais scope to the public registry. |
svdoc/.gitignore |
Ignore browser-test results and reports. |
Review effort: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Validation
Known limitations / follow-up