diff --git a/.github/min.node-version b/.github/min.node-version new file mode 100644 index 0000000000..d5a159609d --- /dev/null +++ b/.github/min.node-version @@ -0,0 +1 @@ +20.10.0 diff --git a/.github/workflows/get-api-diff.yml b/.github/workflows/get-api-diff.yml index 2de73aff09..933404dfa5 100644 --- a/.github/workflows/get-api-diff.yml +++ b/.github/workflows/get-api-diff.yml @@ -17,7 +17,6 @@ jobs: strategy: matrix: - node-version: [22.11.0] api-json-name: [api-base.json, api-head.json] include: - api-json-name: api-base.json @@ -32,10 +31,10 @@ jobs: submodules: true - name: Setup pnpm uses: pnpm/action-setup@v4.1.0 - - name: Use Node.js ${{ matrix.node-version }} + - name: Use Node.js uses: actions/setup-node@v4.4.0 with: - node-version: ${{ matrix.node-version }} + node-version-file: '.node-version' cache: 'pnpm' - run: pnpm i --frozen-lockfile - name: Check pnpm-lock.yaml diff --git a/.github/workflows/on-release-created.yml b/.github/workflows/on-release-created.yml index 13390f3aae..c156de1a8b 100644 --- a/.github/workflows/on-release-created.yml +++ b/.github/workflows/on-release-created.yml @@ -15,22 +15,17 @@ jobs: contents: read id-token: write - strategy: - matrix: - node-version: [22.11.0] - steps: - uses: actions/checkout@v4.2.2 with: submodules: true - name: Setup pnpm uses: pnpm/action-setup@v4.1.0 - - name: Use Node.js ${{ matrix.node-version }} + - name: Use Node.js uses: actions/setup-node@v4.4.0 with: - node-version: ${{ matrix.node-version }} + node-version-file: '.node-version' cache: 'pnpm' - registry-url: 'https://registry.npmjs.org' - name: Publish package run: | pnpm i --frozen-lockfile diff --git a/.github/workflows/storybook.yml b/.github/workflows/storybook.yml index af54a0b32b..b1d95c1b33 100644 --- a/.github/workflows/storybook.yml +++ b/.github/workflows/storybook.yml @@ -38,7 +38,7 @@ jobs: run: git checkout "$(git rev-list --parents -n1 HEAD | cut -d" " -f3)" - name: Setup pnpm uses: pnpm/action-setup@v4.1.0 - - name: Use Node.js 20.x + - name: Use Node.js uses: actions/setup-node@v4.4.0 with: node-version-file: '.node-version' diff --git a/.github/workflows/test-backend.yml b/.github/workflows/test-backend.yml index ba4eb27a58..9d611c9964 100644 --- a/.github/workflows/test-backend.yml +++ b/.github/workflows/test-backend.yml @@ -22,10 +22,11 @@ jobs: unit: name: Unit tests (backend) runs-on: ubuntu-latest - strategy: matrix: - node-version: [22.11.0] + node-version-file: + - .node-version + - .github/min.node-version services: postgres: @@ -61,10 +62,10 @@ jobs: exit 1 fi done - - name: Use Node.js ${{ matrix.node-version }} + - name: Use Node.js uses: actions/setup-node@v4.4.0 with: - node-version: ${{ matrix.node-version }} + node-version-file: ${{ matrix.node-version-file }} cache: 'pnpm' - run: pnpm i --frozen-lockfile - name: Check pnpm-lock.yaml @@ -84,10 +85,11 @@ jobs: e2e: name: E2E tests (backend) runs-on: ubuntu-latest - strategy: matrix: - node-version: [22.11.0] + node-version-file: + - .node-version + - .github/min.node-version services: postgres: @@ -108,10 +110,10 @@ jobs: submodules: true - name: Setup pnpm uses: pnpm/action-setup@v4.1.0 - - name: Use Node.js ${{ matrix.node-version }} + - name: Use Node.js uses: actions/setup-node@v4.4.0 with: - node-version: ${{ matrix.node-version }} + node-version-file: ${{ matrix.node-version-file }} cache: 'pnpm' - run: pnpm i --frozen-lockfile - name: Check pnpm-lock.yaml diff --git a/.github/workflows/test-federation.yml b/.github/workflows/test-federation.yml index c739688dc9..737b543a73 100644 --- a/.github/workflows/test-federation.yml +++ b/.github/workflows/test-federation.yml @@ -21,7 +21,9 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [22.11.0] + node-version-file: + - .node-version + - .github/min.node-version steps: - uses: actions/checkout@v4 with: @@ -43,10 +45,10 @@ jobs: exit 1 fi done - - name: Use Node.js ${{ matrix.node-version }} + - name: Use Node.js uses: actions/setup-node@v4.4.0 with: - node-version: ${{ matrix.node-version }} + node-version-file: ${{ matrix.node-version-file }} cache: 'pnpm' - name: Build Misskey run: | @@ -54,6 +56,7 @@ jobs: pnpm build - name: Setup run: | + echo "NODE_VERSION=$(cat ${{ matrix.node-version-file }})" >> $GITHUB_ENV cd packages/backend/test-federation bash ./setup.sh sudo chmod 644 ./certificates/*.test.key diff --git a/.github/workflows/test-frontend.yml b/.github/workflows/test-frontend.yml index 25d263f102..94e43cf91e 100644 --- a/.github/workflows/test-frontend.yml +++ b/.github/workflows/test-frontend.yml @@ -27,20 +27,16 @@ jobs: name: Unit tests (frontend) runs-on: ubuntu-latest - strategy: - matrix: - node-version: [22.11.0] - steps: - uses: actions/checkout@v4.2.2 with: submodules: true - name: Setup pnpm uses: pnpm/action-setup@v4.1.0 - - name: Use Node.js ${{ matrix.node-version }} + - name: Use Node.js uses: actions/setup-node@v4.4.0 with: - node-version: ${{ matrix.node-version }} + node-version-file: '.node-version' cache: 'pnpm' - run: pnpm i --frozen-lockfile - name: Check pnpm-lock.yaml @@ -64,7 +60,6 @@ jobs: strategy: fail-fast: false matrix: - node-version: [22.11.0] browser: [chrome] services: @@ -92,10 +87,10 @@ jobs: # if: ${{ matrix.browser == 'firefox' }} - name: Setup pnpm uses: pnpm/action-setup@v4.1.0 - - name: Use Node.js ${{ matrix.node-version }} + - name: Use Node.js uses: actions/setup-node@v4.4.0 with: - node-version: ${{ matrix.node-version }} + node-version-file: '.node-version' cache: 'pnpm' - run: pnpm i --frozen-lockfile - name: Copy Configure diff --git a/.github/workflows/test-misskey-js.yml b/.github/workflows/test-misskey-js.yml index 5b3aed9712..f6d16bbd76 100644 --- a/.github/workflows/test-misskey-js.yml +++ b/.github/workflows/test-misskey-js.yml @@ -20,11 +20,6 @@ jobs: runs-on: ubuntu-latest - strategy: - matrix: - node-version: [22.11.0] - # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ - steps: - name: Checkout uses: actions/checkout@v4.2.2 @@ -32,10 +27,10 @@ jobs: - name: Setup pnpm uses: pnpm/action-setup@v4.1.0 - - name: Setup Node.js ${{ matrix.node-version }} + - name: Setup Node.js uses: actions/setup-node@v4.4.0 with: - node-version: ${{ matrix.node-version }} + node-version-file: '.node-version' cache: 'pnpm' - name: Install dependencies diff --git a/.github/workflows/test-production.yml b/.github/workflows/test-production.yml index 70685e908e..751c374608 100644 --- a/.github/workflows/test-production.yml +++ b/.github/workflows/test-production.yml @@ -15,20 +15,16 @@ jobs: name: Production build runs-on: ubuntu-latest - strategy: - matrix: - node-version: [22.11.0] - steps: - uses: actions/checkout@v4.2.2 with: submodules: true - name: Setup pnpm uses: pnpm/action-setup@v4.1.0 - - name: Use Node.js ${{ matrix.node-version }} + - name: Use Node.js uses: actions/setup-node@v4.4.0 with: - node-version: ${{ matrix.node-version }} + node-version-file: '.node-version' cache: 'pnpm' - run: pnpm i --frozen-lockfile - name: Check pnpm-lock.yaml diff --git a/.github/workflows/validate-api-json.yml b/.github/workflows/validate-api-json.yml index 77feb2b373..edff7dbecb 100644 --- a/.github/workflows/validate-api-json.yml +++ b/.github/workflows/validate-api-json.yml @@ -16,20 +16,16 @@ jobs: validate-api-json: runs-on: ubuntu-latest - strategy: - matrix: - node-version: [22.11.0] - steps: - uses: actions/checkout@v4.2.2 with: submodules: true - name: Setup pnpm uses: pnpm/action-setup@v4.1.0 - - name: Use Node.js ${{ matrix.node-version }} + - name: Use Node.js uses: actions/setup-node@v4.4.0 with: - node-version: ${{ matrix.node-version }} + node-version-file: '.node-version' cache: 'pnpm' - name: Install Redocly CLI run: npm i -g @redocly/cli diff --git a/CHANGELOG.md b/CHANGELOG.md index 9aed010214..a1fb4fe48c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - Feat: マウスでもタイムラインを引っ張って更新できるように - アクセシビリティ設定からオフにすることもできます - Enhance: タイムラインのパフォーマンスを向上 +- Fix: 一部のブラウザでアコーディオンメニューのアニメーションが動作しない問題を修正 ### Server - Enhance: 凍結されたユーザのノートが各種タイムラインで表示されないように `#15775` diff --git a/packages/backend/test-federation/README.md b/packages/backend/test-federation/README.md index 967d51f085..4ea88c1b80 100644 --- a/packages/backend/test-federation/README.md +++ b/packages/backend/test-federation/README.md @@ -10,15 +10,15 @@ cd packages/backend/test-federation First, you need to start servers by executing following commands: ```sh bash ./setup.sh -docker compose up --scale tester=0 +NODE_VERSION=22 docker compose up --scale tester=0 ``` Then you can run all tests by a following command: ```sh -docker compose run --no-deps --rm tester +NODE_VERSION=22 docker compose run --no-deps --rm tester ``` For testing a specific file, run a following command: ```sh -docker compose run --no-deps --rm tester -- pnpm -F backend test:fed packages/backend/test-federation/test/user.test.ts +NODE_VERSION=22 docker compose run --no-deps --rm tester -- pnpm -F backend test:fed packages/backend/test-federation/test/user.test.ts ``` diff --git a/packages/backend/test-federation/compose.tpl.yml b/packages/backend/test-federation/compose.tpl.yml index a7e907c3ee..e4483acd7a 100644 --- a/packages/backend/test-federation/compose.tpl.yml +++ b/packages/backend/test-federation/compose.tpl.yml @@ -12,7 +12,7 @@ services: retries: 20 misskey: - image: node:20 + image: node:${NODE_VERSION} env_file: - ./.config/docker.env environment: diff --git a/packages/backend/test-federation/compose.yml b/packages/backend/test-federation/compose.yml index 4df4ced365..6c010e0089 100644 --- a/packages/backend/test-federation/compose.yml +++ b/packages/backend/test-federation/compose.yml @@ -16,7 +16,7 @@ services: " tester: - image: node:20 + image: node:${NODE_VERSION} depends_on: a.test: condition: service_healthy @@ -85,7 +85,7 @@ services: command: pnpm -F backend test:fed daemon: - image: node:20 + image: node:${NODE_VERSION} depends_on: redis.test: condition: service_healthy diff --git a/packages/frontend/src/components/MkFolder.vue b/packages/frontend/src/components/MkFolder.vue index 1236b843f2..e86861c874 100644 --- a/packages/frontend/src/components/MkFolder.vue +++ b/packages/frontend/src/components/MkFolder.vue @@ -31,6 +31,10 @@ SPDX-License-Identifier: AGPL-3.0-only :leaveActiveClass="prefer.s.animation ? $style.transition_toggle_leaveActive : ''" :enterFromClass="prefer.s.animation ? $style.transition_toggle_enterFrom : ''" :leaveToClass="prefer.s.animation ? $style.transition_toggle_leaveTo : ''" + @enter="enter" + @afterEnter="afterEnter" + @leave="leave" + @afterLeave="afterLeave" >
@@ -86,6 +90,42 @@ const bgSame = ref(false); const opened = ref(props.defaultOpen); const openedAtLeastOnce = ref(props.defaultOpen); +//#region interpolate-sizeに対応していないブラウザ向け(TODO: 主要ブラウザが対応したら消す) +function enter(el: Element) { + if (CSS.supports('interpolate-size', 'allow-keywords')) return; + if (!(el instanceof HTMLElement)) return; + + const elementHeight = el.getBoundingClientRect().height; + el.style.height = '0'; + el.offsetHeight; // reflow + el.style.height = `${Math.min(elementHeight, props.maxHeight ?? Infinity)}px`; +} + +function afterEnter(el: Element) { + if (CSS.supports('interpolate-size', 'allow-keywords')) return; + if (!(el instanceof HTMLElement)) return; + + el.style.height = ''; +} + +function leave(el: Element) { + if (CSS.supports('interpolate-size', 'allow-keywords')) return; + if (!(el instanceof HTMLElement)) return; + + const elementHeight = el.getBoundingClientRect().height; + el.style.height = `${elementHeight}px`; + el.offsetHeight; // reflow + el.style.height = '0'; +} + +function afterLeave(el: Element) { + if (CSS.supports('interpolate-size', 'allow-keywords')) return; + if (!(el instanceof HTMLElement)) return; + + el.style.height = ''; +} +//#endregion + function toggle() { if (!opened.value) { openedAtLeastOnce.value = true; @@ -108,17 +148,27 @@ onMounted(() => { .transition_toggle_enterActive, .transition_toggle_leaveActive { overflow-y: hidden; // 子要素のmarginが突き出るため clip を使ってはいけない - transition: opacity 0.3s, height 0.3s !important; + transition: opacity 0.3s, height 0.3s; } + +@supports (interpolate-size: allow-keywords) { + .transition_toggle_enterFrom, + .transition_toggle_leaveTo { + height: 0; + } + + .root { + interpolate-size: allow-keywords; // heightのtransitionを動作させるために必要 + } +} + .transition_toggle_enterFrom, .transition_toggle_leaveTo { opacity: 0; - height: 0; } .root { display: block; - interpolate-size: allow-keywords; // heightのtransitionを動作させるために必要 } .header { diff --git a/packages/frontend/src/components/MkStreamingNotesTimeline.vue b/packages/frontend/src/components/MkStreamingNotesTimeline.vue index 10a6a5380c..41a31a3f5c 100644 --- a/packages/frontend/src/components/MkStreamingNotesTimeline.vue +++ b/packages/frontend/src/components/MkStreamingNotesTimeline.vue @@ -31,7 +31,7 @@ SPDX-License-Identifier: AGPL-3.0-only :leaveActiveClass="$style.transition_x_leaveActive" :enterFromClass="$style.transition_x_enterFrom" :leaveToClass="$style.transition_x_leaveTo" - :moveClass=" $style.transition_x_move" + :moveClass="$style.transition_x_move" tag="div" >