Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: migrate to nuxt #3046

Merged
merged 28 commits into from
Mar 25, 2024
Merged

docs: migrate to nuxt #3046

merged 28 commits into from
Mar 25, 2024

Conversation

mattmaribojoc
Copy link
Contributor

Related issue

Closes #

Scope of work

  • uses the new docs theme to build the docs
  • adds custom logic to allow for the code injection from the source code
  • adds links to qwik documentation
  • migrates all of the pages
    • there are some exceptions to this because the "common pages" like theming, customization were merged into one page with the code snippets changing depending on which framework was selected
  • temporarily skip the cypress tests on the docs (talked to @FRSgit) to unblock the upgrade to newer node versions

Screenshots of visual changes

image

Checklist

  • Self code-reviewed
  • Changes documented
  • Semantic HTML
  • SSR-friendly
  • Caching friendly
  • a11y for WCAG 2.0 AA
  • examples created
  • blocks created
  • cypress tests created

Copy link

changeset-bot bot commented Nov 30, 2023

⚠️ No Changeset found

Latest commit: 9ef54eb

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

@Szymon-dziewonski Szymon-dziewonski left a comment

Choose a reason for hiding this comment

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

code looking good, however I couldnt run it locally, got many errors

szymons-mbp-1:components szymondziewonski$ yarn dev:docs
Nuxt 3.6.5 with Nitro 2.6.3                                                                                                             12:51:55 PM
                                                                                                                                        12:51:56 PM
  ➜ Local:    http://localhost:3000/
  ➜ Network:  use --host to expose

ℹ Using default Tailwind CSS file                                                                                     nuxt:tailwindcss 12:51:57 PM

[12:51:57 PM]  ERROR  [unhandledRejection] Cannot find package 'tailwind-config-viewer' imported from /Users/szymondziewonski/Projects/storefront-ui/node_modules/@nuxtjs/tailwindcss/dist/module.mjs

  at __node_internal_captureLargerStackTrace (node:internal/errors:496:5)
  at new NodeError (node:internal/errors:405:5)
  at packageResolve (node:internal/modules/esm/resolve:890:9)
  at moduleResolve (node:internal/modules/esm/resolve:939:20)
  at defaultResolve (node:internal/modules/esm/resolve:1132:11)
  at nextResolve (node:internal/modules/esm/loader:163:28)
  at ESMLoader.resolve (node:internal/modules/esm/loader:835:30)
  at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18)
  at ESMLoader.import (node:internal/modules/esm/loader:524:22)
  at importModuleDynamically (node:internal/modules/esm/translators:110:35)
  at importModuleDynamicallyCallback (node:internal/process/esm_loader:36:14)
  at setupViewer (/Users/szymondziewonski/Projects/storefront-ui/node_modules/@nuxtjs/tailwindcss/dist/module.mjs:186:24)
  at setup (/Users/szymondziewonski/Projects/storefront-ui/node_modules/@nuxtjs/tailwindcss/dist/module.mjs:301:9)
  at async normalizedModule (/Users/szymondziewonski/Projects/storefront-ui/node_modules/@nuxt/kit/dist/index.mjs:2141:17)
  at async installModule (/Users/szymondziewonski/Projects/storefront-ui/node_modules/@nuxt/kit/dist/index.mjs:2439:95)
  at async initNuxt (/Users/szymondziewonski/Projects/storefront-ui/node_modules/nuxt/dist/index.mjs:3238:7)
  at async NuxtDevServer._load (/Users/szymondziewonski/Projects/storefront-ui/node_modules/nuxi/dist/chunks/dev2.mjs:255:5)
  at async NuxtDevServer.load (/Users/szymondziewonski/Projects/storefront-ui/node_modules/nuxi/dist/chunks/dev2.mjs:187:7)
  at async NuxtDevServer.init (/Users/szymondziewonski/Projects/storefront-ui/node_modules/nuxi/dist/chunks/dev2.mjs:182:5)
  at async Object.run (/Users/szymondziewonski/Projects/storefront-ui/node_modules/nuxi/dist/chunks/dev-child.mjs:103:5)
  at async runCommand$1 (/Users/szymondziewonski/Projects/storefront-ui/node_modules/nuxi/dist/shared/nuxi.9d864d83.mjs:1647:7)
  at async runCommand$1 (/Users/szymondziewonski/Projects/storefront-ui/node_modules/nuxi/dist/shared/nuxi.9d864d83.mjs:1638:11)
  at async runMain$1 (/Users/szymondziewonski/Projects/storefront-ui/node_modules/nuxi/dist/shared/nuxi.9d864d83.mjs:1770:7)

                                                                                                                                        12:51:57 PM
SEO Kit v1.3.9 • All-in-one SEO by @harlan_zw                                                                                           12:51:57 PM
  └─ 💖 Like this package? Consider sponsoring me on GitHub https://github.com/sponsors/harlan-zw                                       12:51:57 PM
                                                                                                                                        12:51:57 PM
✔ Nuxt DevTools is enabled v0.8.3 (experimental)                                                                                       12:51:59 PM
ℹ [content-assets] Websocket listening on "ws://localhost:4001/"                                                                       12:51:59 PM

[12:51:59 PM]  WARN  Duplicated imports "useAlgoliaFacetedSearch", the one from "/Users/szymondziewonski/Projects/storefront-ui/node_modules/@nuxtjs/algolia/dist/runtime/composables/useAlgoliaFacetedSearch.d.ts" has been ignored


[12:51:59 PM]  WARN  Duplicated imports "useAlgoliaInitIndex", the one from "/Users/szymondziewonski/Projects/storefront-ui/node_modules/@nuxtjs/algolia/dist/runtime/composables/useAlgoliaInitIndex.d.ts" has been ignored


[12:51:59 PM]  WARN  Duplicated imports "useAlgoliaRecommend", the one from "/Users/szymondziewonski/Projects/storefront-ui/node_modules/@nuxtjs/algolia/dist/runtime/composables/useAlgoliaRecommend.d.ts" has been ignored


[12:51:59 PM]  WARN  Duplicated imports "useAlgoliaRef", the one from "/Users/szymondziewonski/Projects/storefront-ui/node_modules/@nuxtjs/algolia/dist/runtime/composables/useAlgoliaRef.d.ts" has been ignored


[12:51:59 PM]  WARN  Duplicated imports "useAlgoliaSearch", the one from "/Users/szymondziewonski/Projects/storefront-ui/node_modules/@nuxtjs/algolia/dist/runtime/composables/useAlgoliaSearch.d.ts" has been ignored


[12:51:59 PM]  WARN  Duplicated imports "useAsyncAlgoliaSearch", the one from "/Users/szymondziewonski/Projects/storefront-ui/node_modules/@nuxtjs/algolia/dist/runtime/composables/useAsyncAlgoliaSearch.d.ts" has been ignored


 ERROR  Cannot start nuxt:  Cannot find module 'postcss-custom-properties'                                                              12:52:00 PM
Require stack:

Thats probably the same issue with your build, IMHO docs cannot be part of workspace, since yarn v1 hoist all packages so packages clash with preview/nuxt and either docs or preview have no idea which package version pick

@filrak
Copy link
Collaborator

filrak commented Dec 25, 2023

@mattmaribojoc do you think we can finish that and merge to keep consistency in the docs?

@mattmaribojoc mattmaribojoc changed the base branch from v2-develop to v2 March 14, 2024 19:08
@FRSgit FRSgit self-requested a review March 15, 2024 08:56
@mattmaribojoc mattmaribojoc changed the base branch from v2 to v2-develop March 15, 2024 14:12
Copy link
Contributor

@Szymon-dziewonski Szymon-dziewonski left a comment

Choose a reason for hiding this comment

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

Hey, great effort done here!

I have couple of questions:

  • we do not have in docs anymore this tip tag (e.g Badge component in Source tab)
    image
    Is it intentional to remove this info?

  • white mode missing border in showcases
    image

  • is it a thing that source has scrollbar in wierd spot? not at the bottom of container?
    image

  • IMHO showcases are too big currently, documentation pages are twice long in compare to docs on vuepress
    image

In old docs
image

And for example in banners, footer - height of showcases are too small, I think those iframes should be customized and set to desired height :)

apps/docs/components/content/_components/button.md Outdated Show resolved Hide resolved
apps/docs/components/content/_components/chip.md Outdated Show resolved Hide resolved
apps/docs/components/content/_components/input.md Outdated Show resolved Hide resolved
apps/docs/components/content/_components/select.md Outdated Show resolved Hide resolved
apps/docs/components/content/_components/thumbnail.md Outdated Show resolved Hide resolved
@mattmaribojoc
Copy link
Contributor Author

Thanks for the good review @Szymon-dziewonski :)

  • Respect the passed min-height on Showcases:
image - also fixes `Prose` Showcase image - Upstream fix for Code Block Scrollbar image - Add reusable partial content block for creating the callout image - Border on Light Mode Showcases image

@Szymon-dziewonski
Copy link
Contributor

@mattmaribojoc looking great, double checked docs after your fixes, have no issues, huge thanks for this PR 🙇

