feat: examples pack catalog + pack builder + sidebar UX#4
Merged
Conversation
A catalog of 90 ready-to-use AbstractMenus example menus (45 EN +
45 RU mirror), each with its own docs page, syntax-highlighted code,
metadata badges, and one-click downloads. Plus tooling: per-menu
zip download, multi-select Pack Builder for custom bundles, sidebar
state persistence.
Catalog
-------
11 categories covering the breadth of the plugin: shops, hub-and-nav,
cosmetics, donate, casino-and-games, kits-and-rewards, admin-tools,
info-pages, state-and-vars, world-integrations, snippets.
Each menu folder ships menu.conf (canonical AbstractMenus 2.0+ HOCON)
+ meta.json (machine-readable metadata, excluded from zip downloads)
+ optional templates.conf. EN canonical, RU is a string-translated
mirror with structure and HOCON keys preserved.
Coverage spans every major feature: money/takeMoney/itemAdd shops,
multi-menu files via menus { }, template substitution + lore extension,
temporal vars (::1d) with %varpt% placeholder, dual-item display via
existVarp / permission rules, regionJoin (WorldGuard), setSkin,
AnimatedMenu frames + onAnimEnd + randActions, draggable slots +
placedItem + placeItem + removePlaced + setButton, oneof rule for
conditional transformation, GeneratedMenu + PLAYERS catalog + matrix
templates, click types (left/right/shift_left), pagination, openBook
URLs, lpMetaSet/Remove, addGroup/removeGroup, command activator with
ame_ prefix to avoid colliding with user commands.
Components
----------
src/components/MenuMeta.astro - badge row (level + features + deps)
plus an Open: <code>/cmd</code> + copy button (ant-design style:
ghost icon, tooltip on hover, swaps to checkmark on copy with success
color, pinned tooltip during 1.5s feedback window).
src/components/MenuExample.astro - integrates MenuMeta + Code
(HOCON syntax highlighting via existing tmLanguage grammar) + tabbed
view when both menu.conf and shared/local templates exist + DownloadCard.
src/components/DownloadCard.astro - single-file download via Vite
?url import + JSZip bundle download with INSTALL.txt (locale-aware).
src/components/PackBuilder.astro - multi-select UI for building custom
zip bundles. Categories collapsed by default with chevron disclosure
markers, per-category open state persisted to localStorage. Sticky
header with Select all / Select none / live count / Build pack and
a chevron expand/collapse-all icon button.
src/components/CategoryIndex.astro - auto-generated table for category
landing pages: name (linked) + level badge + features + dependencies +
command, sorted by meta.order.
Wiki integration
----------------
- 11 category index.mdx pages (EN + RU) with sidebar.order: 0 so
they appear first in their group, using the CategoryIndex component
- 45 per-menu MDX docs pages (EN) + 45 RU mirrors with translated prose
- Root examples/index.mdx (EN + RU) - CardGrid landing
- Pack Builder page at /examples/builder/ (EN + RU)
- Existing src/examples/ folder removed; old general/examples.mdx pages
rewritten as redirect-style CardGrid landings preserving URLs
- Custom HOCON syntax highlighting from src/grammars/hocon.tmLanguage.json
carries over
Sidebar UX
----------
- All sidebar groups (top-level + nested in Examples) configured with
collapsed: true so the sidebar opens compact. Active page's group
auto-opens via Starlight's built-in detection.
- Inline head script persists per-group open/closed state to
localStorage (key: ame-sidebar-groups) - survives page reloads and
language switches.
- Floating action button anchored to bottom-right of sidebar pane:
round 2.25rem button with subtle elevation shadow, chevron icon
swaps between expand-all / collapse-all states, tooltip slides out
to the left with arrow pointing at the FAB. Toggle-all click flips
every group + saves new state.
i18n
----
Three component-level inline t.en/t.ru dictionaries (MenuMeta,
DownloadCard, PackBuilder). Locale-aware INSTALL.txt for both
single-menu and Pack Builder downloads. Backlog item filed for
extracting to src/i18n/strings.ts when 3rd language or 5+ components
appear (Obsidian: Projects/AbstractMenus/backlog/2026-05-01-wiki-i18n-string-table).
Tech stack
----------
Astro 6.1.9 + Starlight 0.38.4 + MDX 5.0.4. JSZip for client-side
bundle generation. No new dependencies for icons - inline Lucide-style
SVG. Build: 183 pages, 0 errors. Production downloads handled via
Vite ?url imports with auto-inlining for small files (data: URLs)
and hashed asset emission for larger ones.
Specs and plans
---------------
- Obsidian: Projects/AbstractMenus/specs/2026-04-30-examples-pack-design.md
- Plan: Projects/AbstractMenus/plans/2026-04-30-examples-pack-phase1-infrastructure.md
18ea1d2 to
1465499
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A catalog of 90 ready-to-use AbstractMenus example menus (45 EN + 45 RU mirror), each with its own docs page, syntax-highlighted code, metadata badges, and one-click downloads. Plus tooling: per-menu zip download, multi-select Pack Builder for custom bundles, sidebar state persistence.