Skip to content
This repository was archived by the owner on Apr 8, 2026. It is now read-only.

Improve mobile toolbar layout and regenerate web example/x libraries#67

Merged
Vbitz merged 3 commits into
mainfrom
t3code/mobile-button-layout-fontsize
Mar 7, 2026
Merged

Improve mobile toolbar layout and regenerate web example/x libraries#67
Vbitz merged 3 commits into
mainfrom
t3code/mobile-button-layout-fontsize

Conversation

@Vbitz

@Vbitz Vbitz commented Mar 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Regenerated web/examples-library.js with updated embedded examples for the web workspace.
  • Added generated web/x-library.js with x/* package sources for browser-side library loading.
  • Improved mobile toolbar behavior in web/index.html by stacking controls, enabling wrapping/flex sizing, and preventing button overflow.
  • Tuned mobile file panel readability with adjusted header, tree, and icon font/padding sizes.

Testing

  • Not run (tests/build targets were not executed in this change context).
  • Verified diff scope includes only generated library artifacts and responsive CSS/layout updates in web/index.html.

Vbitz added 2 commits March 7, 2026 16:19
- add auto-generated `examples-library.js` and `x-library.js` for bundled examples/x packages
- refine mobile toolbar flex behavior and button sizing to prevent overflow
- increase mobile file panel/tree font sizing and touch target spacing
- Delete committed `web/examples-library.js` and `web/x-library.js`
- Add both generated files to `web/.gitignore` so they stay untracked
@greptile-apps

greptile-apps Bot commented Mar 7, 2026

Copy link
Copy Markdown

Greptile Summary

This PR improves mobile responsiveness of the web workspace UI by switching the toolbar to a stacked column layout on mobile, adds responsive sizing for the file panel, and ships two new auto-generated library files (examples-library.js and x-library.js) that embed Go example sources and x/* package sources for browser-side loading.

Key changes and findings:

  • web/index.html: #toolbar gains flex-direction: column on ≤768 px, making it significantly taller than the previous row layout. The #tags-panel and #targets-panel fixed-position dropdown panels retain a hardcoded top: 82px that was sized for the old single-row toolbar and will likely overlap the new taller toolbar.
  • #btn-targets gets text-overflow: ellipsis + overflow: hidden but no explicit white-space: nowrap; while most browsers default buttons to nowrap, this should be made explicit.
  • web/examples-library.js and web/x-library.js are fully auto-generated and carry the // Auto-generated - do not edit header; content looks correct and consistent with the repository's Go examples and x/ packages.
  • Testing was not performed per the PR description — the dropdown panel overlap regression should be verified manually on a mobile viewport.

Confidence Score: 3/5

  • Mostly safe but the hardcoded dropdown panel top offset should be verified against the new taller column toolbar on mobile before merging.
  • The two generated JS files are low-risk. The HTML change is straightforward responsive CSS but introduces a likely layout regression: the dropdown panels' fixed top:82px was calculated for the old row toolbar and will need to be bumped to clear the new taller column-stacked toolbar on ≤768px viewports.
  • web/index.html — specifically the #tags-panel and #targets-panel top:82px values in the @media (max-width: 768px) block.

Important Files Changed

Filename Overview
web/index.html Mobile toolbar CSS updated to stack controls using flex-direction:column; dropdown panels retain hardcoded top:82px that may no longer clear the taller toolbar.
web/examples-library.js Auto-generated file embedding Go example sources; no logic changes, safe to merge.
web/x-library.js Auto-generated file embedding x/* package sources (asm, comptime, windows console/winui); no logic changes, safe to merge.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    VP["Viewport width"] -->|"> 768px"| DT["Desktop toolbar\nflex-direction: row\ntop: 42px fixed height"]
    VP -->|"≤ 768px"| MB["Mobile toolbar\nflex-direction: column\nheight: auto (NEW)"]
    MB --> TL["toolbar-left row\n~30-35px"]
    MB --> TB["#toolbar-buttons row\n~30-35px"]
    MB --> PAD["padding: 8px top + 8px bottom"]
    TL & TB & PAD --> TH["Estimated toolbar height\n~80-100px"]
    TH -->|"Panels open"| PP["#tags-panel / #targets-panel\ntop: 82px (UNCHANGED)"]
    PP -->|"top ≤ toolbar height"| OVR["⚠️ Panel overlaps toolbar"]

    DT -->|"Panels open"| DP["#tags-panel / #targets-panel\ntop: 42px"]
    DP --> OK["✅ Clears toolbar"]
Loading

Comments Outside Diff (1)

  1. web/index.html, line 989-1000 (link)

    Dropdown panels may overlap taller column-stacked toolbar

    This PR changes #toolbar on mobile to use flex-direction: column, which makes the toolbar significantly taller than it was before (when it was a single row with align-items: flex-start). However, #tags-panel and #targets-panel are still positioned with a hardcoded top: 82px.

    With the new column layout, the stacked toolbar (title row + toolbar-left row + toolbar-buttons row, each ~30–35px, plus 8px top/bottom padding) can easily exceed 82px in height. This means the dropdown panels will open partially underneath the toolbar rather than clearly below it.

    The top values for both panels should be updated to account for the new taller toolbar height, or ideally use a CSS custom property/calc() that tracks the actual toolbar height:

Last reviewed commit: 1ca88d4

Comment thread web/index.html
- Compute `--floating-panel-top` from toolbar/mobile toggle bounds in JS
- Use the CSS variable for tags/targets panel `top` instead of fixed values
- Keep toolbar title text on one line to avoid layout shifts on small screens
@Vbitz Vbitz added this pull request to the merge queue Mar 7, 2026
Merged via the queue into main with commit 29707c0 Mar 7, 2026
14 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant