Skip to content

Give the editor pages one top bar - #265

Merged
PhilReinking merged 20 commits into
mainfrom
feat/bits-278-top-bar
Oct 13, 2026
Merged

PhilReinking merged 20 commits into
mainfrom
feat/bits-278-top-bar

Conversation

@PhilReinking

@PhilReinking PhilReinking commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

On a form's 4 pages, one 56 px bar replaces the app header and the form bar (before: 64 px on wide screens, 168 px on phones). Publish now checks the form first, and Share holds the link once the form is live.

Fixes BITS-278

  • The publish check runs in the browser: questions without text, rules using a deleted question, no privacy link. Pages without the rules fetch them.
  • Under 1024 px the pages move to a tab bar at the bottom.
  • preview holds a Preview link to the form until the live preview fills it (under 1024 px: in the form menu). save-status stays empty.
  • The form menu says "Archive form…", which is what deleting does today. The account menu has no team switch: the app has none yet.

Heads-up: Publish, Unpublish and the share link moved out of the form menu into the bar.

Tested: Vitest (the new tests fail on main), lint, types, build. By hand on my own server at 1440, 1024, 390 and 360 px: no sideways scroll, dashboard header pixel-identical.

Not tested: Safari and iOS, a screen reader by ear.

Screenshots are on the ticket.

🤖 Generated with Claude Code

PhilReinking and others added 5 commits October 13, 2026 00:55
The breadcrumb with the form menu and a Draft or Live chip, the 4 pages,
slots for the save status and the preview control, Publish with a short
check (or Share once live) and the account menu. Under lg the pages move
to a bottom tab bar. The dashboard keeps its header.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
FactoryNavigation, its two phone rows and the form dropdown are replaced
by the top bar.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Input asks only for an email at sign-up, so the avatar takes its letter
from the email. The help links show a plain arrow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…phones

The team name keeps its width, the share panel's controls are 44 px
under lg, Share has its icon first and Cancel looks like the dashboard's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@PhilReinking PhilReinking left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes at edf08d6, CI green.

Must: drafts lost Preview. The old bar linked to every form, and team members can open a draft. Now Open form is only in Share, once live, and no page fills the preview slot. A fallback Preview link in that slot would keep it until the live preview ticket. Held: rename, template download, archive, share, publish and the phone tabs have a home, and pages without a form keep the old header.

Comment on lines +146 to +149
// only the editor loads the blocks, the other pages fetch them for the check
const fetched = ref<FormBlockModel[] | null>(null);
const checks = computed(() => {
const blocks = store.blocks ?? fetched.value;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Submissions page loads blocks without their rules (includeSubmissions drops logics), so there the check never fetches and misses broken rules. Use the store's blocks only when they carry rules.

Suggested change
// only the editor loads the blocks, the other pages fetch them for the check
const fetched = ref<FormBlockModel[] | null>(null);
const checks = computed(() => {
const blocks = store.blocks ?? fetched.value;
// only the editor's blocks have their rules (Submissions loads them without), the other pages fetch them for the check
const hasRules = (blocks: FormBlockModel[] | null): blocks is FormBlockModel[] =>
!!blocks && (blocks.length === 0 || blocks.some((block) => "logics" in block));
const fetched = ref<FormBlockModel[] | null>(null);
const checks = computed(() => {
const blocks = hasRules(store.blocks) ? store.blocks : fetched.value;

hasCheckFailed.value = false;
isChecking.value = true;

if (!store.blocks && store.formId) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, so Submissions fetches the blocks with their rules.

Suggested change
if (!store.blocks && store.formId) {
if (!hasRules(store.blocks) && store.formId) {

)
) {
isBusy.value = true;
await store.unpublishForm();

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When this fails, the button stays disabled and nothing says why. Catch it and show "Couldn't unpublish the form. Try again." in the panel, like Publish does.

PhilReinking and others added 15 commits October 13, 2026 01:23
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Submissions loads the blocks without their rules, so the check now
fetches them there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… again

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…npublish

The button you used turns into the other one, so the focus moves there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tings

A page visit loads Settings again, which reads the section from the
hash; a plain link only changed the hash there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Main's bar linked every form; the new bar only had Open form in Share,
once live. Until the live preview fills the slot, Preview opens the
form in a new tab.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The rename dialog keeps its size on the dashboard from 640 px up.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
"1 points to a question that no longer exists" read like a typo.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…l on hover

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In the phone bar it left the form name a few letters at 390 px and none
at 360 px. From 1024 px it stays in the bar.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… bar

The form name then fits in full at 1024 px.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@PhilReinking PhilReinking left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK at 553f7c2, CI green. All points from the last review and the design check are fixed.

On the code before these fixes, 15 of the new and changed tests fail, one or more per point. Beyond that: Preview renders through the real layout on drafts, a failed Unpublish keeps the form live (the store changes only on success), and the layout itself and the dashboard header are untouched. Vitest 256, lint and types pass locally.

@PhilReinking
PhilReinking merged commit 45a9d3a into main Oct 13, 2026
6 checks passed
@PhilReinking
PhilReinking deleted the feat/bits-278-top-bar branch October 13, 2026 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant