Skip to content

feat: examples pack catalog + pack builder + sidebar UX#4

Merged
BrainRTP merged 1 commit intomainfrom
task/examples-pack
May 1, 2026
Merged

feat: examples pack catalog + pack builder + sidebar UX#4
BrainRTP merged 1 commit intomainfrom
task/examples-pack

Conversation

@BrainRTP
Copy link
Copy Markdown
Collaborator

@BrainRTP BrainRTP commented May 1, 2026

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.

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
@BrainRTP BrainRTP force-pushed the task/examples-pack branch from 18ea1d2 to 1465499 Compare May 1, 2026 12:37
@BrainRTP BrainRTP merged commit 7d2766b into main May 1, 2026
2 checks passed
@BrainRTP BrainRTP deleted the task/examples-pack branch May 1, 2026 12:38
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