* Direct port of embeds to new arch (cherry picked from commit cc3fa1f6cea396dd9222486c633a508bfee1ecd6) * Re-org * Split out ListEmbed and FeedEmbed * Split out ImageEmbed * DRY up a bit * Port over ExternalLinkEmbed * Port over Player and Gif embeds * Migrate ComposerReplyTo * Replace other usages of old post-embeds * Migrate view contexts * Copy pasta VideoEmbed * Copy pasta GifEmbed * Swap in new file location * Clean up * Fix up native * Add back in correct moderation on List and Feed embeds * Format * Prettier * delete old video utils * move bandwidth-estimate.ts * Remove log * Add LazyQuoteEmbed for composer use * Clean up unused things * Remove remaining items * Prettier * Fix imports * Handle nested quotes same as prod * Add back silenced error handling * Fix lint --------- Co-authored-by: Samuel Newman <mozzius@protonmail.com>
Application Layout Framework (ALF)
A set of UI primitives and components.
Usage
Naming conventions follow Tailwind — delimited with a _ instead of - to
enable object access — with a couple exceptions:
Spacing
Uses "t-shirt" sizes xxs, xs, sm, md, lg, xl and xxl instead of
increments of 4px. We only use a few common spacings, and otherwise typically
rely on many one-off values.
Text Size
Uses "t-shirt" sizes xxs, xs, sm, md, lg, xl and xxl to match our
type scale.
Line Height
The text size atoms also apply a line-height with the same value as the size,
for a 1:1 ratio. tight and normal are retained for use in the few places
where we need leading.
Atoms
An (mostly-complete) set of style definitions that match Tailwind CSS selectors. These are static and reused throughout the app.
import { atoms } from '#/alf'
<View style={[atoms.flex_row]} />
Theme
Any values that rely on the theme, namely colors.
const t = useTheme()
<View style={[atoms.flex_row, t.atoms.bg]} />
Breakpoints
const b = useBreakpoints()
if (b.gtMobile) {
// render tablet or desktop UI
}