From 3810c2ab9f7fdf52cc9c816b0b4e47b06c7bc219 Mon Sep 17 00:00:00 2001 From: Kael Date: Sat, 18 Jan 2025 18:11:09 +1100 Subject: [PATCH 1/7] chore(ci): fix nightly build changelog --- .github/actions/nightly-release/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/nightly-release/action.yml b/.github/actions/nightly-release/action.yml index d832f95f9bc..c87ffe456ff 100644 --- a/.github/actions/nightly-release/action.yml +++ b/.github/actions/nightly-release/action.yml @@ -47,7 +47,7 @@ runs: shell: bash - run: pnpm lerna version ${{ steps.get-version.outputs.full-version }} --no-push --no-commit-hooks --force-publish --yes shell: bash - - run: pnpm conventional-changelog -p angular --outfile ./packages/vuetify/CHANGELOG.md -r 2 + - run: pnpm conventional-changelog -p vuetify --outfile ./packages/vuetify/CHANGELOG.md -r 2 shell: bash - run: >- node -e "fs.writeFileSync( From 14be656999d8061c6623cb11ef611fe06e23296e Mon Sep 17 00:00:00 2001 From: Yuchao Date: Sun, 19 Jan 2025 22:34:12 +1100 Subject: [PATCH 2/7] fix(VTreeview): Incorrect isOpen state in the prepend slot when using return-object (#20884) --- .../vuetify/src/composables/nested/nested.ts | 2 +- .../src/labs/VTreeview/VTreeviewChildren.tsx | 2 +- .../src/labs/VTreeview/VTreeviewItem.tsx | 4 +-- .../__tests__/VTreeview.spec.browser.tsx | 33 +++++++++++++++++++ 4 files changed, 37 insertions(+), 4 deletions(-) diff --git a/packages/vuetify/src/composables/nested/nested.ts b/packages/vuetify/src/composables/nested/nested.ts index a97188b1c0f..b3ede9a3b84 100644 --- a/packages/vuetify/src/composables/nested/nested.ts +++ b/packages/vuetify/src/composables/nested/nested.ts @@ -339,7 +339,7 @@ export const useNestedItem = (id: Ref, isGroup: boolean) => { isActivated: computed(() => parent.root.activated.value.has(toRaw(computedId.value))), select: (selected: boolean, e?: Event) => parent.root.select(computedId.value, selected, e), isSelected: computed(() => parent.root.selected.value.get(toRaw(computedId.value)) === 'on'), - isIndeterminate: computed(() => parent.root.selected.value.get(computedId.value) === 'indeterminate'), + isIndeterminate: computed(() => parent.root.selected.value.get(toRaw(computedId.value)) === 'indeterminate'), isLeaf: computed(() => !parent.root.children.value.get(computedId.value)), isGroupActivator: parent.isGroupActivator, } diff --git a/packages/vuetify/src/labs/VTreeview/VTreeviewChildren.tsx b/packages/vuetify/src/labs/VTreeview/VTreeviewChildren.tsx index 89a88fdfc7c..d4a6694f837 100644 --- a/packages/vuetify/src/labs/VTreeview/VTreeviewChildren.tsx +++ b/packages/vuetify/src/labs/VTreeview/VTreeviewChildren.tsx @@ -143,7 +143,7 @@ export const VTreeviewChildren = genericComponent diff --git a/packages/vuetify/src/labs/VTreeview/VTreeviewItem.tsx b/packages/vuetify/src/labs/VTreeview/VTreeviewItem.tsx index b6968afa059..95732952a7f 100644 --- a/packages/vuetify/src/labs/VTreeview/VTreeviewItem.tsx +++ b/packages/vuetify/src/labs/VTreeview/VTreeviewItem.tsx @@ -12,7 +12,7 @@ import { IconValue } from '@/composables/icons' import { useLink } from '@/composables/router' // Utilities -import { computed, inject, ref } from 'vue' +import { computed, inject, ref, toRaw } from 'vue' import { EventProp, genericComponent, omit, propsFactory, useRender } from '@/util' // Types @@ -68,7 +68,7 @@ export const VTreeviewItem = genericComponent()({ 'v-treeview-item', { 'v-treeview-item--activatable-group-activator': isActivatableGroupActivator.value, - 'v-treeview-item--filtered': visibleIds.value && !visibleIds.value.has(vListItemRef.value?.id), + 'v-treeview-item--filtered': visibleIds.value && !visibleIds.value.has(toRaw(vListItemRef.value?.id)), }, props.class, ]} diff --git a/packages/vuetify/src/labs/VTreeview/__tests__/VTreeview.spec.browser.tsx b/packages/vuetify/src/labs/VTreeview/__tests__/VTreeview.spec.browser.tsx index ec74dfca194..d2bee933f52 100644 --- a/packages/vuetify/src/labs/VTreeview/__tests__/VTreeview.spec.browser.tsx +++ b/packages/vuetify/src/labs/VTreeview/__tests__/VTreeview.spec.browser.tsx @@ -672,4 +672,37 @@ describe.each([ expect(el).toBeVisible() }) }) + + // https://github.com/vuetifyjs/vuetify/issues/20830 + it('should return correct isOpen state in prepend slot', async () => { + render(() => ( + + {{ + prepend: ({ isOpen }) => ({ `${isOpen}` }), + }} + + )) + + await userEvent.click(screen.getByText(/Vuetify Human Resources/)) + const itemsPrepend = screen.getAllByCSS('.v-treeview-item .v-list-item__prepend .prepend-is-open') + expect(itemsPrepend[0]).toHaveTextContent(/^true$/) + expect(itemsPrepend[1]).toHaveTextContent(/^false$/) + + await userEvent.click(screen.getByText(/Core team/)) + expect(itemsPrepend[0]).toHaveTextContent(/^true$/) + expect(itemsPrepend[1]).toHaveTextContent(/^true$/) + + await userEvent.click(screen.getByText(/Core team/)) + expect(itemsPrepend[0]).toHaveTextContent(/^true$/) + expect(itemsPrepend[1]).toHaveTextContent(/^false$/) + + await userEvent.click(screen.getByText(/Vuetify Human Resources/)) + expect(itemsPrepend[0]).toHaveTextContent(/^false$/) + expect(itemsPrepend[1]).toHaveTextContent(/^false$/) + }) }) From dc88c08bc630e0cdd5cd7eb4f77d51355b1e51cb Mon Sep 17 00:00:00 2001 From: Kael Date: Mon, 20 Jan 2025 17:31:30 +1100 Subject: [PATCH 3/7] chore(ci): specify triage action staleLabel --- .github/workflows/triage.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/triage.yml b/.github/workflows/triage.yml index 96e89a8e845..def257ccd39 100644 --- a/.github/workflows/triage.yml +++ b/.github/workflows/triage.yml @@ -12,6 +12,7 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} triageLabel: 'S: triage' + staleLabel: 'S: stale' sponsorsFile: '.github/sponsors.yml' duplicateLabel: 'duplicate' triagedLabels: |- From 37fb393aa3b49a2504b0256f1958d8523bfd903b Mon Sep 17 00:00:00 2001 From: Kael Date: Mon, 20 Jan 2025 21:01:14 +1100 Subject: [PATCH 4/7] chore(release): publish v3.7.7 --- lerna.json | 2 +- packages/api-generator/package.json | 2 +- packages/docs/package.json | 2 +- packages/vuetify/package.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lerna.json b/lerna.json index a56d17b2aa6..ac46469ea9b 100644 --- a/lerna.json +++ b/lerna.json @@ -13,5 +13,5 @@ } }, "npmClient": "pnpm", - "version": "3.7.6" + "version": "3.7.7" } \ No newline at end of file diff --git a/packages/api-generator/package.json b/packages/api-generator/package.json index 435323a47c4..6c70aac4684 100755 --- a/packages/api-generator/package.json +++ b/packages/api-generator/package.json @@ -1,6 +1,6 @@ { "name": "@vuetify/api-generator", - "version": "3.7.6", + "version": "3.7.7", "private": true, "description": "", "scripts": { diff --git a/packages/docs/package.json b/packages/docs/package.json index e9057270748..55193804367 100644 --- a/packages/docs/package.json +++ b/packages/docs/package.json @@ -3,7 +3,7 @@ "description": "A Vue.js project", "private": true, "author": "John Leider ", - "version": "3.7.6", + "version": "3.7.7", "repository": { "type": "git", "url": "git+https://github.com/vuetifyjs/vuetify.git", diff --git a/packages/vuetify/package.json b/packages/vuetify/package.json index 2992728a82a..3ae826187c5 100755 --- a/packages/vuetify/package.json +++ b/packages/vuetify/package.json @@ -1,7 +1,7 @@ { "name": "vuetify", "description": "Vue Material Component Framework", - "version": "3.7.6", + "version": "3.7.7", "author": { "name": "John Leider", "email": "john@vuetifyjs.com" From 7abcca1bae67660f0bd81e095b8f602cfb5d320f Mon Sep 17 00:00:00 2001 From: Kael Date: Mon, 20 Jan 2025 21:31:35 +1100 Subject: [PATCH 5/7] chore(ci): use ucacher --- .github/workflows/ci.yml | 19 ++++++++++++++----- .ucacherignore | 4 ++++ .ucacherignore.env | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 53 insertions(+), 5 deletions(-) create mode 100644 .ucacherignore create mode 100644 .ucacherignore.env diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 453215c8dd7..b1a041a5b9e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,9 +30,15 @@ jobs: if: needs.pre_job.outputs.should_skip != 'true' runs-on: ubuntu-24.04 steps: + - uses: earthly/setup-ucacher@b99687d79dd75262bfc326b9e5ad3a520385a18b - uses: actions/checkout@v4 - uses: vuetifyjs/setup-action@master - - run: pnpm build vuetify + - run: pnpm build:lib + working-directory: ./packages/vuetify + - run: ucacher pnpm build:dist + working-directory: ./packages/vuetify + - run: ucacher pnpm build:types + working-directory: ./packages/vuetify - uses: actions/upload-artifact@v4 with: name: vuetify-dist @@ -50,13 +56,14 @@ jobs: matrix: scopes: ['--scope vuetify --scope @vuetify/api-generator', '--scope vuetifyjs.com'] steps: + - uses: earthly/setup-ucacher@b99687d79dd75262bfc326b9e5ad3a520385a18b - uses: actions/checkout@v4 - uses: actions/download-artifact@v4 with: name: vuetify-dist path: packages/vuetify - uses: vuetifyjs/setup-action@master - - run: pnpm lerna run lint $SCOPES + - run: ucacher pnpm lerna run lint $SCOPES env: SCOPES: ${{ matrix.scopes }} @@ -87,6 +94,7 @@ jobs: runs-on: ubuntu-24.04 if: github.event_name == 'push' && startswith(github.ref, 'refs/tags/v') && github.repository_owner == 'vuetifyjs' steps: + - uses: earthly/setup-ucacher@b99687d79dd75262bfc326b9e5ad3a520385a18b - uses: actions/checkout@v4 with: fetch-depth: 0 @@ -95,7 +103,7 @@ jobs: name: vuetify-dist path: packages/vuetify - uses: vuetifyjs/setup-action@master - - run: pnpm build api + - run: ucacher pnpm build api - run: echo "RELEASE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV - name: NPM Release run: bash scripts/deploy.sh @@ -115,6 +123,7 @@ jobs: if: needs.pre_job.outputs.should_skip != 'true' && github.event_name == 'push' && github.repository_owner == 'vuetifyjs' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/next') runs-on: ubuntu-24.04 steps: + - uses: earthly/setup-ucacher@b99687d79dd75262bfc326b9e5ad3a520385a18b - uses: actions/checkout@v4 - uses: actions/download-artifact@v4 with: @@ -122,8 +131,8 @@ jobs: path: packages/vuetify - uses: vuetifyjs/setup-action@master - uses: ./.github/actions/download-locales - - run: pnpm build api - - run: pnpm build docs + - run: ucacher pnpm build api + - run: ucacher pnpm build docs env: NODE_OPTIONS: --max-old-space-size=4096 VITE_COSMIC_2_BUCKET_SLUG: ${{ secrets.COSMIC_2_BUCKET_SLUG }} diff --git a/.ucacherignore b/.ucacherignore new file mode 100644 index 00000000000..3ef0968d50c --- /dev/null +++ b/.ucacherignore @@ -0,0 +1,4 @@ +.git/**/* +node_modules/**/* +/tmp/**/* +.github/workflows/**/* diff --git a/.ucacherignore.env b/.ucacherignore.env new file mode 100644 index 00000000000..6ce5d51a672 --- /dev/null +++ b/.ucacherignore.env @@ -0,0 +1,35 @@ +GITHUB_TOKEN +ACTIONS_RUNTIME_TOKEN +GITHUB_PATH +GITHUB_OUTPUT +GITHUB_STATE +GITHUB_ENV +GITHUB_ACTION +GITHUB_STEP_SUMMARY +GITHUB_RUN_ATTEMPT +GITHUB_RUN_NUMBER +GITHUB_RUN_ID +GITHUB_STEP_SUMMARY +GITHUB_TRIGGERING_ACTOR +GITHUB_ACTOR_ID +GITHUB_ACTOR +GITHUB_REF_TYPE +GITHUB_SHA +GITHUB_WORKFLOW_REF +GITHUB_WORKFLOW_SHA +GITHUB_EVENT_NAME +GITHUB_HEAD_REF +GITHUB_ACTION_REF +INVOCATION_ID +JOURNAL_STREAM +SYSTEMD_EXEC_PID +RUNNER_NAME +RUNNER_TRACKING_ID +LS_COLORS +XDG_SESSION_ID +SSH_CLIENT +SSH_CONNECTION +STATS_BLT +HOSTNAME +STATS_EXTP +LOG_LEVEL From 28ed40bc4d083ec59dc950a749305f554c1f94bd Mon Sep 17 00:00:00 2001 From: John Leider Date: Mon, 20 Jan 2025 10:13:28 -0600 Subject: [PATCH 6/7] fix(VTreeview): properly indent nodes fixes #20421 --- .../src/labs/VTreeview/VTreeviewItem.sass | 3 ++ .../src/labs/VTreeview/VTreeviewItem.tsx | 46 +++++++++---------- .../src/labs/VTreeview/_variables.scss | 1 + 3 files changed, 27 insertions(+), 23 deletions(-) diff --git a/packages/vuetify/src/labs/VTreeview/VTreeviewItem.sass b/packages/vuetify/src/labs/VTreeview/VTreeviewItem.sass index 568e9233a50..34393acf5d1 100644 --- a/packages/vuetify/src/labs/VTreeview/VTreeviewItem.sass +++ b/packages/vuetify/src/labs/VTreeview/VTreeviewItem.sass @@ -16,3 +16,6 @@ .v-list-group__items .v-list-item padding-inline-start: calc(#{$treeview-item-padding-inline-start} + var(--indent-padding)) !important + + .v-list-group__items .v-list-item.v-list-group__header + padding-inline-start: calc(#{$treeview-group-header-padding-inline-start} + var(--indent-padding)) !important diff --git a/packages/vuetify/src/labs/VTreeview/VTreeviewItem.tsx b/packages/vuetify/src/labs/VTreeview/VTreeviewItem.tsx index 95732952a7f..5374e61d950 100644 --- a/packages/vuetify/src/labs/VTreeview/VTreeviewItem.tsx +++ b/packages/vuetify/src/labs/VTreeview/VTreeviewItem.tsx @@ -80,29 +80,29 @@ export const VTreeviewItem = genericComponent()({ prepend: hasPrepend ? slotProps => { return ( <> - { props.toggleIcon && ( - - - {{ - loader () { - return ( - - ) - }, - }} - - - )} + + { props.toggleIcon && ( + + {{ + loader () { + return ( + + ) + }, + }} + + )} + { slots.prepend?.(slotProps) } diff --git a/packages/vuetify/src/labs/VTreeview/_variables.scss b/packages/vuetify/src/labs/VTreeview/_variables.scss index ce050d3b605..554becdd230 100644 --- a/packages/vuetify/src/labs/VTreeview/_variables.scss +++ b/packages/vuetify/src/labs/VTreeview/_variables.scss @@ -4,3 +4,4 @@ $treeview-group-list-indent-size: 16px !default; $treeview-group-list-prepend-width: 16px !default; $treeview-item-padding-inline-start: 12px !default; $treeview-item-prepend-padding-inline-start: 44px !default; +$treeview-group-header-padding-inline-start: 16px !default; From e9e562545ad45cf6327fb01a488fb43676704f06 Mon Sep 17 00:00:00 2001 From: John Leider Date: Mon, 20 Jan 2025 10:50:37 -0600 Subject: [PATCH 7/7] fix(VTreeview): allow expansion of nodes when disabled fixes #20832 --- packages/vuetify/src/labs/VTreeview/VTreeviewChildren.tsx | 4 +++- packages/vuetify/src/labs/VTreeview/VTreeviewItem.sass | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/vuetify/src/labs/VTreeview/VTreeviewChildren.tsx b/packages/vuetify/src/labs/VTreeview/VTreeviewChildren.tsx index d4a6694f837..442e7cd88f1 100644 --- a/packages/vuetify/src/labs/VTreeview/VTreeviewChildren.tsx +++ b/packages/vuetify/src/labs/VTreeview/VTreeviewChildren.tsx @@ -32,6 +32,7 @@ export type VTreeviewChildrenSlots = { } export const makeVTreeviewChildrenProps = propsFactory({ + disabled: Boolean, loadChildren: Function as PropType<(item: unknown) => Promise>, loadingIcon: { type: String, @@ -67,7 +68,7 @@ export const VTreeviewChildren = genericComponent()) - const isClickOnOpen = computed(() => props.openOnClick != null ? props.openOnClick : props.selectable) + const isClickOnOpen = computed(() => !props.disabled && (props.openOnClick != null ? props.openOnClick : props.selectable)) async function checkChildren (item: InternalListItem) { try { @@ -99,6 +100,7 @@ export const VTreeviewChildren = genericComponent