Skip to content

docs(components): enable and document the resizable example preview#118

Merged
markdumay merged 3 commits into
mainfrom
feat/example-resize-grip
Jul 14, 2026
Merged

docs(components): enable and document the resizable example preview#118
markdumay merged 3 commits into
mainfrom
feat/example-resize-grip

Conversation

@markdumay

Copy link
Copy Markdown
Contributor

Companion to gethinode/hinode#2019, which added the resize argument to the example shortcode. Requires Hinode ≥ v3.2.0.

What this does

Documents the feature. Adds a "Resizable preview" section to components/example.md telling readers the corner is draggable — and, crucially, stating what the grip does not do:

The grip demonstrates fluid reflow — content wrapping, text truncation, tables gaining a scrollbar, images scaling. It does not trigger responsive breakpoints. Bootstrap 5's responsive classes (navbar-expand-*, col-md-*, and similar) are viewport media queries, so they respond to the size of the browser window, not the size of the preview.

Without that, the feature over-promises: a reader drags a navbar preview, nothing collapses, and they reasonably conclude the theme is broken.

Enables the grip on six pages, one representative example each: navs-and-tabs, breadcrumb, table, image, carousel, card.

Why those six, and not the others

A component is eligible only if narrowing its container produces real reflow via flex-wrap or intrinsic sizing. Verified against Bootstrap's own SCSS, then measured in a browser:

Component Measured on narrowing Clipped?
navs-and-tabs .nav has flex-wrap: wrap — tabs wrap 1 → 2 → 3 rows No
breadcrumb flex-wrap: wrap — wraps 2 → 3 → 4 rows No
table .table-responsive scroller tracks the container No
image img-fluid scales 326 → 150 → 100px No
carousel scales 326 → 200 → 100px, ratio preserved No
card reflows, height adjusts No

Rejected, with reasons:

  • navbarnavbar-expand-* compiles to a viewport media query, so the grip squeezes the navbar without ever collapsing it into the toggler. This is Bootstrap's own showcase for the feature, and on Bootstrap 5 it is the single most misleading place we could put a grip.
  • card-group, timeline — driven by viewport media queries; they would sit frozen at their desktop layout while shrinking.
  • button-group, pagination — no flex-wrap, so they get clipped by the overflow: hidden that resize requires.
  • tooltip, popover, toast, modal, dropdown — overlays escaping the preview box get clipped.
  • map — Leaflet needs invalidateSize() on container resize and would render broken.
  • badge, kbd, abbr, mark, spinner, icon — nothing to see.

Both JS-managed risks were checked in a browser: neither the DataTables integration nor the Bootstrap carousel caches its layout, so no JavaScript redraw is needed.

Merge order

Hinode v3.2.0 is released and carries the argument, so this is safe to merge. Note go.mod has no require on hinode, so nothing enforces the floor — a site on an older Hinode that bumps mod-docs alone will fail loudly (unsupported argument 'resize', build exits 1) rather than silently. Worth stating the v3.2.0 minimum in the release notes.

🤖 Generated with Claude Code

markdumay and others added 3 commits July 14, 2026 11:39
Adds a resize grip to one representative example per page, where narrowing the container
produces real reflow: navs-and-tabs, breadcrumb, table, image, carousel, and card.

Navbar is deliberately excluded despite being Bootstrap's own showcase for the feature.
On Bootstrap 5, navbar-expand-* is a viewport media query, so the grip would squeeze the
navbar without ever collapsing it into the toggler.

Requires the resize argument added in Hinode v3.1.0.
Add a Resizable preview section to content/components/example.md, in
the same Preview/Input style as the show-markup and show-preview
sections. Clarifies that the grip demonstrates fluid reflow only and
does not trigger Bootstrap's viewport-based responsive breakpoints.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Marks the section with v3.2.0, the release that actually shipped the resize argument.
Matches the per-section release badges used elsewhere (e.g. breadcrumb frontmatter).
@markdumay markdumay merged commit 5da1ba5 into main Jul 14, 2026
8 checks passed
@markdumay markdumay deleted the feat/example-resize-grip branch July 14, 2026 12:42
@markdumay

Copy link
Copy Markdown
Contributor Author

🎉 This PR is included in version 1.15.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant