Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
20 changes: 18 additions & 2 deletions app/components/Package/TrendsChart.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import type { VueUiXyDatasetItem } from 'vue-data-ui'
import type { VueUiXyConfig, VueUiXyDatasetItem } from 'vue-data-ui'

Check failure on line 2 in app/components/Package/TrendsChart.vue

View workflow job for this annotation

GitHub Actions / 💪 Type check

'VueUiXyConfig' is declared but never used.
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
import { VueUiXy } from 'vue-data-ui/vue-ui-xy'
import { useDebounceFn, useElementSize } from '@vueuse/core'
import { useCssVariables } from '~/composables/useColors'
Expand Down Expand Up @@ -1283,12 +1283,14 @@
fullscreen: false,
table: false,
tooltip: false,
altCopy: false, // TODO: set to true to enable the alt copy feature
},
buttonTitles: {
csv: $t('package.trends.download_file', { fileType: 'CSV' }),
img: $t('package.trends.download_file', { fileType: 'PNG' }),
svg: $t('package.trends.download_file', { fileType: 'SVG' }),
annotator: $t('package.trends.toggle_annotator'),
altCopy: undefined, // TODO: set to proper translation key
},
callbacks: {
img: ({ imageUri }: { imageUri: string }) => {
Expand Down Expand Up @@ -1316,6 +1318,10 @@
loadFile(url, buildExportFilename('svg'))
URL.revokeObjectURL(url)
},
// altCopy: ({ dataset: dst, config: cfg }: { dataset: Array<VueUiXyDatasetItem>; config: VueUiXyConfig}) => {
// // TODO: implement a reusable copy-alt-text-to-clipboard feature based on the dataset & configuration
// console.log({ dst, cfg})
// }
},
},
grid: {
Expand Down Expand Up @@ -1422,6 +1428,9 @@
selectedColor: accent.value,
selectedColorOpacity: 0.06,
frameColor: colors.value.border,
handleWidth: isMobile.value ? 40 : 20, // does not affect the size of the touch area
handleBorderColor: colors.value.fgSubtle,
handleType: 'grab', // 'empty' | 'chevron' | 'arrow' | 'grab'
},
preview: {
fill: transparentizeOklch(accent.value, isDarkMode.value ? 0.95 : 0.92),
Expand Down Expand Up @@ -1722,6 +1731,13 @@
aria-hidden="true"
/>
</template>
<template #optionAltCopy>
<span
class="i-carbon:accessibility-alt w-6 h-6 text-fg-subtle"
style="pointer-events: none"
aria-hidden="true"
/>
</template>
</VueUiXy>
</div>

Expand Down Expand Up @@ -1768,7 +1784,7 @@
@media screen and (min-width: 767px) {
#trends-chart .vue-data-ui-refresh-button {
top: -0.6rem !important;
left: calc(100% + 2rem) !important;
left: calc(100% + 4rem) !important;
}
}

Expand Down
12 changes: 11 additions & 1 deletion app/components/Package/VersionDistribution.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
VueUiXyDatasetBarItem,
VueUiXyDatapointItem,
MinimalCustomFormatParams,
VueUiXyConfig,

Check failure on line 8 in app/components/Package/VersionDistribution.vue

View workflow job for this annotation

GitHub Actions / 💪 Type check

'VueUiXyConfig' is declared but never used.
} from 'vue-data-ui'
import { useElementSize } from '@vueuse/core'
import { useCssVariables } from '~/composables/useColors'
Expand Down Expand Up @@ -132,12 +133,14 @@
fullscreen: false,
table: false,
tooltip: false,
altCopy: false, // TODO: set to true to enable the alt copy feature
},
buttonTitles: {
csv: $t('package.trends.download_file', { fileType: 'CSV' }),
img: $t('package.trends.download_file', { fileType: 'PNG' }),
svg: $t('package.trends.download_file', { fileType: 'SVG' }),
annotator: $t('package.trends.toggle_annotator'),
altCopy: undefined, // TODO: set to proper translation key
},
callbacks: {
img: ({ imageUri }: { imageUri: string }) => {
Expand Down Expand Up @@ -165,6 +168,10 @@
loadFile(url, buildExportFilename('svg'))
URL.revokeObjectURL(url)
},
// altCopy: ({ dataset: dst, config: cfg }: { dataset: Array<VueUiXyDatasetItem>; config: VueUiXyConfig}) => {
// // TODO: implement a reusable copy-alt-text-to-clipboard feature based on the dataset & configuration
// console.log({ dst, cfg})
// }
},
},
grid: {
Expand Down Expand Up @@ -243,6 +250,9 @@
selectedColor: accent.value,
selectedColorOpacity: 0.06,
frameColor: colors.value.border,
handleWidth: isMobile.value ? 40 : 20, // does not affect the size of the touch area
handleBorderColor: colors.value.fgSubtle,
handleType: 'grab', // 'empty' | 'chevron' | 'arrow' | 'grab'
},
preview: {
fill: transparentizeOklch(accent.value, isDarkMode.value ? 0.95 : 0.92),
Expand Down Expand Up @@ -663,7 +673,7 @@
@media screen and (min-width: 767px) {
#version-distribution .vue-data-ui-refresh-button {
top: -0.6rem !important;
left: calc(100% + 2rem) !important;
left: calc(100% + 4rem) !important;
}
}
</style>
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
"vite-plugin-pwa": "1.2.0",
"vite-plus": "0.0.0-833c515fa25cef20905a7f9affb156dfa6f151ab",
"vue": "3.5.27",
"vue-data-ui": "3.14.10"
"vue-data-ui": "3.15.0"
Comment thread
coderabbitai[bot] marked this conversation as resolved.
},
"devDependencies": {
"@e18e/eslint-plugin": "0.1.4",
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading