33 lines
5.0 KiB
Markdown
33 lines
5.0 KiB
Markdown
|
|
# New post
|
||
|
|
|
||
|
|
`/compose/post` · `apps/{bull,bear}/src/app/(flow)/compose/post/page.tsx`; bear's dialog: `apps/bear/src/app/(main)/@modal/(.)compose/post/page.tsx` · Type: account · Layout: [layout.md](layout.md); the dialog: [layout-main.md](layout-main.md)
|
||
|
|
|
||
|
|
| Field | Value |
|
||
|
|
| ----------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
|
||
|
|
| Robots | `noindex` (page `metadata`) |
|
||
|
|
| Status | `200` for every viewer: a guest goes to login in the browser, an investor sees `AuthGuard`'s page-size no-access state |
|
||
|
|
| loading.tsx | `compose/post/loading.tsx`: bull: the form skeleton only; bear: the header and the form skeleton; `delayed`. The dialog has none |
|
||
|
|
| First flush | none |
|
||
|
|
| Canonical | none: `noindex` |
|
||
|
|
| H1 | bull: none (the composer's bar names it, in the browser); bear: the composer card's header, `content:composer.new-title`, in the browser |
|
||
|
|
| JSON-LD | none |
|
||
|
|
| Scripts | none beyond the layout's |
|
||
|
|
|
||
|
|
## Sections
|
||
|
|
|
||
|
|
In bull's document order. `compose/layout.tsx` is only `OnboardingGuard` (0016): it renders nothing, and sends a creator who hasn't finished step 5 to the creator profile.
|
||
|
|
|
||
|
|
| Section | Data | HTML | JS | Index | Notes |
|
||
|
|
| ------------------------- | ------ | ----------- | ----------- | ----- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||
|
|
| DesktopHeader (bear) | viewer | first flush | hydrate | no | the page renders it itself; rows as in [layout-main.md](layout-main.md) |
|
||
|
|
| PostComposer | viewer | skeleton | hydrate | no | `AuthGuard role="creator"`, fallback `SkeletonPreset form`; then `usePublishAccess`: pending keeps the skeleton, blocked sends the creator to their channel (`ComposerLockedRedirect`, 0060) |
|
||
|
|
| ↳ ComposerForm | viewer | skeleton | hydrate | no | bull: `MobileTopBar`, the «انصراف» row, the body, and a pinned footer with add image, count and submit; bear: a 640 card with its `h1` header; the draft lives in the persisted post-draft store; rules from `POST_LIMITS` (0022); publish sends an `Idempotency-Key` (0060) |
|
||
|
|
| ↳ LeaveConfirm | — | none | hydrate | no | mounts when leaving with something to lose |
|
||
|
|
| PostComposerDialog (bear) | viewer | none | interaction | no | the `@modal` intercept (0023), on a soft navigation from a main page: the composer as a 640 dialog over that page; fallback `PostComposerDialogSkeleton`; anyone but a creator gets no-access inside the dialog; its route chunk loads with the navigation |
|
||
|
|
|
||
|
|
## Notes
|
||
|
|
|
||
|
|
- A hard load or refresh of `/compose/post` gets the full page; a soft navigation from a `(main)` page gets the dialog over it. When nothing in `(main)` is under the dialog, `(main)/default.tsx` loads the URL again, so the full page takes over. `@modal/feed` and `@modal/channels/[username]` are null pages that empty the slot after publishing (0023).
|
||
|
|
- bull's server HTML holds only the form skeleton: no top bar until the browser knows the viewer.
|
||
|
|
- Debt: different H1 per app. bull has no `h1`; add a screen-reader `h1` to `ComposerForm`'s mobile branch (`platforms/market/src/app/screens/(flow)/compose/post/organisms/post-composer/components/ComposerForm.tsx:64`).
|