Add data-dictionary attribute to glossary-first handlebar - #2442
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9357171356
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| <div data-dictionary="{{dictionary}}"> | ||
| {{~> glossary-single . brief=../brief noDictionaryTag=../noDictionaryTag ~}} |
There was a problem hiding this comment.
Render term glossary-first from the definition context
For non-grouped term definitions this block is still in the root render context, so dictionary and . are not the term definition; the previous template passed definition explicitly. In that scenario {glossary-first} now emits an empty data-dictionary and an empty glossary/tag block (the updated test expectations include data-dictionary="" and <ul></ul>), which breaks ordinary term cards using this marker. Pass definition to glossary-single and read definition.dictionary here, and apply the same correction in the v77 upgrade template.
Useful? React with 👍 / 👎.
|
Lapis relies on the |
Using a div here instead of an
lisince this handlebar hasnt used that previously. A little bit wonky since thesingle-glossaryhandlebars do use anlieven though it's also only ever one glossary. Maybe that should be changed but outside the scope of this PR.