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

Add a new @studiocms/ui package #296

Merged
merged 44 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from 35 commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
9c938c0
Initial commit for `@studiocms/ui`
louisescher Sep 21, 2024
0644904
Add new components & UI playground
louisescher Sep 21, 2024
b60850b
Add .editorconfig, update biome.json
louisescher Sep 21, 2024
6d7aa56
Add textboxes & checkboxes, ID gen function & more
louisescher Sep 22, 2024
c2fa726
Linted files & added completed components to readme
louisescher Sep 22, 2024
5b14f5a
Add cards, radio inputs, toggles, toasts, warning color
louisescher Sep 23, 2024
99c5f40
Add modals, new button variant, change CSS vars
louisescher Sep 23, 2024
3e5eb89
Forgot to fucking lint again :skull:
louisescher Sep 23, 2024
3ba8b52
Add a select component, fix various bugs
louisescher Sep 24, 2024
869c364
Add dropdown & user components
louisescher Sep 25, 2024
de6f3a0
Can windows please stop formatting my files in fucked up ways I swear…
louisescher Sep 25, 2024
967961f
Add sidebar, double sidebar, root layout component
louisescher Sep 25, 2024
0cd1cf4
Add right click trigger to dropdowns
louisescher Sep 25, 2024
730ca9b
Update package.json
louisescher Sep 25, 2024
8dfd54a
Merge branch 'main' into main
Adammatthiesen Sep 25, 2024
15cebe4
Update DropdownTests.astro
louisescher Sep 25, 2024
4dfc31b
Lint :skull:
louisescher Sep 25, 2024
c0f228f
Update & dedupe packages
louisescher Sep 25, 2024
5959594
Update package.json
louisescher Sep 25, 2024
d98aabf
update deployment action
Adammatthiesen Sep 25, 2024
676bb59
Update package.json
louisescher Sep 25, 2024
badf1ad
Update package.json
louisescher Sep 25, 2024
54a2b5a
Add changeset
louisescher Sep 25, 2024
9d789a9
Update README.md
louisescher Sep 25, 2024
ee2f0ea
Add is:global to styles to eliminate race condition
louisescher Sep 25, 2024
d76f7e3
Remove experimental directRenderScript
louisescher Sep 25, 2024
4db5360
Fix dropdown options not filling parent element
louisescher Sep 25, 2024
1e78f02
Adjust modal and dropdown paddings
louisescher Sep 25, 2024
b39ec3a
Changes to folder structure & accessibility fixes
louisescher Sep 26, 2024
6541113
Add pseudo-docs to README, option to disable radios
louisescher Sep 26, 2024
06872fc
Change icons for dropdowns to slots
louisescher Sep 26, 2024
fcf8feb
Update README.md
louisescher Sep 26, 2024
0b8394c
Update README.md
louisescher Sep 26, 2024
7b8c925
Update Modal.css
louisescher Sep 27, 2024
cc854eb
Merge branch 'main' of https://github.com/louisescher/studiocms
louisescher Sep 27, 2024
a7cfa75
Merge branch 'main' into main
Adammatthiesen Sep 27, 2024
4dd91ce
Merge branch 'main' into main
Adammatthiesen Sep 28, 2024
336822b
Improve double sidebar helper API
louisescher Sep 28, 2024
24e15e8
Update packages/studiocms_ui/README.md
louisescher Sep 28, 2024
74b1f38
Fix navbar toggle for single sidebar not showing
louisescher Sep 29, 2024
308d332
Remove unused BaseHead component
louisescher Sep 29, 2024
b236051
Revert "Remove unused BaseHead component"
louisescher Sep 29, 2024
6446ed4
Merge branch 'main' into main
Adammatthiesen Sep 30, 2024
bc1f4bf
Merge branch 'main' into main
Adammatthiesen Sep 30, 2024
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
5 changes: 3 additions & 2 deletions .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@
"@studiocms/frontend",
"@studiocms/imagehandler",
"@studiocms/renderers",
"@studiocms/robotstxt"
"@studiocms/robotstxt",
"@studiocms/ui"
]
],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": ["web", "docs", "node-playground"]
"ignore": ["web", "docs", "node-playground", "ui-playground"]
}
2 changes: 2 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
"@studiocms/renderers": "0.1.0-beta.4",
"@studiocms/robotstxt": "0.1.0-beta.4",
"@studiocms/blog": "0.1.0-beta.1",
"@studiocms/ui": "0.1.0-beta.7",
"node-playground": "0.0.1",
"ui-playground": "0.0.1",
"docs": "0.0.1",
"web": "0.0.1"
},
Expand Down
5 changes: 5 additions & 0 deletions .changeset/rotten-dancers-trade.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@studiocms/ui": patch
---

