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(pwa): Reduce visual clutter in form header #2112

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
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
45 changes: 29 additions & 16 deletions frontend/src/components/FormView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,34 @@
v-if="id"
class="flex flex-row items-center gap-2 overflow-hidden grow"
>
<h2
class="text-xl font-semibold text-gray-900 whitespace-nowrap overflow-hidden text-ellipsis"
>
{{ doctype }}
</h2>
<Badge
:label="id"
class="whitespace-nowrap text-[8px]"
variant="outline"
/>
<Badge
v-if="status"
:label="status"
:theme="statusColor"
class="whitespace-nowrap text-[8px]"
/>
<div class="flex flex-col items-center overflow-hidden grow">
<Popover>
<template #target="{ togglePopover }">
<div class="flex flex-row gap-2 items-center" @click="togglePopover()">
<h2
class="text-xl font-semibold text-gray-900 whitespace-nowrap overflow-hidden text-ellipsis"
>
{{ doctype }}
</h2>
<Badge
v-if="status"
:label="status"
:theme="statusColor"
class="whitespace-nowrap text-[8px]"
/>
</div>
</template>
<template #body-main>
<div class="flex place-content-center p-2">
<Badge
:label="id"
class="whitespace-nowrap text-[8px]"
variant="outline"
/>
</div>
</template>
</Popover>
</div>

<Dropdown
class="ml-auto"
Expand Down Expand Up @@ -323,6 +335,7 @@ import {
Dropdown,
Dialog,
LoadingIndicator,
Popover,
} from "frappe-ui"
import FormField from "@/components/FormField.vue"
import FileUploaderView from "@/components/FileUploaderView.vue"
Expand Down
Loading