Skip to content
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
119 changes: 102 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,10 @@ jobs:
id: soft-release
run: pnpx pkg-pr-new publish './packages/*' # TODO disabled only for AI branch--compact

playwright:
name: "Playwright Tests - ${{ matrix.browser }}"
playwright-build:
name: "Playwright Build"
runs-on: ubuntu-latest
timeout-minutes: 60
container:
image: mcr.microsoft.com/playwright:v1.51.1-noble
strategy:
fail-fast: false
matrix:
browser: [chromium, firefox, webkit]
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -95,27 +89,118 @@ jobs:
uses: actions/cache@v4
with:
path: .nx/cache
key: nx-${{ matrix.browser }}-${{ env.NX_BRANCH }}-${{ env.NX_RUN_GROUP }}-${{ github.sha }}
key: nx-playwright-${{ env.NX_BRANCH }}-${{ env.NX_RUN_GROUP }}-${{ github.sha }}
restore-keys: |
nx-${{ matrix.browser }}-${{ env.NX_BRANCH }}-${{ env.NX_RUN_GROUP }}-
nx-${{ matrix.browser }}-${{ env.NX_BRANCH }}-
nx-playwright-${{ env.NX_BRANCH }}-${{ env.NX_RUN_GROUP }}-
nx-playwright-${{ env.NX_BRANCH }}-
nx-

- run: apt-get update && apt-get install -y build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev pkg-config
- run: sudo apt-get update && sudo apt-get install -y build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev pkg-config

- name: Install dependencies
run: pnpm install

- name: Build packages
run: pnpm run build

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: playwright-build
path: |
packages/*/dist
playground/dist
retention-days: 1

playwright:
name: "Playwright Tests - ${{ matrix.browser }} (${{ matrix.shardIndex }}/${{ matrix.shardTotal }})"
runs-on: ubuntu-latest
needs: playwright-build
timeout-minutes: 30
container:
image: mcr.microsoft.com/playwright:v1.51.1-noble
strategy:
fail-fast: false
matrix:
browser: [chromium, firefox, webkit]
shardIndex: [1, 2]
shardTotal: [2]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 100

- name: Install pnpm
uses: pnpm/action-setup@v4

- uses: actions/setup-node@v4
with:
cache: "pnpm"
cache-dependency-path: "**/pnpm-lock.yaml"
node-version-file: ".nvmrc"

- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: playwright-build

- name: Install dependencies
run: pnpm install

- name: Run server and Playwright tests
run: |
HOME=/root PLAYWRIGHT_CONFIG="--project ${{ matrix.browser }}" pnpm run e2e
HOME=/root PLAYWRIGHT_CONFIG="--project ${{ matrix.browser }} --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}" pnpm run e2e

- name: Upload blob report
uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: blob-report-${{ matrix.browser }}-${{ matrix.shardIndex }}
path: tests/blob-report/
retention-days: 1

- name: Upload HTML report
uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report-${{ matrix.browser }}-${{ matrix.shardIndex }}
path: tests/playwright-report/
retention-days: 30

merge-reports:
name: "Merge Playwright Reports"
if: ${{ !cancelled() }}
needs: playwright
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4

- uses: actions/setup-node@v4
with:
cache: "pnpm"
cache-dependency-path: "**/pnpm-lock.yaml"
node-version-file: ".nvmrc"

- name: Install dependencies
run: pnpm install

- name: Download blob reports
uses: actions/download-artifact@v4
with:
path: tests/all-blob-reports
pattern: blob-report-*
merge-multiple: true

- name: Merge reports
run: npx playwright merge-reports --reporter html ./all-blob-reports
working-directory: tests

- uses: actions/upload-artifact@v4
if: always()
- name: Upload merged HTML report
uses: actions/upload-artifact@v4
with:
name: playwright-report-${{ matrix.browser }}
name: playwright-report-merged
path: tests/playwright-report/
retention-days: 30
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ yarn-error.log*
.vercel
test-results/
playwright-report/
blob-report/
release
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
.env
*.pem
Expand Down
5 changes: 2 additions & 3 deletions examples/01-basic/04-default-blocks/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,8 @@ export default function App() {
{
type: "image",
props: {
url: "https://interactive-examples.mdn.mozilla.net/media/cc0-images/grapefruit-slice-332-332.jpg",
caption:
"From https://interactive-examples.mdn.mozilla.net/media/cc0-images/grapefruit-slice-332-332.jpg",
url: "https://placehold.co/332x322.jpg",
caption: "From https://placehold.co/332x322.jpg",
},
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export default function App() {
{
type: "image",
props: {
url: "https://interactive-examples.mdn.mozilla.net/media/cc0-images/grapefruit-slice-332-332.jpg",
url: "https://placehold.co/332x322.jpg",
},
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,16 +226,15 @@ export default function App() {
{
type: "image",
props: {
url: "https://interactive-examples.mdn.mozilla.net/media/cc0-images/grapefruit-slice-332-332.jpg",
caption:
"From https://interactive-examples.mdn.mozilla.net/media/cc0-images/grapefruit-slice-332-332.jpg",
url: "https://placehold.co/332x322.jpg",
caption: "From https://placehold.co/332x322.jpg",
},
},
{
type: "image",
props: {
previewWidth: 200,
url: "https://interactive-examples.mdn.mozilla.net/media/cc0-images/grapefruit-slice-332-332.jpg",
url: "https://placehold.co/332x322.jpg",
textAlignment: "right",
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,16 +220,15 @@ export default function App() {
{
type: "image",
props: {
url: "https://interactive-examples.mdn.mozilla.net/media/cc0-images/grapefruit-slice-332-332.jpg",
caption:
"From https://interactive-examples.mdn.mozilla.net/media/cc0-images/grapefruit-slice-332-332.jpg",
url: "https://placehold.co/332x322.jpg",
caption: "From https://placehold.co/332x322.jpg",
},
},
{
type: "image",
props: {
previewWidth: 200,
url: "https://interactive-examples.mdn.mozilla.net/media/cc0-images/grapefruit-slice-332-332.jpg",
url: "https://placehold.co/332x322.jpg",
textAlignment: "right",
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,16 +220,15 @@ export default function App() {
{
type: "image",
props: {
url: "https://interactive-examples.mdn.mozilla.net/media/cc0-images/grapefruit-slice-332-332.jpg",
caption:
"From https://interactive-examples.mdn.mozilla.net/media/cc0-images/grapefruit-slice-332-332.jpg",
url: "https://placehold.co/332x322.jpg",
caption: "From https://placehold.co/332x322.jpg",
},
},
{
type: "image",
props: {
previewWidth: 200,
url: "https://interactive-examples.mdn.mozilla.net/media/cc0-images/grapefruit-slice-332-332.jpg",
url: "https://placehold.co/332x322.jpg",
textAlignment: "right",
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,16 +216,15 @@ export default function App() {
{
type: "image",
props: {
url: "https://interactive-examples.mdn.mozilla.net/media/cc0-images/grapefruit-slice-332-332.jpg",
caption:
"From https://interactive-examples.mdn.mozilla.net/media/cc0-images/grapefruit-slice-332-332.jpg",
url: "https://placehold.co/332x322.jpg",
caption: "From https://placehold.co/332x322.jpg",
},
},
{
type: "image",
props: {
previewWidth: 200,
url: "https://interactive-examples.mdn.mozilla.net/media/cc0-images/grapefruit-slice-332-332.jpg",
url: "https://placehold.co/332x322.jpg",
textAlignment: "right",
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,8 @@ export default function App() {
{
type: "image",
props: {
url: "https://interactive-examples.mdn.mozilla.net/media/cc0-images/grapefruit-slice-332-332.jpg",
caption:
"From https://interactive-examples.mdn.mozilla.net/media/cc0-images/grapefruit-slice-332-332.jpg",
url: "https://placehold.co/332x322.jpg",
caption: "From https://placehold.co/332x322.jpg",
},
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,8 @@ export default function App() {
{
type: "image",
props: {
url: "https://interactive-examples.mdn.mozilla.net/media/cc0-images/grapefruit-slice-332-332.jpg",
caption:
"From https://interactive-examples.mdn.mozilla.net/media/cc0-images/grapefruit-slice-332-332.jpg",
url: "https://placehold.co/332x322.jpg",
caption: "From https://placehold.co/332x322.jpg",
},
},
{
Expand Down
5 changes: 2 additions & 3 deletions examples/06-custom-schema/react-custom-blocks/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@ const simpleImageBlock = createReactBlockSpec(
type: "simpleImage",
propSchema: {
src: {
default:
"https://www.pulsecarshalton.co.uk/wp-content/uploads/2016/08/jk-placeholder-image.jpg",
default: "https://placehold.co/800x540.png",
},
},
content: "none",
Expand Down Expand Up @@ -142,7 +141,7 @@ export default function App() {
{
type: "simpleImage",
props: {
src: "https://t3.ftcdn.net/jpg/02/48/42/64/360_F_248426448_NVKLywWqArG2ADUxDq6QprtIzsF82dMF.jpg",
src: "https://placehold.co/332x322.jpg",
},
},
{
Expand Down
5 changes: 2 additions & 3 deletions examples/vanilla-js/react-vanilla-custom-blocks/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,7 @@ const simpleImageBlock = createBlockSpec(
type: "simpleImage",
propSchema: {
src: {
default:
"https://www.pulsecarshalton.co.uk/wp-content/uploads/2016/08/jk-placeholder-image.jpg",
default: "https://placehold.co/800x540.png",
},
},
content: "none",
Expand Down Expand Up @@ -201,7 +200,7 @@ export default function App() {
{
type: "simpleImage",
props: {
src: "https://t3.ftcdn.net/jpg/02/48/42/64/360_F_248426448_NVKLywWqArG2ADUxDq6QprtIzsF82dMF.jpg",
src: "https://placehold.co/800x540.png",
},
},
{
Expand Down
7 changes: 3 additions & 4 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
"release": {
"projects": ["packages/*"],
"version": {
"generatorOptions": {
"fallbackCurrentVersionResolver": "disk"
},
"preVersionCommand": "pnpm exec nx run-many -t build",
"conventionalCommits": true
"conventionalCommits": true,
"fallbackCurrentVersionResolver": "disk",
"preserveLocalDependencyProtocols": false
},
"changelog": {
"workspaceChangelog": {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
"name": "root",
"type": "module",
"devDependencies": {
"@nx/js": "^21.6.5",
"@nx/js": "22.5.4",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"concurrently": "9.1.2",
"eslint": "^8.57.1",
"eslint-config-react-app": "^7.0.1",
"eslint-plugin-import": "^2.32.0",
"glob": "^10.5.0",
"nx": "^21.6.5",
"nx": "22.5.4",
"prettier": "^3.6.2",
"prettier-plugin-tailwindcss": "^0.6.14",
"serve": "14.2.4",
Expand Down
1 change: 0 additions & 1 deletion packages/ariakit/src/suggestionMenu/SuggestionMenuItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export const SuggestionMenuItem = forwardRef<
itemRef.current.closest(".bn-suggestion-menu, #ai-suggestion-menu")!,
);


if (overflow !== "none") {
itemRef.current.scrollIntoView({ block: "nearest" });
}
Expand Down
3 changes: 2 additions & 1 deletion packages/ariakit/src/suggestionMenu/SuggestionMenuLoader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ export const SuggestionMenuLoader = forwardRef<
height="1em"
viewBox="0 -960 960 960"
width="1em"
fill="#e8eaed">
fill="#e8eaed"
>
<path d="M480-80q-82 0-155-31.5t-127.5-86Q143-252 111.5-325T80-480q0-83 31.5-155.5t86-127Q252-817 325-848.5T480-880q17 0 28.5 11.5T520-840q0 17-11.5 28.5T480-800q-133 0-226.5 93.5T160-480q0 133 93.5 226.5T480-160q133 0 226.5-93.5T800-480q0-17 11.5-28.5T840-520q17 0 28.5 11.5T880-480q0 82-31.5 155t-86 127.5q-54.5 54.5-127 86T480-80Z" />
</svg>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export const GridSuggestionMenuItem = forwardRef<
itemRef.current.closest(".bn-grid-suggestion-menu")!,
);


if (overflow !== "none") {
itemRef.current.scrollIntoView({ block: "nearest" });
}
Expand Down
2 changes: 0 additions & 2 deletions packages/code-block/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import { defineConfig } from "vite";
import pkg from "./package.json";
// import eslintPlugin from "vite-plugin-eslint";



// https://vitejs.dev/config/
export default defineConfig((conf) => ({
test: {
Expand Down
Loading
Loading