Skip to content

Refactor code structure for improved readability and maintainability #309

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

Merged
merged 1 commit into from
Apr 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
16 changes: 8 additions & 8 deletions .github/actions/build-artifacts/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ inputs:
description: 'A Github PAT'
required: true
runs:
using: "composite"
using: 'composite'
steps:
- uses: ./.github/actions/pnpm-setup

Expand All @@ -15,11 +15,11 @@ runs:

- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: "https://npm.pkg.github.com"
scope: "@public-ui"
node-version: 22
registry-url: 'https://npm.pkg.github.com'
scope: '@public-ui'

- name: Download Docs (2.2)
- name: Download Docs (v2)
env:
NODE_AUTH_TOKEN: ${{ inputs.PERSONAL_ACCESS_TOKEN }}
shell: bash
Expand All @@ -28,9 +28,9 @@ runs:
npm pack @public-ui/docs-v2@latest > /dev/null
tar -xzvf public-ui-docs-*.tgz > /dev/null

rm -rf build/docs/2.2
mkdir -p build/docs/2.2
mv package/build/* build/docs/2.2/
rm -rf build/docs/2.2 build/v2
mkdir -p build/v2
mv package/build/* build/v2/

rm -rf package *.tgz

Expand Down
6 changes: 3 additions & 3 deletions .github/actions/pnpm-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
name: pnpm Setup
description: Install Node and pnpm, install dependencies
runs:
using: "composite"
using: 'composite'
steps:
- uses: pnpm/action-setup@v4
with:
version: 9
version: 10
run_install: false

- uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '22'
cache: 'pnpm'

- run: pnpm install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- uses: ./.github/actions/pnpm-setup

- name: Lint
run: pnpm run lint:hard
run: pnpm run lint

- name: Build
run: pnpm run build
2 changes: 1 addition & 1 deletion .github/workflows/dod-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ concurrency:

jobs:
check-dod:
runs-on: ubuntu-24.04
runs-on: ubuntu-latest
steps:
- name: Print Pull Request ID
run: |
Expand Down
8 changes: 4 additions & 4 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@

const { themes } = require('prism-react-renderer');

const PUBLIC_BASE_URL = 'https://public-ui.github.io/';
const PUBLIC_BASE_URL = 'https://public-ui.github.io';

/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'KoliBri - Public UI',
tagline: 'The accessible Web Component Library',
url: 'https://public-ui.github.io',
url: PUBLIC_BASE_URL,
baseUrl: '/',
onBrokenLinks: 'throw',
trailingSlash: false,
Expand Down Expand Up @@ -97,16 +97,16 @@ const config = {
position: 'left',
dropdownActiveClassDisabled: true,
dropdownItemsAfter: [
{ to: `${PUBLIC_BASE_URL}/v2/`, label: 'Version 2' },
{
type: 'html',
value: '<hr class="dropdown-separator">',
},
{
type: 'html',
className: 'dropdown-archived-versions',
value: '<b>Archive</b>',
value: '<span class="dropdown__link">Version 1</span>',
},
{ to: `${PUBLIC_BASE_URL}docs/2.2/`, label: '2.2' },
],
},
{
Expand Down
3 changes: 3 additions & 0 deletions i18n/de/code.json
Original file line number Diff line number Diff line change
Expand Up @@ -350,5 +350,8 @@
},
"custom.view-component-example": {
"message": "Beispiel der Komponente ansehen"
},
"custom.docs-version-hint": {
"message": "Diese Dokumentation behandelt KoliBri - Public UI {version}. Die aktuellste Dokumentation finden Sie hier: {link}"
}
}
3 changes: 3 additions & 0 deletions i18n/en/code.json
Original file line number Diff line number Diff line change
Expand Up @@ -350,5 +350,8 @@
},
"custom.view-component-example": {
"message": "View the example of the component"
},
"custom.docs-version-hint": {
"message": "This documentation covers KoliBri - Public UI {version}. You can find the latest documentation here: {link}"
}
}
65 changes: 37 additions & 28 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "root",
"private": true,
"name": "@public-ui/docs-v3",
"version": "3.0.0-rc.7",
"scripts": {
"clean": "git clean -f -d -X",
"clean:branches": "git branch --merged | grep -v \\* | xargs git branch -D",
Expand All @@ -15,20 +15,21 @@
"write-translations": "npm run gen:doc && docusaurus write-translations",
"write-heading-ids": "npm run gen:doc && docusaurus write-heading-ids",
"format": "prettier blog docs src -c",
"lint": "eslint src",
"lint:hard": "tsc --noemit && eslint src",
"lint": "tsc --noemit && eslint src",
"ncu:major": "ncu",
"ncu:minor": "ncu -t minor -u",
"ncu:patch": "ncu -t patch -u",
"gen:doc": "node scripts/autogen.doc.js",
":prepack": "npm run build",
"unused": "knip",
"postinstall": "npm-run-all postinstall:*",
"postinstall": "npm-run-all2 postinstall:*",
"postinstall:components-assets": "cpy \"node_modules/@public-ui/components/assets/**/*\" static/assets --dot",
"postinstall:themes-assets": "cpy \"node_modules/@public-ui/theme-default/assets/**/*\" static/assets --dot",
"update": "pnpm ncu:minor && pnpm ncu:major",
"regenerate:version": "rimraf i18n/en/docusaurus-plugin-content-docs/version-2.0 versioned_docs/version-2.0 versioned_readmes/2.0 versioned_sidebars/version-2.0-sidebars.json && npm run docusaurus docs:version 2.0"
"update": "pnpm ncu:minor && pnpm ncu:major"
},
"files": [
"build"
],
"dependencies": {
"@docusaurus/core": "3.7.0",
"@docusaurus/eslint-plugin": "3.7.0",
Expand All @@ -41,46 +42,54 @@
"@leanup/form": "1.3.54",
"@mdx-js/react": "3.1.0",
"@monaco-editor/react": "4.7.0",
"@public-ui/components": "3.0.0-rc.6",
"@public-ui/react": "3.0.0-rc.6",
"@public-ui/theme-default": "3.0.0-rc.6",
"@public-ui/components": "3.0.0-rc.7",
"@public-ui/react": "3.0.0-rc.7",
"@public-ui/theme-default": "3.0.0-rc.7",
"classnames": "2.5.1",
"docusaurus-lunr-search": "3.6.1",
"mermaid": "11.4.1",
"mermaid": "11.6.0",
"prettier": "2.8.8",
"react": "19.0.0",
"react-dom": "19.0.0",
"read-excel-file": "5.8.6"
"react": "19.1.0",
"react-dom": "19.1.0",
"read-excel-file": "5.8.7"
},
"devDependencies": {
"@docsearch/react": "3.9.0",
"@docusaurus/module-type-aliases": "3.7.0",
"@docusaurus/plugin-content-docs": "3.7.0",
"@docusaurus/theme-classic": "3.7.0",
"@docusaurus/theme-common": "3.7.0",
"@docusaurus/types": "3.7.0",
"@eslint/eslintrc": "3.3.0",
"@eslint/js": "9.21.0",
"@docusaurus/utils": "3.7.0",
"@eslint/eslintrc": "3.3.1",
"@eslint/js": "9.25.1",
"@tsconfig/docusaurus": "2.0.3",
"@types/node": "22.15.3",
"@types/prettier": "2.7.3",
"@typescript-eslint/eslint-plugin": "8.25.0",
"@typescript-eslint/parser": "8.25.0",
"adopted-style-sheets": "1.1.7",
"autoprefixer": "10.4.20",
"@types/react": "19.1.2",
"@typescript-eslint/eslint-plugin": "8.31.0",
"@typescript-eslint/parser": "8.31.0",
"adopted-style-sheets": "1.1.8",
"autoprefixer": "10.4.21",
"cpy-cli": "5.0.0",
"depcheck": "1.4.7",
"docusaurus-plugin-sass": "0.2.6",
"eslint": "9.21.0",
"eslint": "9.25.1",
"eslint-plugin-jsx-a11y": "6.10.2",
"eslint-plugin-mdx": "3.1.5",
"eslint-plugin-react": "7.37.4",
"eslint-plugin-mdx": "3.4.1",
"eslint-plugin-react": "7.37.5",
"html-minifier-terser": "7.2.0",
"knip": "5.45.0",
"npm-check-updates": "17.1.15",
"npm-run-all": "4.1.5",
"knip": "5.50.5",
"lunr": "2.3.9",
"npm-check-updates": "18.0.1",
"npm-run-all2": "7.0.2",
"postcss": "8.5.3",
"prism-react-renderer": "2.4.1",
"prop-types": "15.8.1",
"rimraf": "3.0.2",
"sass": "1.85.1",
"sass": "1.87.0",
"tailwindcss": "3.4.17",
"typescript": "5.7.3"
"typescript": "5.8.3"
},
"browserslist": {
"production": [
Expand Down
Loading
Loading