diff --git a/.github/workflows/ci-cd-v2.yml b/.github/workflows/ci-cd-v2.yml index fd2057c6ce..f83952a497 100644 --- a/.github/workflows/ci-cd-v2.yml +++ b/.github/workflows/ci-cd-v2.yml @@ -635,4 +635,93 @@ jobs: # name: cypress-pg-restMisc-run-cache-snapshots # path: scripts/cypress-v2/screenshots # retention-days: 2 -# \ No newline at end of file +# + cy-quick-sqlite: + runs-on: ubuntu-20.04 + steps: + - name: Setup Node + uses: actions/setup-node@v1 + with: + node-version: 16.15.0 + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Cache node modules + uses: actions/cache@v2 + env: + cache-name: cache-node-modules + + with: + # npm cache files are stored in `~/.npm` on Linux/macOS + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + - name: Set env + run: echo "NODE_ENV=test" >> $GITHUB_ENV + - name: Cypress run + uses: cypress-io/github-action@v2 + with: + start: | + cp ./scripts/cypress-v2/fixtures/quickTest/noco_0_91_7.db ./packages/nocodb/noco.db + npm run start:api:cache + npm run start:web-v2 + docker-compose -f ./scripts/docker-compose-cypress.yml up -d + spec: "./scripts/cypress-v2/integration/test/quickTest.js" + wait-on: "http://localhost:8080" + wait-on-timeout: 1200 + config-file: scripts/cypress-v2/cypress.json + - name: Upload screenshots + if: always() + uses: actions/upload-artifact@v2 + with: + name: cy-quick-sqlite-snapshots + path: scripts/cypress-v2/screenshots + retention-days: 2 + cy-quick-pg: + runs-on: ubuntu-20.04 + steps: + - name: Setup Node + uses: actions/setup-node@v1 + with: + node-version: 16.15.0 + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Cache node modules + uses: actions/cache@v2 + env: + cache-name: cache-node-modules + + with: + # npm cache files are stored in `~/.npm` on Linux/macOS + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + - name: Set env + run: echo "NODE_ENV=test" >> $GITHUB_ENV + - name: Cypress run + uses: cypress-io/github-action@v2 + with: + start: | + docker-compose -f ./scripts/cypress-v2/docker-compose-pg-cy-quick.yml up -d + npm run start:api:cache:pg:cyquick + npm run start:web-v2 + spec: "./scripts/cypress-v2/integration/test/quickTest.js" + wait-on: "http://localhost:8080" + wait-on-timeout: 1200 + config-file: scripts/cypress-v2/cypress.json + - name: Upload screenshots + if: always() + uses: actions/upload-artifact@v2 + with: + name: cy-quick-pg-snapshots + path: scripts/cypress-v2/screenshots + retention-days: 2 diff --git a/packages/nc-gui-v2/assets/style.scss b/packages/nc-gui-v2/assets/style.scss index d986d865ea..5453806ba9 100644 --- a/packages/nc-gui-v2/assets/style.scss +++ b/packages/nc-gui-v2/assets/style.scss @@ -214,10 +214,6 @@ a { @apply !p-0 !rounded; } -.ant-dropdown-menu-submenu-popup { - @apply scrollbar-thin-dull min-w-50 max-h-90vh overflow-auto !shadow !rounded; -} - .ant-tabs-dropdown-menu-title-content { @apply flex items-center; } diff --git a/packages/nc-gui-v2/components.d.ts b/packages/nc-gui-v2/components.d.ts index 79e596ccda..fd29c2fe5a 100644 --- a/packages/nc-gui-v2/components.d.ts +++ b/packages/nc-gui-v2/components.d.ts @@ -170,6 +170,7 @@ declare module '@vue/runtime-core' { MdiInformation: typeof import('~icons/mdi/information')['default'] MdiJson: typeof import('~icons/mdi/json')['default'] MdiKeyboardReturn: typeof import('~icons/mdi/keyboard-return')['default'] + MdiKeyChange: typeof import('~icons/mdi/key-change')['default'] MdiKeyPlus: typeof import('~icons/mdi/key-plus')['default'] MdiKeyStar: typeof import('~icons/mdi/key-star')['default'] MdiLink: typeof import('~icons/mdi/link')['default'] @@ -186,6 +187,7 @@ declare module '@vue/runtime-core' { MdiMinusCircleOutline: typeof import('~icons/mdi/minus-circle-outline')['default'] MdiMoonFull: typeof import('~icons/mdi/moon-full')['default'] MdiNotebookCheckOutline: typeof import('~icons/mdi/notebook-check-outline')['default'] + MdiNull: typeof import('~icons/mdi/null')['default'] MdiNumeric: typeof import('~icons/mdi/numeric')['default'] MdiOpenInNew: typeof import('~icons/mdi/open-in-new')['default'] MdiPencil: typeof import('~icons/mdi/pencil')['default'] diff --git a/packages/nc-gui-v2/components/general/ColorPicker.vue b/packages/nc-gui-v2/components/general/ColorPicker.vue index 5306830b8f..504e5c02d6 100644 --- a/packages/nc-gui-v2/components/general/ColorPicker.vue +++ b/packages/nc-gui-v2/components/general/ColorPicker.vue @@ -23,22 +23,22 @@ const emit = defineEmits(['update:modelValue']) const vModel = computed({ get: () => props.modelValue, set: (val) => { - emit('update:modelValue', val.hex ? val.hex : val || null) + emit('update:modelValue', val.hex8 ? val.hex8 : val || null) }, }) const picked = ref>(props.modelValue || enumColor.light[0]) const selectColor = (color: string | Record) => { - picked.value = typeof color === 'string' ? color : color.hex ? color.hex : color - vModel.value = typeof color === 'string' ? color : color.hex ? color.hex : color + picked.value = typeof color === 'string' ? color : color.hex8 ? color.hex8 : color + vModel.value = typeof color === 'string' ? color : color.hex8 ? color.hex8 : color } const compare = (colorA: string, colorB: string) => colorA.toLowerCase() === colorB.toLowerCase() watch(picked, (n, _o) => { if (!props.pickButton) { - vModel.value = typeof n === 'string' ? n : n.hex ? n.hex : n + vModel.value = typeof n === 'string' ? n : n.hex8 ? n.hex8 : n } }) @@ -50,11 +50,11 @@ watch(picked, (n, _o) => { v-for="(color, i) of colors.slice((colId - 1) * rowSize, colId * rowSize)" :key="`color-${colId}-${i}`" class="color-selector" - :class="compare(picked, color) ? 'selected' : ''" + :class="compare(typeof picked === 'string' ? picked : picked.hex8, color) ? 'selected' : ''" :style="{ 'background-color': `${color}` }" @click="selectColor(color)" > - {{ compare(picked, color) ? '✓' : '' }} + {{ compare(typeof picked === 'string' ? picked : picked.hex8, color) ? '✓' : '' }} diff --git a/packages/nc-gui-v2/components/smartsheet/Grid.vue b/packages/nc-gui-v2/components/smartsheet/Grid.vue index 9b17581440..16f7d75cc7 100644 --- a/packages/nc-gui-v2/components/smartsheet/Grid.vue +++ b/packages/nc-gui-v2/components/smartsheet/Grid.vue @@ -79,6 +79,7 @@ const expandedFormRowState = ref>() const visibleColLength = $computed(() => fields.value?.length) const { + isLoading, loadData, paginationData, formattedData: data, @@ -311,7 +312,10 @@ const onNavigate = (dir: NavigateDir) => { diff --git a/packages/nc-gui-v2/pages/[projectType]/[projectId]/index/index.vue b/packages/nc-gui-v2/pages/[projectType]/[projectId]/index/index.vue index 8471d52a37..1ed6f56e88 100644 --- a/packages/nc-gui-v2/pages/[projectType]/[projectId]/index/index.vue +++ b/packages/nc-gui-v2/pages/[projectType]/[projectId]/index/index.vue @@ -92,6 +92,7 @@ function onEdit(targetKey: number, action: 'add' | 'remove' | string) { .ant-tabs-nav-add { @apply !hidden; } + .ant-tabs-nav-more { @apply text-white; } diff --git a/packages/nc-gui-v2/pages/[projectType]/[projectId]/index/index/[type]/[title]/[[viewTitle]].vue b/packages/nc-gui-v2/pages/[projectType]/[projectId]/index/index/[type]/[title]/[[viewTitle]].vue index ec671406ea..8aac5c92b7 100644 --- a/packages/nc-gui-v2/pages/[projectType]/[projectId]/index/index/[type]/[title]/[[viewTitle]].vue +++ b/packages/nc-gui-v2/pages/[projectType]/[projectId]/index/index/[type]/[title]/[[viewTitle]].vue @@ -1,11 +1,18 @@ - diff --git a/packages/nc-gui-v2/pages/index/index/[id].vue b/packages/nc-gui-v2/pages/index/index/[id].vue index b7c92a649c..9e0857d8f0 100644 --- a/packages/nc-gui-v2/pages/index/index/[id].vue +++ b/packages/nc-gui-v2/pages/index/index/[id].vue @@ -1,7 +1,8 @@ - diff --git a/packages/nc-gui-v2/pages/index/index/index.vue b/packages/nc-gui-v2/pages/index/index/index.vue index 7b83b7dff8..d16f729e4d 100644 --- a/packages/nc-gui-v2/pages/index/index/index.vue +++ b/packages/nc-gui-v2/pages/index/index/index.vue @@ -158,9 +158,13 @@ await loadProjects() > -