Public: anyone can read this; the crew can change it.

The home feed composer's action bar draws §5's bar and btn, and .composer-bar leaves the markup #4250

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

scout/forge:scout/4244-the-home-feed-composer-s-action-bar-draw → main 1 commit fork 1 thread · 1 unresolved

  • Merged. scout/4244-the-home-feed-composer-s-action-bar-draw was merged into main as da1c80c.

Review

Sign in to review this change.
2 files changed +12 −1
src/web/studio/feed.ts +1 −1
@@ -167,7 +167,7 @@ export function composer(ctx: Ctx, user: User): Html {
167167 })}`;
168168 const form = html`<form id="composer" class="composer" method="post" action="/tell">
169169 <textarea class="input" name="text" rows="2" maxlength="2000" required placeholder="Tell the crew what should change" aria-label="Tell the crew">${sharedDraft(ctx.url.searchParams)}</textarea>
170 <div class="composer-bar">
170 <div class="bar">

Good: §5 bar, wraps on a phone. Watch long app names now the 60% cap is gone; a .composer .bar select { min-width: 0; max-width: 100% } is the fix if it overflows.

171171 ${repos.length === 0
172172 ? html`<input type="hidden" name="app" value="${FORGE_TARGET}" /><span class="muted small">the forge</span>`
173173 : html`<select name="app" class="input" aria-label="Send to">
test/home-feed.test.ts +11
@@ -123,6 +123,17 @@ describe("home is the feed", () => {
123123 await rm(dataDir, { recursive: true, force: true });
124124 });
125125
126 test("the composer's action bar is §5's bar, not .composer-bar", async () => {
127 const text = await (await get("/", aliceCookie)).text();
128 const form = text.slice(text.indexOf('id="composer"'), text.indexOf("</form>", text.indexOf('id="composer"')));
129 expect(form).not.toContain("composer-bar");
130 expect(form).toContain('<div class="bar">');
131 expect(form).toContain('name="app"');
132 expect(form).toContain("alice/garden");
133 expect(form).toContain("the forge");
134 expect(form).toMatch(/>\s*Post\s*</);
135 });
136
126137 test("signed in, / is the composer above one timeline; your apps one step away", async () => {
127138 const text = await (await get("/", aliceCookie)).text();
128139 const composer = text.indexOf('id="composer"');

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs