Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Field Layout as different components #524

Merged
merged 3 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@vueuse/core": "^10.3.0",
"@vueuse/integrations": "^10.3.0",
"feather-icons": "^4.28.0",
"frappe-ui": "^0.1.99",
"frappe-ui": "^0.1.103",
"gemoji": "^8.1.0",
"lodash": "^4.17.21",
"mime": "^4.0.1",
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Activities/DataFields.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<script setup>
import EditIcon from '@/components/Icons/EditIcon.vue'
import DataFieldsModal from '@/components/Modals/DataFieldsModal.vue'
import FieldLayout from '@/components/FieldLayout.vue'
import FieldLayout from '@/components/FieldLayout/FieldLayout.vue'
import { Badge, createResource, createDocumentResource } from 'frappe-ui'
import LoadingIndicator from '@/components/Icons/LoadingIndicator.vue'
import { createToast } from '@/utils'
Expand Down
10 changes: 8 additions & 2 deletions frontend/src/components/Controls/Grid.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,13 @@
</div>
<!-- Rows -->
<template v-if="rows?.length">
<Draggable class="w-full" v-model="rows" group="rows" item-key="name">
<Draggable
class="w-full"
v-model="rows"
:delay="isTouchScreenDevice() ? 200 : 0"
group="rows"
item-key="name"
>
<template #item="{ element: row, index }">
<div
class="grid-row flex cursor-pointer items-center border-b border-outline-gray-modals bg-surface-modals last:rounded-b last:border-b-0"
Expand Down Expand Up @@ -252,7 +258,7 @@ import GridRowModal from '@/components/Controls/GridRowModal.vue'
import EditIcon from '@/components/Icons/EditIcon.vue'
import Link from '@/components/Controls/Link.vue'
import UserAvatar from '@/components/UserAvatar.vue'
import { getRandom, getFormat } from '@/utils'
import { getRandom, getFormat, isTouchScreenDevice } from '@/utils'
import { usersStore } from '@/stores/users'
import { getMeta } from '@/stores/meta'
import {
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/components/Controls/GridRowFieldsModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
v-else
:tabs="tabs.data"
:data="{}"
:modal="true"
:preview="true"
/>
</div>
Expand All @@ -49,7 +48,7 @@
</Dialog>
</template>
<script setup>
import FieldLayout from '@/components/FieldLayout.vue'
import FieldLayout from '@/components/FieldLayout/FieldLayout.vue'
import FieldLayoutEditor from '@/components/FieldLayoutEditor.vue'
import { useDebounceFn } from '@vueuse/core'
import { capture } from '@/telemetry'
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Controls/GridRowModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

<script setup>
import EditIcon from '@/components/Icons/EditIcon.vue'
import FieldLayout from '@/components/FieldLayout.vue'
import FieldLayout from '@/components/FieldLayout/FieldLayout.vue'
import { usersStore } from '@/stores/users'
import { createResource } from 'frappe-ui'
import { nextTick } from 'vue'
Expand Down
Loading
Loading