Bottom bar: rides on top of the phone keyboard; capsule-shaped blur that morphs with it #145

Closed
opened 2026-10-14 05:42:15 +00:00 by kayg · 4 comments
Owner

kayg on an iPhone, typing in today's note: "i would expect the formatting/styling bar appear over the ios bar? it just makes sense on mobile?"

Right now, while the keyboard is up, our bar is nowhere in sight. All you see is iOS's own form bar (^ v ✓) and Safari's address pill.

Want: on a phone, while the caret is in a note, the bottom bar (already morphed into the text tools per D5 and ADR 0035) sits right above the keyboard. It docks just above iOS's input accessory bar, follows the keyboard as it opens, closes and resizes, and the springy morph stays in place.

Notes:

  • iOS Safari ignores interactive-widget=resizes-content. Use the visualViewport API (resize and scroll) to get the keyboard's top edge.
  • Position with a transform. No layout shift, and no jank while the keyboard animates.
  • Hide our bar while the keyboard is closing, then bring it back.
  • Check that the caret line never ends up under the bar: scroll the margin.
  • Android Chrome: use interactive-widget / the VirtualKeyboard API.
  • Installed PWA: the same.
  • Research how Craft, Bear, Notion and Apple Notes on the web do it.
  • We can't drive real iOS here. Fake the visual viewport in Playwright for the logic, and write down exactly what kayg should check on the phone.
kayg on an iPhone, typing in today's note: "i would expect the formatting/styling bar appear over the ios bar? it just makes sense on mobile?" Right now, while the keyboard is up, our bar is nowhere in sight. All you see is iOS's own form bar (^ v ✓) and Safari's address pill. **Want:** on a phone, while the caret is in a note, the bottom bar (already morphed into the text tools per D5 and ADR 0035) sits right above the keyboard. It docks just above iOS's input accessory bar, follows the keyboard as it opens, closes and resizes, and the springy morph stays in place. **Notes:** - iOS Safari ignores `interactive-widget=resizes-content`. Use the `visualViewport` API (`resize` and `scroll`) to get the keyboard's top edge. - Position with a transform. No layout shift, and no jank while the keyboard animates. - Hide our bar while the keyboard is closing, then bring it back. - Check that the caret line never ends up under the bar: scroll the margin. - Android Chrome: use `interactive-widget` / the VirtualKeyboard API. - Installed PWA: the same. - Research how Craft, Bear, Notion and Apple Notes on the web do it. - We can't drive real iOS here. Fake the visual viewport in Playwright for the logic, and write down exactly what kayg should check on the phone.
Author
Owner

iphone

![iphone](https://git.kayg.org/attachments/602c3565-e7cb-4bcc-92e5-8730495ebf1e)
Author
Owner

Also in this issue (same component), from kayg: "the progressive blur here should be capsule shaped and only cover the width and height of the tab/formatting/style bar (following it as it morphs, of course with some padding). right now it's a horizontal long band that looks very odd and it's too tall also"

Today the progressive blur behind the bottom bar is a full-width band, and too tall. It should be a capsule hugging the bar with a little padding. It morphs together with the bar (tabs, then text tools, then style), with the same spring and no separate animation, and is soft at the edges.

**Also in this issue (same component), from kayg:** "the progressive blur here should be capsule shaped and only cover the width and height of the tab/formatting/style bar (following it as it morphs, of course with some padding). right now it's a horizontal long band that looks very odd and it's too tall also" Today the progressive blur behind the bottom bar is a full-width band, and too tall. It should be a capsule hugging the bar with a little padding. It morphs together with the bar (tabs, then text tools, then style), with the same spring and no separate animation, and is soft at the edges.
kayg changed title from Phone: the text/style bar rides on top of the keyboard to Bottom bar: rides on top of the phone keyboard; capsule-shaped blur that morphs with it 2026-10-14 05:44:01 +00:00
Author
Owner

Done in PR #240: the blur capsule, keyboard docking, and toasts in the bar. Screenshots are from the e2e harness against the real server.

The blur is a capsule now

The full-width band is gone. The blur hugs the bar with 14 px around it, morphs with it on the same spring, and fades out on every edge. Look at Line 11 on either side of the bar: only the text right next to the capsule is softened.

1440 light: tabs, then tools, then the text bar, then Style
chromium-1440-light-tabs.png chromium-1440-light-tools.png chromium-1440-light-text.png chromium-1440-light-style.png

1440 dark: tabs, then tools, then the text bar, then Style
chromium-1440-dark-tabs.png chromium-1440-dark-tools.png chromium-1440-dark-text.png chromium-1440-dark-style.png

900 light / dark: the text bar
chromium-900-light-text.png chromium-900-dark-text.png

Frame strip: tabs, then tools, then the text bar, then Style, a few frames into each morph. The blur stays with the capsule the whole time.
chromium-strip.png

Toasts are the bar

The capsule morphs into the toast ("Block deleted" with Undo), then back into the tools. There's no separate stack. A second toast waits for the first. When no bar is on screen (a phone's list screens, sign-in), toasts show on their own as before.

