Address review feedback on gallery-embed branch
- Composer.tsx: thread gallery through reply pills (hasMedia), post:create/draft:save analytics, missingAltError, and publish-fail logger annotation - composer/state/composer.ts: surface a logger.warn when embed_add_images would exceed MAX_GALLERY_IMAGES (hard slice preserved); ascii-only comments - maybeApplyGalleryOffsetStyles.ts: scope PostGalleryEmbedEnable gate to image-embed branches so gallery posts always get no-content offsets - MessageOverlays.tsx: store reactionsTargetId instead of a frozen message snapshot; look up the live message each render. Memoize reportSubject on reportTarget+convoId so ReportDialog's parseReportSubject memo survives convo updates. Replace open-after-mount boolean with a ref keyed to id so reopening the same message reliably re-triggers - ImageEmbed.tsx + ImageLayoutGrid.tsx: thread isWithinQuote through the 2-4 image fallthrough; explicit prop overrides the viewContext heuristic - parseReportSubject.ts: flip the image attribute true for gallery embeds (top-level and post_with_media), matching the existing images branches - AppIconSettings/index.tsx: restore the IconName casts the previous change dropped; IconName is still a literal union - composer/photos/Gallery.tsx: wrap to a 4-column grid for n>4 so 10-image previews don't crush remove/alt-text controls - lib/api/index.ts: normalize gallery upload log nouns to image/images
This commit is contained in:
@@ -343,15 +343,15 @@ async function resolveMedia(
|
||||
}
|
||||
if (embedDraft.media?.type === 'gallery') {
|
||||
const imagesDraft = embedDraft.media.images
|
||||
logger.debug(`Uploading gallery items`, {
|
||||
logger.debug(`Uploading images`, {
|
||||
count: imagesDraft.length,
|
||||
})
|
||||
onStateChange?.(t`Uploading images...`)
|
||||
const items: $Typed<AppBskyEmbedGallery.Image>[] = await Promise.all(
|
||||
imagesDraft.map(async (image, i) => {
|
||||
logger.debug(`Compressing gallery image #${i}`)
|
||||
logger.debug(`Compressing image #${i}`)
|
||||
const {path, width, height, mime} = await compressImage(image)
|
||||
logger.debug(`Uploading gallery image #${i}`)
|
||||
logger.debug(`Uploading image #${i}`)
|
||||
const res = await uploadBlob(agent, path, mime)
|
||||
return {
|
||||
$type: 'app.bsky.embed.gallery#image' as const,
|
||||
|
||||
Reference in New Issue
Block a user