Browse Source

Merge pull request #5382 from nocodb/fix/icon-issues

fix: Rollup column icon missing and number column width issue
pull/5383/head
Raju Udava 2 years ago committed by GitHub
parent
commit
dbcda65231
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      packages/nc-gui/components/smartsheet/Grid.vue
  2. 8
      packages/nc-gui/components/smartsheet/header/VirtualCellIcon.ts
  3. 2
      packages/nc-gui/components/smartsheet/toolbar/ShareView.vue
  4. 19
      packages/nc-gui/components/webhook/Editor.vue
  5. 10
      packages/nc-gui/pages/[projectType]/[projectId]/index.vue
  6. 2
      packages/nc-gui/utils/iconUtils.ts

2
packages/nc-gui/components/smartsheet/Grid.vue

@ -789,7 +789,7 @@ const closeAddColumnDropdown = () => {
:data-testid="`grid-row-${rowIndex}`" :data-testid="`grid-row-${rowIndex}`"
> >
<td key="row-index" class="caption nc-grid-cell pl-5 pr-1" :data-testid="`cell-Id-${rowIndex}`"> <td key="row-index" class="caption nc-grid-cell pl-5 pr-1" :data-testid="`cell-Id-${rowIndex}`">
<div class="items-center flex gap-1 min-w-[55px]"> <div class="items-center flex gap-1 min-w-[60px]">
<div <div
v-if="!readOnly || !isLocked" v-if="!readOnly || !isLocked"
class="nc-row-no text-xs text-gray-500" class="nc-row-no text-xs text-gray-500"

8
packages/nc-gui/components/smartsheet/header/VirtualCellIcon.ts

@ -52,13 +52,13 @@ const renderIcon = (column: ColumnType, relationColumn?: ColumnType) => {
case UITypes.Rollup: case UITypes.Rollup:
switch ((relationColumn?.colOptions as LinkToAnotherRecordType)?.type) { switch ((relationColumn?.colOptions as LinkToAnotherRecordType)?.type) {
case RelationTypes.MANY_TO_MANY: case RelationTypes.MANY_TO_MANY:
return { icon: iconMap, color: 'text-accent' } return { icon: iconMap.rollup, color: 'text-accent' }
case RelationTypes.HAS_MANY: case RelationTypes.HAS_MANY:
return { icon: iconMap, color: 'text-yellow-500' } return { icon: iconMap.rollup, color: 'text-yellow-500' }
case RelationTypes.BELONGS_TO: case RelationTypes.BELONGS_TO:
return { icon: iconMap, color: 'text-sky-500' } return { icon: iconMap.rollup, color: 'text-sky-500' }
} }
return { icon: iconMap, color: 'text-grey' } return { icon: iconMap.rollup, color: 'text-grey' }
case UITypes.Count: case UITypes.Count:
return { icon: CountIcon, color: 'text-grey' } return { icon: CountIcon, color: 'text-grey' }
} }

2
packages/nc-gui/components/smartsheet/toolbar/ShareView.vue

@ -272,7 +272,7 @@ const copyIframeCode = async () => {
> >
<div class="flex-1 h-min text-xs text-gray-500">{{ sharedViewUrl }}</div> <div class="flex-1 h-min text-xs text-gray-500">{{ sharedViewUrl }}</div>
<a v-e="['c:view:share:open-url']" :href="sharedViewUrl" target="_blank"> <a v-e="['c:view:share:open-url']" :href="sharedViewUrl" target="_blank" class="flex items-center !no-underline">
<component :is="iconMap.share" class="text-sm text-gray-500" /> <component :is="iconMap.share" class="text-sm text-gray-500" />
</a> </a>

19
packages/nc-gui/components/webhook/Editor.vue

@ -697,15 +697,16 @@ onMounted(async () => {
<a-row> <a-row>
<a-col :span="24"> <a-col :span="24">
<div class="text-gray-600"> <div class="text-gray-600">
<em>Use context variable <strong>data</strong> to refer the record under consideration</em> <div class="flex items-center=">
<em>Use context variable <strong>data</strong> to refer the record under consideration</em>
<a-tooltip bottom>
<template #title> <a-tooltip bottom>
<span> <strong>data</strong> : Row data <br /> </span> <template #title>
</template> <span> <strong>data</strong> : Row data <br /> </span>
<component :is="iconMap.info" class="ml-2" /> </template>
</a-tooltip> <component :is="iconMap.info" class="ml-2" />
</a-tooltip>
</div>
<div class="mt-3"> <div class="mt-3">
<a href="https://docs.nocodb.com/developer-resources/webhooks/" target="_blank"> <a href="https://docs.nocodb.com/developer-resources/webhooks/" target="_blank">
<!-- Document Reference --> <!-- Document Reference -->

10
packages/nc-gui/pages/[projectType]/[projectId]/index.vue

@ -509,11 +509,7 @@ useEventListener(document, 'keydown', async (e: KeyboardEvent) => {
</a-sub-menu> </a-sub-menu>
</template> </template>
<!-- Language --> <!-- Language -->
<a-sub-menu <a-sub-menu key="language" class="lang-menu !py-0">
key="language"
class="lang-menu !py-0"
popup-class-name="scrollbar-thin-dull min-w-50 max-h-90vh !overflow-auto"
>
<template #title> <template #title>
<div class="nc-project-menu-item group"> <div class="nc-project-menu-item group">
<component :is="iconMap.translate" class="group-hover:text-accent nc-language" /> <component :is="iconMap.translate" class="group-hover:text-accent nc-language" />
@ -529,7 +525,9 @@ useEventListener(document, 'keydown', async (e: KeyboardEvent) => {
<template #expandIcon></template> <template #expandIcon></template>
<LazyGeneralLanguageMenu /> <div class="scrollbar-thin-dull min-w-50 max-h-90vh">
<LazyGeneralLanguageMenu />
</div>
</a-sub-menu> </a-sub-menu>
<!-- Account --> <!-- Account -->

2
packages/nc-gui/utils/iconUtils.ts

@ -177,7 +177,7 @@ import NcIconsRowHeightExtraTall from '~icons/nc-icons/row-height-extra-tall'
} as const */ } as const */
export const iconMap = { export const iconMap = {
info: h('span', { class: 'material-symbols-outlined' }, 'info_outline'), info: h('span', { class: 'material-symbols-outlined' }, 'info'),
loading: h('span', { class: 'material-symbols-outlined' }, 'autorenew'), loading: h('span', { class: 'material-symbols-outlined' }, 'autorenew'),
arrowCollapse: h('span', { class: 'material-symbols-outlined' }, 'keyboard_arrow_up'), arrowCollapse: h('span', { class: 'material-symbols-outlined' }, 'keyboard_arrow_up'),
markerAlert: h('span', { class: 'material-symbols-outlined' }, 'warning'), markerAlert: h('span', { class: 'material-symbols-outlined' }, 'warning'),

Loading…
Cancel
Save