1440 dark, 390 light, 320 light
chromium-1440-dark-toast.png chromium-390-light-toast.png chromium-320-light-toast.png

Frame strip: tools, then the toast, then Undo, then "Undone", then back to the tools
chromium-toast-strip.png

Phone: on the keyboard

The keyboard is faked through visualViewport. The bar's bottom edge sits exactly 8 px above the keyboard's top for the tools, the text bar and a toast. The test checks that number, not just the picture. The keyboard would cover everything below the toast.
chromium-keyboard-closed.png chromium-keyboard-open.png chromium-keyboard-text.png chromium-keyboard-toast.png

WebKit

Same layout and states. Headless WebKit on this machine draws no backdrop blur at all, with or without this change (I checked the bar with the halo switched off and it looks the same), so you can't judge the blur from these. They show where things sit. The real check is item 1 on the phone checklist below.
webkit-1440-light-tools.png webkit-1440-dark-toast.png webkit-390-light-toast.png webkit-keyboard-open.png

Done in PR #240: the blur capsule, keyboard docking, and toasts in the bar. Screenshots are from the e2e harness against the real server. ### The blur is a capsule now The full-width band is gone. The blur hugs the bar with 14 px around it, morphs with it on the same spring, and fades out on every edge. Look at Line 11 on either side of the bar: only the text right next to the capsule is softened. **1440 light:** tabs, then tools, then the text bar, then Style ![chromium-1440-light-tabs.png](https://git.kayg.org/attachments/7754a954-9b3f-4dba-929e-10b5a632b100) ![chromium-1440-light-tools.png](https://git.kayg.org/attachments/b114f15a-5ddc-4deb-a355-86496e4ed0c4) ![chromium-1440-light-text.png](https://git.kayg.org/attachments/6e5e843a-58dd-48e4-8ddd-1daeabf77e90) ![chromium-1440-light-style.png](https://git.kayg.org/attachments/6c287c47-3eff-4bb8-915c-05af20323dfb) **1440 dark:** tabs, then tools, then the text bar, then Style ![chromium-1440-dark-tabs.png](https://git.kayg.org/attachments/e9d879f8-0749-48e7-bec0-79bee0d6d957) ![chromium-1440-dark-tools.png](https://git.kayg.org/attachments/87c82454-da04-4d41-9d00-4dc5f8a70935) ![chromium-1440-dark-text.png](https://git.kayg.org/attachments/40ea1082-790d-4bf4-ace2-e0cd1ee94b32) ![chromium-1440-dark-style.png](https://git.kayg.org/attachments/ccbf359c-08c6-4468-bc69-ec0a99e7fd88) **900 light / dark:** the text bar ![chromium-900-light-text.png](https://git.kayg.org/attachments/c39c5b1a-296c-4254-8e10-86628cbb7515) ![chromium-900-dark-text.png](https://git.kayg.org/attachments/12a696c3-8de5-4e66-80b2-ae9bad5a9da5) **Frame strip:** tabs, then tools, then the text bar, then Style, a few frames into each morph. The blur stays with the capsule the whole time. ![chromium-strip.png](https://git.kayg.org/attachments/07178f2b-d585-436b-95a8-4f09ab42c4a7) ### Toasts are the bar The capsule morphs into the toast ("Block deleted" with Undo), then back into the tools. There's no separate stack. A second toast waits for the first. When no bar is on screen (a phone's list screens, sign-in), toasts show on their own as before. **1440 dark, 390 light, 320 light** ![chromium-1440-dark-toast.png](https://git.kayg.org/attachments/a8a63bed-0541-4663-8c3c-2d30473bd5d8) ![chromium-390-light-toast.png](https://git.kayg.org/attachments/bcd97f62-af54-4564-96ee-10f2eeded94e) ![chromium-320-light-toast.png](https://git.kayg.org/attachments/ec451830-7ac5-4a33-b6cb-8a79ec7e9a58) **Frame strip:** tools, then the toast, then Undo, then "Undone", then back to the tools ![chromium-toast-strip.png](https://git.kayg.org/attachments/f483df00-fb1e-4b0b-b577-aa8ea217b36f) ### Phone: on the keyboard The keyboard is faked through `visualViewport`. The bar's bottom edge sits exactly 8 px above the keyboard's top for the tools, the text bar and a toast. The test checks that number, not just the picture. The keyboard would cover everything below the toast. ![chromium-keyboard-closed.png](https://git.kayg.org/attachments/2b0ddeef-e002-4294-be63-2a4b8b2e62b6) ![chromium-keyboard-open.png](https://git.kayg.org/attachments/3f1d7ae5-5bae-4701-bbac-7834c79ac800) ![chromium-keyboard-text.png](https://git.kayg.org/attachments/d14d99f0-9d34-4883-a243-074613dfe8cc) ![chromium-keyboard-toast.png](https://git.kayg.org/attachments/7e449389-93e6-4a78-b050-0556597d18a8) ### WebKit Same layout and states. Headless WebKit on this machine draws no backdrop blur at all, with or without this change (I checked the bar with the halo switched off and it looks the same), so you can't judge the blur from these. They show where things sit. The real check is item 1 on the phone checklist below. ![webkit-1440-light-tools.png](https://git.kayg.org/attachments/a2d024e3-3357-446e-b2cc-2c2b2c794643) ![webkit-1440-dark-toast.png](https://git.kayg.org/attachments/a2629439-7772-4c8d-a5e3-7f0e0a878a5d) ![webkit-390-light-toast.png](https://git.kayg.org/attachments/6bd6fe39-ea58-4ee1-af99-f2fcff0f2991) ![webkit-keyboard-open.png](https://git.kayg.org/attachments/61e74313-21df-4fad-a45f-525201b6088d)
Author
Owner

Phone checklist for kayg (#145). Playwright can't drive a real iOS keyboard, so these are the parts only a phone can confirm. Check them on the preview build in Safari and in the installed app. Each line says what you should see.

Keyboard up

  1. Open today's note and tap into the text. The keyboard comes up. The bar (New/Log, Insert, Style, Info, </>) rises with it and settles just above iOS's form bar (^ v ✓), with a small gap. It shouldn't hide behind the keyboard or float halfway up the screen.
  2. Select a word. The bar morphs into the text bar (Text, B, I, S, code, highlight, link) in the same spot above the keyboard.
  3. Type on the last line of a long note. The line you're typing stays visible above the bar and never goes underneath it.
  4. Scroll the note while the keyboard is up. The bar stays put above the keyboard and doesn't drift or lag.
  5. Switch to the emoji keyboard, then back. The bar moves to the new keyboard height.
  6. Rotate to landscape with the keyboard up. The bar still sits on the keyboard.

Keyboard down
7. Tap ✓ on the form bar. The bar fades out right away, before the keyboard has finished sliding down. Then it fades back in at the bottom, above the home indicator.
8. Tap outside the text, or swipe back, to close the keyboard. You get the same: the bar never hangs mid-screen.

Toasts in the bar
9. With the keyboard up, delete a block (block bar, then the bin). The bar itself turns into "Block deleted" with Undo, still above the keyboard. Tap Undo. It says "Undone", then turns back into the tools. The keyboard should stay up.
10. Delete two blocks in different notes quickly. The second toast waits and shows after the first one. They never stack.
11. Keep your finger on a toast. It stays until you let go.

Other
12. Pinch-zoom the page. The bar shouldn't jump up as though a keyboard had opened.
13. Do 1, 7 and 9 again in the installed app (Home Screen).
14. Android Chrome, if you have one: steps 1 to 9. There the page itself shrinks for the keyboard, so the bar should simply be above it.

If anything is off, a screen recording is the most useful thing to send me, because the timing matters here.

**Phone checklist for kayg (#145).** Playwright can't drive a real iOS keyboard, so these are the parts only a phone can confirm. Check them on the preview build in Safari and in the installed app. Each line says what you should see. **Keyboard up** 1. Open today's note and tap into the text. The keyboard comes up. The bar (New/Log, Insert, Style, Info, `</>`) rises with it and settles just above iOS's form bar (^ v ✓), with a small gap. It shouldn't hide behind the keyboard or float halfway up the screen. 2. Select a word. The bar morphs into the text bar (Text, B, I, S, code, highlight, link) in the same spot above the keyboard. 3. Type on the last line of a long note. The line you're typing stays visible above the bar and never goes underneath it. 4. Scroll the note while the keyboard is up. The bar stays put above the keyboard and doesn't drift or lag. 5. Switch to the emoji keyboard, then back. The bar moves to the new keyboard height. 6. Rotate to landscape with the keyboard up. The bar still sits on the keyboard. **Keyboard down** 7. Tap ✓ on the form bar. The bar fades out right away, before the keyboard has finished sliding down. Then it fades back in at the bottom, above the home indicator. 8. Tap outside the text, or swipe back, to close the keyboard. You get the same: the bar never hangs mid-screen. **Toasts in the bar** 9. With the keyboard up, delete a block (block bar, then the bin). The bar itself turns into "Block deleted" with Undo, still above the keyboard. Tap Undo. It says "Undone", then turns back into the tools. The keyboard should stay up. 10. Delete two blocks in different notes quickly. The second toast waits and shows after the first one. They never stack. 11. Keep your finger on a toast. It stays until you let go. **Other** 12. Pinch-zoom the page. The bar shouldn't jump up as though a keyboard had opened. 13. Do 1, 7 and 9 again in the installed app (Home Screen). 14. Android Chrome, if you have one: steps 1 to 9. There the page itself shrinks for the keyboard, so the bar should simply be above it. If anything is off, a screen recording is the most useful thing to send me, because the timing matters here.
kayg closed this issue 2026-10-14 12:15:58 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal#145
No description provided.