Added a new UI library for the dashboard rework
37 changes: 35 additions & 2 deletions .github/workflows/deployments.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
packages:
- packages/**
- playgrounds/node/**
- playgrounds/ui/**

- name: Docs Deployment (PR Demo)
if: steps.changed-files-pr.outputs.docs_any_changed == 'true'
Expand Down Expand Up @@ -93,6 +94,27 @@ jobs:
repo: context.repo.repo,
body: `New deployment for the Packages/Playground DEMO has been queued and should be available shortly. To view the deployment once it is ready, click [here](https://pr${context.payload.pull_request.number}-demo.studiocms.xyz/)`
})


- name: Ui-Testing Deployment (PR Demo)
if: steps.changed-files-pr.outputs.packages_any_changed == 'true'
uses: distributhor/workflow-webhook@f5a294e144d6ef44cfac4d3d5e20b613bcee0d4b # v3
with:
webhook_type: 'json-extended'
webhook_url: ${{ secrets.STUDIOCMS_DEPLOYMENT_WEBHOOK }}
webhook_secret: ${{ secrets.UI_DEPLOYMENT_SECRET }}

- name: Ui-Testing Deployment Queue Comment
if: steps.changed-files-pr.outputs.packages_any_changed == 'true'
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `New deployment for the Ui-Testing Demo has been queued and should be available shortly. To view the deployment once it is ready, click [here](https://pr${context.payload.pull_request.number}-ui-testing.studiocms.xyz/)`
})

redeploy:
name: Check for Changes on Push to main
Expand All @@ -101,7 +123,9 @@ jobs:
steps:
- name: Checkout Repo
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4

with:
fetch-depth: 0

- name: Get changed files
id: changed-files-push
uses: tj-actions/changed-files@48d8f15b2aaa3d255ca5af3eba4870f807ce6b3c # v45
Expand All @@ -112,6 +136,7 @@ jobs:
packagesanddocs:
- packages/**
- playgrounds/node/**
- playgrounds/ui/**
- www/docs/**

- name: Docs Deployment (Prod | Pkg Typedoc)
Expand All @@ -137,4 +162,12 @@ jobs:
webhook_type: 'json-extended'
webhook_url: ${{ secrets.STUDIOCMS_DEPLOYMENT_WEBHOOK }}
webhook_secret: ${{ secrets.DEMO_DEPLOYMENT_SECRET }}


- name: Ui-Testing Deployment (Prod)
if: steps.changed-files-push.outputs.packagesanddocs_any_changed == 'true'
uses: distributhor/workflow-webhook@f5a294e144d6ef44cfac4d3d5e20b613bcee0d4b # v3
with:
webhook_type: 'json-extended'
webhook_url: ${{ secrets.STUDIOCMS_DEPLOYMENT_WEBHOOK }}
webhook_secret: ${{ secrets.UI_DEPLOYMENT_SECRET }}

2 changes: 2 additions & 0 deletions .moon/workspace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ projects:
studiocms_imagehandler: 'packages/studiocms_imagehandler'
studiocms_renderers: 'packages/studiocms_renderers'
studiocms_robotstxt: 'packages/studiocms_robotstxt'
studiocms_ui: 'packages/studiocms_ui'

# Playgrounds
playground: 'playgrounds/node'
ui-playground: 'playgrounds/ui'
# cloudflare-playground: 'playgrounds/cloudflare' - Removed for now till we start experimenting with Cloudflare again.

# Web Sites & Docs
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
"playground:login": "pnpm --filter node-playground db:login",
"playground:link": "pnpm --filter node-playground db:link",
"playground:push": "pnpm --filter node-playground db:push",
"ui:dev": "pnpm --filter ui-playground dev",
"ui:build": "pnpm --filter ui-playground build",
"ui:preview": "pnpm --filter ui-playground preview",
"build": "pnpm --filter node-playground build",
"lint": "biome check .",
"lint:fix": "biome check --write .",
Expand Down
70 changes: 68 additions & 2 deletions packages/studiocms/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,79 @@
"allowImportingTsExtensions": false,
"emitDeclarationOnly": false,
"paths": {
"node-playground/*": ["../../playgrounds/node/src/*"]
"node-playground/*": ["../../playgrounds/node/src/*"],
"@studiocms/assets": ["../studiocms_assets/src/index.ts"],
"@studiocms/assets/*": ["../studiocms_assets/src/*"],
"@studiocms/auth": ["../studiocms_auth/src/index.ts"],
"@studiocms/auth/*": ["../studiocms_auth/src/*"],
"@studiocms/betaresources": ["../studiocms_betaresources/src/index.ts"],
"@studiocms/betaresources/*": ["../studiocms_betaresources/src/*"],
"@studiocms/blog": ["../studiocms_blog/index.ts"],
"@studiocms/blog/*": ["../studiocms_blog/src/*"],
"@studiocms/core": ["../studiocms_core/src/index.ts"],
"@studiocms/core/*": ["../studiocms_core/src/*"],
"@studiocms/dashboard": ["../studiocms_dashboard/src/index.ts"],
"@studiocms/dashboard/*": ["../studiocms_dashboard/src/*"],
"@studiocms/frontend": ["../studiocms_frontend/src/index.ts"],
"@studiocms/frontend/*": ["../studiocms_frontend/src/*"],
"@studiocms/imagehandler": ["../studiocms_imagehandler/src/index.ts"],
"@studiocms/imagehandler/*": ["../studiocms_imagehandler/src/*"],
"@studiocms/renderers": ["../studiocms_renderers/src/index.ts"],
"@studiocms/renderers/*": ["../studiocms_renderers/src/*"],
"@studiocms/robotstxt": ["../studiocms_robotstxt/src/index.ts"],
"@studiocms/robotstxt/*": ["../studiocms_robotstxt/src/*"]
}
},
"references": [
{
"path": "../../playgrounds/node"
},
{
"path": "../studiocms_assets"
},
{
"path": "../studiocms_auth"
},
{
"path": "../studiocms_betaresources"
},
{
"path": "../studiocms_blog"
},
{
"path": "../studiocms_core"
},
{
"path": "../studiocms_dashboard"
},
{
"path": "../studiocms_frontend"
},
{
"path": "../studiocms_imagehandler"
},
{
"path": "../studiocms_renderers"
},
{
"path": "../studiocms_robotstxt"
}
],
"include": ["./package.json", "../../playgrounds/node/.astro/**/*", "./**/*", "./src/**/*.json"]
"include": [
"./package.json",
"../../playgrounds/node/**/*",
"../../playgrounds/node/.astro/**/*",
"../studiocms_assets/**/*",
"../studiocms_auth/**/*",
"../studiocms_betaresources/**/*",
"../studiocms_blog/**/*",
"../studiocms_core/**/*",
"../studiocms_dashboard/**/*",
"../studiocms_frontend/**/*",
"../studiocms_imagehandler/**/*",
"../studiocms_renderers/**/*",
"../studiocms_robotstxt/**/*",
"./**/*",
"./src/**/*.json"
]
}
8 changes: 7 additions & 1 deletion packages/studiocms_assets/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,11 @@
"path": "../../playgrounds/node"
}
],
"include": ["./package.json", "../../playgrounds/node/.astro/**/*", "./**/*", "./src/**/*.json"]
"include": [
"./package.json",
"../../playgrounds/node/**/*",
"../../playgrounds/node/.astro/**/*",
"./**/*",
"./src/**/*.json"
]
}
30 changes: 27 additions & 3 deletions packages/studiocms_auth/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,43 @@
"extends": "astro/tsconfigs/strictest",
"files": [],
"compilerOptions": {
"outDir": "../../.moon/cache/types/packages/studiocms_renderers",
"outDir": "../../.moon/cache/types/packages/studiocms_auth",
"composite": true,
"noEmit": false,
"allowImportingTsExtensions": false,
"emitDeclarationOnly": false,
"paths": {
"node-playground/*": ["../../playgrounds/node/src/*"]
"node-playground/*": ["../../playgrounds/node/src/*"],
"@studiocms/assets": ["../studiocms_assets/src/index.ts"],
"@studiocms/assets/*": ["../studiocms_assets/src/*"],
"@studiocms/core": ["../studiocms_core/src/index.ts"],
"@studiocms/core/*": ["../studiocms_core/src/*"],
"@studiocms/dashboard": ["../studiocms_dashboard/src/index.ts"],
"@studiocms/dashboard/*": ["../studiocms_dashboard/src/*"]
}
},
"references": [
{
"path": "../../playgrounds/node"
},
{
"path": "../studiocms_assets"
},
{
"path": "../studiocms_core"
},
{
"path": "../studiocms_dashboard"
}
],
"include": ["./package.json", "../../playgrounds/node/.astro/**/*", "./**/*", "./src/**/*.json"]
"include": [
"./package.json",
"../../playgrounds/node/**/*",
"../../playgrounds/node/.astro/**/*",
"../studiocms_assets/**/*",
"../studiocms_core/**/*",
"../studiocms_dashboard/**/*",
"./**/*",
"./src/**/*.json"
]
}
22 changes: 20 additions & 2 deletions packages/studiocms_betaresources/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,31 @@
"allowImportingTsExtensions": false,
"emitDeclarationOnly": false,
"paths": {
"node-playground/*": ["../../playgrounds/node/src/*"]
"node-playground/*": ["../../playgrounds/node/src/*"],
"@studiocms/assets": ["../studiocms_assets/src/index.ts"],
"@studiocms/assets/*": ["../studiocms_assets/src/*"],
"@studiocms/core": ["../studiocms_core/src/index.ts"],
"@studiocms/core/*": ["../studiocms_core/src/*"]
}
},
"references": [
{
"path": "../../playgrounds/node"
},
{
"path": "../studiocms_assets"
},
{
"path": "../studiocms_core"
}
],
"include": ["./package.json", "../../playgrounds/node/.astro/**/*", "./**/*", "./src/**/*.json"]
"include": [
"./package.json",
"../../playgrounds/node/**/*",
"../../playgrounds/node/.astro/**/*",
"../studiocms_assets/**/*",
"../studiocms_core/**/*",
"./**/*",
"./src/**/*.json"
]
}
24 changes: 22 additions & 2 deletions packages/studiocms_blog/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,27 @@
"composite": true,
"noEmit": false,
"emitDeclarationOnly": true,
"allowImportingTsExtensions": false
"allowImportingTsExtensions": false,
"paths": {
"@studiocms/core": ["../studiocms_core/src/index.ts"],
"@studiocms/core/*": ["../studiocms_core/src/*"],
"@studiocms/frontend": ["../studiocms_frontend/src/index.ts"],
"@studiocms/frontend/*": ["../studiocms_frontend/src/*"]
}
},
"include": ["../../playgrounds/node/.astro/**/*", "./**/*", "./**/*.json"]
"include": [
"../../playgrounds/node/.astro/**/*",
"../studiocms_core/**/*",
"../studiocms_frontend/**/*",
"./**/*",
"./**/*.json"
],
"references": [
{
"path": "../studiocms_core"
},
{
"path": "../studiocms_frontend"
}
]
}
16 changes: 14 additions & 2 deletions packages/studiocms_core/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,25 @@
"allowImportingTsExtensions": false,
"emitDeclarationOnly": false,
"paths": {
"node-playground/*": ["../../playgrounds/node/src/*"]
"node-playground/*": ["../../playgrounds/node/src/*"],
"@studiocms/robotstxt": ["../studiocms_robotstxt/src/index.ts"],
"@studiocms/robotstxt/*": ["../studiocms_robotstxt/src/*"]
}
},
"references": [
{
"path": "../../playgrounds/node"
},
{
"path": "../studiocms_robotstxt"
}
],
"include": ["./package.json", "../../playgrounds/node/.astro/**/*", "./**/*", "./src/**/*.json"]
"include": [
"./package.json",
"../../playgrounds/node/**/*",
"../../playgrounds/node/.astro/**/*",
"../studiocms_robotstxt/**/*",
"./**/*",
"./src/**/*.json"
]
}
Loading