diff --git a/src/components/Note/LiveEvent.tsx b/src/components/Note/LiveEvent.tsx index e67e9071..e9409d15 100644 --- a/src/components/Note/LiveEvent.tsx +++ b/src/components/Note/LiveEvent.tsx @@ -23,7 +23,7 @@ export default function LiveEvent({ event, className }: { event: Event; classNam {metadata.status} )) - const titleComponent =
{metadata.title}
+ const titleComponent =
{metadata.title}
const summaryComponent = metadata.summary && (
{metadata.summary}
diff --git a/src/components/Note/LongFormArticlePreview.tsx b/src/components/Note/LongFormArticlePreview.tsx index 861b54f3..6f59c1a9 100644 --- a/src/components/Note/LongFormArticlePreview.tsx +++ b/src/components/Note/LongFormArticlePreview.tsx @@ -24,7 +24,7 @@ export default function LongFormArticlePreview({ push(toNote(event.id)) } - const titleComponent =
{metadata.title}
+ const titleComponent =
{metadata.title}
const tagsComponent = metadata.tags.length > 0 && (
diff --git a/src/components/Note/PublicationCard.tsx b/src/components/Note/PublicationCard.tsx index 7e518988..e6539cd2 100644 --- a/src/components/Note/PublicationCard.tsx +++ b/src/components/Note/PublicationCard.tsx @@ -28,7 +28,7 @@ export default function PublicationCard({ push(toNote(event.id)) } - const titleComponent = metadata.title ?
{metadata.title}
: null + const titleComponent = metadata.title ?
{metadata.title}
: null const formatBookName = (book: string) => { return book diff --git a/src/components/Note/WikiCard.tsx b/src/components/Note/WikiCard.tsx index 9956a6e0..ab5ce7ba 100644 --- a/src/components/Note/WikiCard.tsx +++ b/src/components/Note/WikiCard.tsx @@ -24,7 +24,7 @@ export default function WikiCard({ push(toNote(event.id)) } - const titleComponent =
{metadata.title}
+ const titleComponent =
{metadata.title}
const tagsComponent = metadata.tags.length > 0 && (
diff --git a/src/components/PostEditor/PostRelaySelector.tsx b/src/components/PostEditor/PostRelaySelector.tsx index cdda98d2..743227a7 100644 --- a/src/components/PostEditor/PostRelaySelector.tsx +++ b/src/components/PostEditor/PostRelaySelector.tsx @@ -15,7 +15,6 @@ import relaySelectionService, { type RelaySourceType } from '@/services/relay-se import { Button } from '@/components/ui/button' import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover' import { Sheet, SheetContent, SheetTrigger } from '@/components/ui/sheet' -import { ScrollArea } from '@/components/ui/scroll-area' import logger from '@/lib/logger' export default function PostRelaySelector({ @@ -390,9 +389,9 @@ export default function PostRelaySelector({ {description}
- +
{content} - +
@@ -417,14 +416,14 @@ export default function PostRelaySelector({ - +
{t('Select relays')} {description}
- +
{content} - +
diff --git a/src/components/PostEditor/PostTextarea/Emoji/EmojiList.tsx b/src/components/PostEditor/PostTextarea/Emoji/EmojiList.tsx index 8670bafd..0249e6e1 100644 --- a/src/components/PostEditor/PostTextarea/Emoji/EmojiList.tsx +++ b/src/components/PostEditor/PostTextarea/Emoji/EmojiList.tsx @@ -69,7 +69,7 @@ export const EmojiList = forwardRef((props, re return ( e.stopPropagation()} onTouchMove={(e) => e.stopPropagation()} > diff --git a/src/components/PostEditor/PostTextarea/Mention/MentionList.tsx b/src/components/PostEditor/PostTextarea/Mention/MentionList.tsx index 28a51f14..a802e1f7 100644 --- a/src/components/PostEditor/PostTextarea/Mention/MentionList.tsx +++ b/src/components/PostEditor/PostTextarea/Mention/MentionList.tsx @@ -1,4 +1,3 @@ -import { ScrollArea } from '@/components/ui/scroll-area' import { formatNpub, userIdToPubkey } from '@/lib/pubkey' import { cn } from '@/lib/utils' import { SuggestionKeyDownProps } from '@tiptap/suggestion' @@ -77,8 +76,8 @@ const MentionList = forwardRef((props, ref) } return ( - e.stopPropagation()} onTouchMove={(e: React.TouchEvent) => e.stopPropagation()} > @@ -101,7 +100,7 @@ const MentionList = forwardRef((props, ref) ))} - + ) }) MentionList.displayName = 'MentionList' diff --git a/src/components/Profile/index.tsx b/src/components/Profile/index.tsx index d0b04848..383128e1 100644 --- a/src/components/Profile/index.tsx +++ b/src/components/Profile/index.tsx @@ -417,9 +417,9 @@ export default function Profile({ id }: { id?: string }) { )} {/* Display payment info from kind 10133 */} {paymentInfo && ((paymentInfo.methods && paymentInfo.methods.length > 0) || paymentInfo.payto) && ( -
+
Payment Methods
-
+
{paymentInfo.methods && paymentInfo.methods.length > 0 ? ( paymentInfo.methods.map((method, idx) => { // NIP-A3: type is in method.type, authority is in method.authority @@ -428,12 +428,12 @@ export default function Profile({ id }: { id?: string }) { const paytoUri = method.payto || (method.type && authority ? `payto://${method.type}/${authority}` : undefined) return ( -
+
{displayType}
{authority && ( -
- {method.type === 'lightning' && } - {authority} +
+ {method.type === 'lightning' && } + {authority}
)} {paytoUri && ( @@ -441,7 +441,7 @@ export default function Profile({ id }: { id?: string }) { href={paytoUri} target="_blank" rel="noopener noreferrer" - className="text-muted-foreground text-xs mt-1 hover:underline" + className="text-muted-foreground text-xs mt-1 hover:underline block break-all min-w-0" onClick={(e) => e.stopPropagation()} > {paytoUri} @@ -463,11 +463,11 @@ export default function Profile({ id }: { id?: string }) { ) : ( // Display payto from root level if methods array is empty paymentInfo.payto && ( -
+
Lightning Network
-
- - {paymentInfo.payto} +
+ + {paymentInfo.payto}
{paymentInfo.currency && (
({paymentInfo.currency})
diff --git a/src/components/ui/dialog.tsx b/src/components/ui/dialog.tsx index a6ab20b7..14f98bff 100644 --- a/src/components/ui/dialog.tsx +++ b/src/components/ui/dialog.tsx @@ -58,7 +58,7 @@ const DialogOverlay = React.forwardRef< e.preventDefault()} diff --git a/src/index.css b/src/index.css index 3ff419bf..ff371dea 100644 --- a/src/index.css +++ b/src/index.css @@ -444,3 +444,71 @@ display: block; margin: 0.25rem 0; } + +/* Lightbox (yet-another-react-lightbox) caption title: wrap on narrow screens instead of truncating */ +.yarl__slide_title { + white-space: normal !important; + overflow: visible !important; + text-overflow: unset !important; + word-wrap: break-word; +} + +/* Lightbox: responsive on narrow screens so images are not cut off */ +.yarl__portal { + inset: 0; + width: 100%; + height: 100%; +} +@supports (height: 100dvh) { + .yarl__portal { + height: 100dvh; + } +} +.yarl__container { + height: 100%; + min-height: 0; + width: 100%; +} +.yarl__carousel { + min-height: 0; +} +.yarl__slide { + min-height: 0; + min-width: 0; + display: flex; + align-items: center; + justify-content: center; +} +.yarl__slide_image { + max-height: 100% !important; + max-width: 100% !important; + width: auto !important; + height: auto !important; + object-fit: contain !important; +} +/* Ensure slide wrapper allows image to shrink and fit viewport on narrow screens */ +.yarl__slide_wrapper { + min-height: 0; + flex: 1; + display: flex !important; + align-items: center; + justify-content: center; + width: 100%; + max-width: 100%; +} +.yarl__slide_wrapper .yarl__slide_image { + max-height: 100% !important; + max-width: 100% !important; +} +@media (max-width: 768px) { + .yarl__slide_captions_container { + padding: 12px; + } + .yarl__toolbar { + padding: 8px; + } + .yarl__navigation_prev, + .yarl__navigation_next { + padding: 12px 8px; + } +} diff --git a/src/pages/primary/DiscussionsPage/CreateThreadDialog.tsx b/src/pages/primary/DiscussionsPage/CreateThreadDialog.tsx index 868b5034..db2d4e4a 100644 --- a/src/pages/primary/DiscussionsPage/CreateThreadDialog.tsx +++ b/src/pages/primary/DiscussionsPage/CreateThreadDialog.tsx @@ -587,11 +587,11 @@ export default function CreateThreadDialog({ sideOffset={4} >
- {allAvailableTopics.map((topic) => { + {allAvailableTopics.map((topic, index) => { const Icon = topic.icon return (
{ setSelectedTopic(topic.id)