Open platform to collect and prioritize feedback
Mobile tweaks
Matt Robertseaef52d48824
diff --git a/commercial/pages/Administration/ContentModeration.page.scss b/commercial/pages/Administration/ContentModeration.page.scssindex 778d22afb..b0d69689d 100644--- a/commercial/pages/Administration/ContentModeration.page.scss+++ b/commercial/pages/Administration/ContentModeration.page.scss@@ -59,26 +59,75 @@&__content {width: 100%;+ display: flex;+ flex-direction: column;+ gap: spacing(4);+ }++ &__header {+ display: flex;+ justify-content: space-between;+ align-items: flex-start;+ gap: spacing(2);++ @media (max-width: 768px) {+ flex-direction: column;+ gap: spacing(2);+ }+ }++ &__user-info {+ min-width: 0;+ word-break: break-word;+ }++ &__user-name {+ word-break: break-word;}&__user-email {color: var(--colors-gray-700);font-weight: normal;+ word-break: break-all;+ font-size: get("font.size.sm");+ }++ &__body {+ width: 100%;+ min-width: 0;}&__actions {transition: opacity 0.2s ease, visibility 0.2s ease;+ display: flex;+ flex-wrap: wrap;+ gap: spacing(2);+ margin-top: spacing(2);.c-moderation-item:hover & {visibility: visible;opacity: 1;}++ button {+ flex-shrink: 0;++ @media (max-width: 768px) {+ flex: 1 1 auto;+ min-width: calc(50% - spacing(1));+ }+ }}&__timestamp {color: var(--colors-gray-700);font-size: get("font.size.sm");white-space: nowrap;+ flex-shrink: 0;++ @media (max-width: 768px) {+ align-self: flex-start;+ }}&__post-reference {@@ -97,7 +146,14 @@// Responsive adjustments@media (max-width: 768px) {+ #p-admin-moderation {+ padding-left: spacing(4);+ padding-right: spacing(4);+ }+.c-moderation-item {+ padding: spacing(4) spacing(4);+&__actions {visibility: visible;opacity: 1;diff --git a/commercial/pages/Administration/ContentModeration.page.tsx b/commercial/pages/Administration/ContentModeration.page.tsxindex 4903f6148..92de3cfd2 100644--- a/commercial/pages/Administration/ContentModeration.page.tsx+++ b/commercial/pages/Administration/ContentModeration.page.tsx@@ -180,72 +180,62 @@ const ContentModerationPage = () => {return (<div key={`${item.type}-${item.id}`} className="c-moderation-item" onClick={() => handlePostClick(link)}><div className="c-moderation-item__content">- <HStack spacing={4} align="start" justify="between">- <HStack spacing={4} align="start" className="flex-grow">+ <div className="c-moderation-item__header">+ <HStack spacing={4} align="start"><Avatar user={item.user} size="large" />- <VStack spacing={2} className="flex-grow">- <HStack spacing={2}>- <span className="text-semibold">- {item.user.name} <span className="c-moderation-item__user-email"><{item.user.email}></span>- </span>- {blocked}- </HStack>- {item.type === "post" && <h3 className="text-semibold m-0">{title}</h3>}- <div className="text-body text-break">- <Markdown text={chopString(item.content, 200)} style="plainText" />- </div>- {item.type === "comment" && <div className="text-muted text-break">{title}</div>}-- <div className="c-moderation-item__actions invisible" onClick={(e) => e.stopPropagation()}>- <HStack spacing={2}>- <Button- size="small"- variant="secondary"- onClick={() => (item.type === "post" ? handleApprovePost(item.id) : handleApproveComment(item.id))}- >- <Icon sprite={IconCheck} />- <span>- <Trans id="action.publish">Publish</Trans>- </span>- </Button>- <Button- size="small"- variant="secondary"- onClick={() => (item.type === "post" ? handleDeclinePost(item.id) : handleDeclineComment(item.id))}- >- <Icon sprite={IconX} />- <span>- <Trans id="action.delete">Delete</Trans>- </span>- </Button>- <Button- size="small"- variant="secondary"- onClick={() => (item.type === "post" ? handleApprovePostAndVerify(item.id) : handleApproveCommentAndVerify(item.id))}- >- <Icon sprite={IconShieldCheck} />- <span>- <Trans id="action.publish.verify">Publish & Trust</Trans>- </span>- </Button>- <Button- size="small"- variant="secondary"- onClick={() => (item.type === "post" ? handleDeclinePostAndBlock(item.id) : handleDeclineCommentAndBlock(item.id))}- >- <Icon sprite={IconBan} />- <span>- <Trans id="action.delete.block">Delete & Block</Trans>- </span>- </Button>- </HStack>- </div>+ <VStack spacing={1} className="flex-grow c-moderation-item__user-info">+ <div className="text-semibold c-moderation-item__user-name">{item.user.name}</div>+ <div className="c-moderation-item__user-email"><{item.user.email}></div>+ {blocked && <span className="text-red-700">{blocked}</span>}</VStack></HStack><div className="c-moderation-item__timestamp"><Moment date={item.createdAt} locale={fider.currentLocale} /></div>- </HStack>+ </div>++ <VStack spacing={2} className="c-moderation-item__body">+ {item.type === "post" && <h3 className="text-semibold m-0">{title}</h3>}+ <div className="text-body text-break">+ <Markdown text={chopString(item.content, 200)} style="plainText" />+ </div>+ {item.type === "comment" && <div className="text-muted text-break">{title}</div>}++ <div className="c-moderation-item__actions invisible" onClick={(e) => e.stopPropagation()}>+ <Button size="small" variant="secondary" onClick={() => (item.type === "post" ? handleApprovePost(item.id) : handleApproveComment(item.id))}>+ <Icon sprite={IconCheck} />+ <span>+ <Trans id="action.publish">Publish</Trans>+ </span>+ </Button>+ <Button size="small" variant="secondary" onClick={() => (item.type === "post" ? handleDeclinePost(item.id) : handleDeclineComment(item.id))}>+ <Icon sprite={IconX} />+ <span>+ <Trans id="action.delete">Delete</Trans>+ </span>+ </Button>+ <Button+ size="small"+ variant="secondary"+ onClick={() => (item.type === "post" ? handleApprovePostAndVerify(item.id) : handleApproveCommentAndVerify(item.id))}+ >+ <Icon sprite={IconShieldCheck} />+ <span>+ <Trans id="action.publish.verify">Publish & Trust</Trans>+ </span>+ </Button>+ <Button+ size="small"+ variant="secondary"+ onClick={() => (item.type === "post" ? handleDeclinePostAndBlock(item.id) : handleDeclineCommentAndBlock(item.id))}+ >+ <Icon sprite={IconBan} />+ <span>+ <Trans id="action.delete.block">Delete & Block</Trans>+ </span>+ </Button>+ </div>+ </VStack></div></div>)diff --git a/public/pages/ShowPost/ShowPost.page.scss b/public/pages/ShowPost/ShowPost.page.scssindex 2e477182e..8bae0871a 100644--- a/public/pages/ShowPost/ShowPost.page.scss+++ b/public/pages/ShowPost/ShowPost.page.scss@@ -2,9 +2,13 @@#p-show-post {background-color: var(--colors-gray-100);- padding-top: spacing(12);+ padding-top: spacing(4);padding-bottom: spacing(12);+ @include media("md") {+ padding-top: spacing(12);+ }+.post-header {flex-grow: 1;}@@ -71,6 +75,13 @@border-top: 5px solid var(--colors-blue-500);padding-top: spacing(4);margin-top: spacing(8);++ // Remove flex-grow on mobile so Following button doesn't get pushed to the right+ @include media("sm") {+ .flex-grow {+ display: none;+ }+ }}&__discussion-section {@@ -97,6 +108,15 @@}}+ &__powered-by-mobile {+ display: block;+ margin-top: spacing(6);++ @include media("lg") {+ display: none;+ }+ }+&__action-col {display: flex;flex-direction: column;@@ -106,6 +126,24 @@margin-top: spacing(6);}+ // Hide desktop version on mobile+ &--desktop {+ display: none;++ @include media("lg") {+ display: flex;+ }+ }++ // Show mobile version only on mobile+ &--mobile {+ display: flex;++ @include media("lg") {+ display: none;+ }+ }+> .card {background-color: var(--colors-white);@include dark-mode {diff --git a/public/pages/ShowPost/ShowPost.page.tsx b/public/pages/ShowPost/ShowPost.page.tsxindex ecbb18e3c..8987941f2 100644--- a/public/pages/ShowPost/ShowPost.page.tsx+++ b/public/pages/ShowPost/ShowPost.page.tsx@@ -221,8 +221,8 @@ export default function ShowPostPage(props: ShowPostPageProps) {<Header /><div id="p-show-post" className="page container"><div className="p-show-post">- {/* Left Sidebar */}- <div className="p-show-post__action-col">+ {/* Left Sidebar - hidden on mobile, shown on desktop */}+ <div className="p-show-post__action-col p-show-post__action-col--desktop"><VotesPanel post={props.post} votes={props.votes} /><PoweredByFider slot="show-post" className="mt-3" />@@ -383,6 +383,11 @@ export default function ShowPostPage(props: ShowPostPageProps) {)}</div>+ {/* Mobile Sidebar - shown after post card on mobile */}+ <div className="p-show-post__action-col p-show-post__action-col--mobile">+ <VotesPanel post={props.post} votes={props.votes} />+ </div>+{/* Discussion Section */}<div className="p-show-post__discussion-section">{/* Discussion Header */}@@ -410,6 +415,11 @@ export default function ShowPostPage(props: ShowPostPageProps) {</VStack>)}</div>++ {/* Powered by Fider - bottom of page on mobile only */}+ <div className="p-show-post__powered-by-mobile">+ <PoweredByFider slot="show-post" />+ </div></div></div></div>diff --git a/public/pages/ShowPost/components/ShowComment.scss b/public/pages/ShowPost/components/ShowComment.scssindex dd8d6e946..36daff85d 100644--- a/public/pages/ShowPost/components/ShowComment.scss+++ b/public/pages/ShowPost/components/ShowComment.scss@@ -1,6 +1,13 @@@use "~@fider/assets/styles/variables.scss" as *;.c-comment {+ // Hide avatar on mobile+ @include media("sm") {+ .c-avatar {+ display: none;+ }+ }+&__card {flex-grow: 1;background-color: var(--colors-white);diff --git a/public/pages/ShowPost/components/ShowComment.tsx b/public/pages/ShowPost/components/ShowComment.tsxindex 39a6402c5..295760df5 100644--- a/public/pages/ShowPost/components/ShowComment.tsx+++ b/public/pages/ShowPost/components/ShowComment.tsx@@ -183,7 +183,7 @@ export const ShowComment = (props: ShowCommentProps) => {})return (- <div id={`comment-${comment.id}`}>+ <div id={`comment-${comment.id}`} className="c-comment">{modal()}<HStack spacing={4} align="start"><Avatar user={comment.user} size="large" />