Skip to content

Group the All segment by leading bottle instead of by method - #125

Merged
cjimti merged 1 commit into
mainfrom
all-by-dominant-bottle
Sep 13, 2026
Merged

cjimti merged 1 commit into
mainfrom
all-by-dominant-bottle

Conversation

@cjimti

@cjimti cjimti commented Sep 13, 2026

Copy link
Copy Markdown
Owner

The All segment on the Menu now lists drinks under the bottle each one is mostly made of, one heading per bottle in bar.json order, instead of Stirred / Shaken / Built with printed families under them. The method segments and Shapes are unchanged.

Changes

  • assets/app.js: leadBottle picks each drink's leading bottle from its build at boot (leadBy). A base spirit outranks vermouth and modifiers, the largest ounce pour wins within a rank, a tie goes to the first pour, and a drink with none of those kinds falls back to its first pour so it is never left off All. menuSections is split into patternSections, bottleSections and methodSections. sectionHead omits the blurb when it is empty.
  • assets/app.css: a drink directly under the section rule gets the same top margin as one under a blurb.
  • scripts/app.test.mjs: cases for the leading bottle (So So Cocktail, Corpse Reviver No. 1, Vieux Carre, French 75, Bamboo, Bitter Giuseppe, a juice-only build), every drink appearing once under All, and Stirred keeping its family headings.
  • CLAUDE.md: the Families section describes the All grouping and the rule.

family on the cocktail data is untouched. No ids, bits or link formats change.

Headings on the full menu

Gin 49, Bourbon 21, Rye 18, Scotch 8, Cognac 12, Apple brandy 5, Aged rum 9, Light rum 14, Tequila 7, Vodka 11, Mezcal 6, Cachaça 5, Sweet vermouth 3, Dry vermouth 5, Campari 4, Absinthe 1, Cynar 1, Sherry 5, Fernet 1.

Checked

  • make verify passes.
  • Headless Chrome at 390px, dark and light: bottle headings under All, Stirred still shows family headings.
  • Print to PDF in Chrome: two columns under bottle headings. The left-edge clip in that PDF is the same on main.

Not checked

  • The WebKit print split (PRINT_SPLIT). Its weights still count every section heading as having a blurb, so the cut there may sit slightly off balance.

assets/app.js: leadBottle picks each drink's leading bottle from its build at boot (leadBy). A base spirit outranks vermouth and modifiers, the largest ounce pour wins within a rank, a tie goes to the first pour, and a drink with none of those kinds falls back to its first pour. menuSections is split into patternSections, bottleSections and methodSections; All renders one section per leading bottle in bar.json order with no blurb, and the method segments keep method then printed family. sectionHead omits the blurb paragraph when it is empty.

assets/app.css: a drink directly under the section rule gets the same top margin as one under a blurb.

scripts/app.test.mjs: cases for the leading bottle (So So Cocktail, Corpse Reviver No. 1, Vieux Carre, French 75, Bamboo, Bitter Giuseppe, a juice-only build), every drink appearing once under All, and Stirred keeping its family headings.

CLAUDE.md: the Families section describes the All grouping and the rule behind it.
@cjimti
cjimti merged commit eea968f into main Sep 13, 2026
1 check passed
@cjimti
cjimti deleted the all-by-dominant-bottle branch September 13, 2026 08:18
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