Skip to content

Commit

Permalink
fix: Improve list view on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
areknawo committed Aug 11, 2023
1 parent 2f9c55b commit 29cb1da
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
4 changes: 4 additions & 0 deletions apps/web/src/layout/toolbar/breadcrumb.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ const Breadcrumb: Component<{
group: "shared",
ghostClass: "!hidden",
filter: ".locked",
delayOnTouchOnly: true,
delay: 500,
onAdd(evt) {
const el = evt.item;

Expand Down Expand Up @@ -171,6 +173,8 @@ const Breadcrumb: Component<{
group: "shared",
ghostClass: "!hidden",
filter: ".locked",
delayOnTouchOnly: true,
delay: 500,
onAdd(evt) {
const el = evt.item;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,8 @@ const ContentGroupColumn: Component<ContentGroupColumnProps> = (props) => {
);
}
},
delayOnTouchOnly: true,
delay: 500,
disabled: !hasPermission("manageDashboard"),
ghostClass: "!hidden",
revertOnSpill: true,
Expand Down
6 changes: 4 additions & 2 deletions apps/web/src/views/dashboard/views/list/content-group-row.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ const ContentGroupRow: Component<ContentGroupRowProps> = (props) => {
});

return (
<Card class="m-0 border-x-0 border-t-0 rounded-none flex justify-start items-center hover:bg-gray-200 dark:hover:bg-gray-700 hover:cursor-pointer pl-4">
<Card class="m-0 border-x-0 border-t-0 rounded-none flex justify-start items-center @hover:bg-gray-200 dark:@hover:bg-gray-700 @hover:cursor-pointer pl-4">
<div
class="flex flex-1 justify-center items-center cursor-pointer overflow-x-hidden"
ref={(el) => {
Expand All @@ -143,6 +143,8 @@ const ContentGroupRow: Component<ContentGroupRowProps> = (props) => {
);
}
},
delayOnTouchOnly: true,
delay: 500,
disabled: !hasPermission("manageDashboard"),
ghostClass: "!hidden",
revertOnSpill: true,
Expand Down Expand Up @@ -259,7 +261,7 @@ const ContentGroupRow: Component<ContentGroupRowProps> = (props) => {
</div>
<MiniEditor
class={clsx(
"!text-base inline-flex text-start flex-1 overflow-x-auto content-group-name scrollbar-hidden hover:cursor-text",
"!text-base inline-flex text-start flex-1 overflow-x-auto content-group-name scrollbar-hidden @hover:cursor-text",
highlight() && "highlight-text"
)}
content="paragraph"
Expand Down
12 changes: 5 additions & 7 deletions apps/web/src/views/dashboard/views/list/content-piece-row.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Component } from "solid-js";
import { mdiEye, mdiFileOutline, mdiPencil } from "@mdi/js";
import { useNavigate } from "@solidjs/router";
import SortableLib from "sortablejs";
import clsx from "clsx";
import { Card, IconButton, Tooltip } from "#components/primitives";
import { App, hasPermission, useLocalStorage, useSharedState } from "#context";
import { breakpoints } from "#lib/utils";
Expand All @@ -21,10 +20,7 @@ const ContentPieceRow: Component<ContentPieceRowProps> = (props) => {
const { setStorage, storage } = useLocalStorage();
const navigate = useNavigate();
const createSharedSignal = useSharedState();
const [activeDraggablePiece, setActiveDraggablePiece] = createSharedSignal(
"activeDraggablePiece",
null
);
const [, setActiveDraggablePiece] = createSharedSignal("activeDraggablePiece", null);
const editedArticleId = (): string => storage().contentPieceId || "";

return (
Expand All @@ -40,7 +36,7 @@ const ContentPieceRow: Component<ContentPieceRowProps> = (props) => {
>
<Card
color="contrast"
class="m-0 border-x-0 border-t-0 rounded-none justify-start items-center hover:bg-gray-200 dark:hover:bg-gray-700 hover:cursor-pointer pl-4 flex bg-transparent"
class="m-0 border-x-0 border-t-0 rounded-none justify-start items-center @hover:bg-gray-200 dark:@hover:bg-gray-700 @hover:cursor-pointer pl-4 flex bg-transparent"
>
<div
class="flex flex-1 justify-center items-center cursor-pointer overflow-hidden rounded-lg"
Expand All @@ -50,6 +46,8 @@ const ContentPieceRow: Component<ContentPieceRowProps> = (props) => {
name: "shared",
put: () => false
},
delayOnTouchOnly: true,
delay: 500,
disabled: !hasPermission("manageDashboard"),
ghostClass: "!hidden",
revertOnSpill: true,
Expand All @@ -76,7 +74,7 @@ const ContentPieceRow: Component<ContentPieceRowProps> = (props) => {
hover={false}
badge
/>
{props.contentPiece.title}
<span class="clamp-1 text-start">{props.contentPiece.title}</span>
</div>
</div>
<Tooltip text="Open in editor" side="left" wrapperClass="mr-4" class="-ml-1">
Expand Down

0 comments on commit 29cb1da

Please sign in to comment.