@mattmaribojoc mattmaribojoc merged commit 0c7947d into v2-develop Mar 25, 2024
16 checks passed
@mattmaribojoc mattmaribojoc deleted the docs/new branch March 25, 2024 16:02
mattmaribojoc added a commit that referenced this pull request Apr 10, 2024
* chore(deps): ⬆️ Update definitelyTyped (#3011)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): ⬆️ Update Yarn to v3.6.4 (#3010)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore: revert last 2 commits (#3013)

* chore(deps): ⬆️ Update definitelyTyped (#3016)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): ⬆️ Update Yarn to v3.6.4 (#3015)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): ⬆️ Update definitelyTyped (#3020)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): ⬆️ Update linters (#3023)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): bump @babel/traverse from 7.21.5 to 7.23.2 (#3019)

Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.21.5 to 7.23.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse)

---
updated-dependencies:
- dependency-name: "@babel/traverse"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump undici from 5.23.0 to 5.26.5 (#3024)

Bumps [undici](https://github.com/nodejs/undici) from 5.23.0 to 5.26.5.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](nodejs/undici@v5.23.0...v5.26.5)

---
updated-dependencies:
- dependency-name: undici
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): ⬆️ Update devDependency postcss to v8.4.31 (#3021)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix: proper inherit attributes (#3028)

* chore(deps): ⬆️ Update definitelyTyped (#3026)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): bump browserify-sign from 4.2.1 to 4.2.2 (#3025)

Bumps [browserify-sign](https://github.com/crypto-browserify/browserify-sign) from 4.2.1 to 4.2.2.
- [Changelog](https://github.com/browserify/browserify-sign/blob/main/CHANGELOG.md)
- [Commits](browserify/browserify-sign@v4.2.1...v4.2.2)

---
updated-dependencies:
- dependency-name: browserify-sign
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): ⬆️ Update devDependency @types/react to v18.2.35 (#3030)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update ai-assistant.md (#3029)

* chore(deps): ⬆️ Update definitelyTyped (#3033)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): ⬆️ Update linters (#3035)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Add QWIK documentation link (#3032)

* chore(docs): add myself to codeowners (#3040)

* chore(docs): add myself to codeowners

* Update CODEOWNERS

* Update CODEOWNERS

* Update CODEOWNERS

* Update CODEOWNERS

* chore: update sonarcloud action (#3041)

* chore(deps): ⬆️ Update definitelyTyped (#3038)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): ⬆️ Update Yarn to v3.7.0 (#3039)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): ⬆️ Update definitelyTyped (#3042)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): ⬆️ Update linters (#3043)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore: add new icons (#3045)

* docs: fix qwik background colors (#3044)

* chore(deps): ⬆️ Update definitelyTyped (#3048)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* ci(ENG-204): add ggshield scan (#3051)

* chore(deps): ⬆️ Update linters (#3055)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* docs: Update ai-assistant.md to have proper copy allowance (#3056)

Co-authored-by: Filip Rakowski <[email protected]>

* chore(deps): ⬆️ Update devDependency eslint to v8.56.0 (#3057)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update sonarsource/sonarcloud-github-action action to v2.1.1 (#3058)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): ⬆️ Update linters to v6.17.0 (#3060)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix: update attributes of new icons (#3066)

* chore: update styling [SMT-125] (#3070)

* chore: change inter display (#3071)

* Revert "chore: change inter display (#3071)" (#3072)

This reverts commit bc1fd6b.

* chore: change inter display into inter for headings (#3073)

* chore: rebrand readme's (#3078)

* docs: migrate to nuxt (#3046)

* docs: new docs initial commit

* docs: update code snippets

* docs: new docs

* docs: update Dropdown

* docs: update theme version

* docs: new docs initial commit

* docs: add qwik link to sidebar

* docs: fix code snippets

* docs: add colored install buttons

* docs: skip unit tests

* chore: prevent docs deps from hoisting

* docs: remove old files

* docs: rebrand (wip)

* docs: update source code links

* fix: add placeholder to SfSelectProps

* fix: tsconfig type error

* fix: workflow file

* chore: update yarn.lock

* docs: refactor list card

* docs: update sf-docs-base

* docs: apply feedback

* docs: give min height to Playground Generate components

* docs: add @nuxt/content dep

* docs: update Dockerfile

* docs: add figma redirect

* chore: update node version for docs deploy (#3084)

* fix: docs deployment base url (#3085)

* docs: update port to use 80 (#3088)

* docs: update port for deployment

* chore: delte docs/default.conf

* docs: update default sidebar scroll behavior (#3090)

* docs: update default sidebar scroll behavior

* fix: apply Banner/Hero changes

* chore: changelog for type fixes (#3091)

* ci: version packages

* chore: upgrade deps

* docs: configure redirects from vuepress site

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jakub Freisler <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Szymon Dziewoński <[email protected]>
Co-authored-by: Filip Rakowski <[email protected]>
Co-authored-by: Mateusz Gostański <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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.

4 participants