Preview UI update#134
Merged
Merged
Conversation
- preview_live.html.heex: drop `trim: true` so gutter lines match
rendered code lines (regression: `"a\n\nb\n"` was counting 2 instead
of 4).
- preview_web.ex: remove dead `Phoenix.LiveView.Helpers` import — those
helpers moved to `Phoenix.Component` in LiveView 1.0.
- theme.js: drop unreachable `closest("[data-theme-toggle]")` branch in
`closeAllMenus`; the menu is a sibling of the toggle, not a descendant.
- app.html.heex: remove redundant `role="main"` on `<main>`.
- Run `mix format` on HEEx/component files.
The header and footer wordmarks rendered the full "hexpreview" string in bold. Move font-bold to just the "hex" prefix so the brand half pops and the product name renders in normal weight.
Bump makeup to 1.2 and add makeup_gleam + makeup_syntect to match hexpm's lexer coverage; drop makeup_html (hexpm doesn't ship it). makeup_eex stays since preview specifically renders .heex/.eex files. Replace the hand-rolled extension → lexer cond with Makeup.Registry.fetch_lexer_by_extension/1 so syntect's grammars (Rust, JS, TOML, JSON, YAML, …) light up automatically. Swap the inline lovelace stylesheet rendered server-side per request for hexpm's bundled GitHub Dark makeup.css, imported from app.css.
mix deps.unlock --check-unused (run in CI) flagged makeup_html as no longer referenced from mix.exs after the previous commit removed it from deps.
The bundled theme was hexpm's GitHub Dark colors (designed for hexpm's forced dark .highlight background). On preview pages pre.highlight is transparent so light-mode users saw #a5d6ff strings on white. Add GitHub Light token colors as the default and gate the dark palette behind [data-theme=dark].
- The solid Heroicons 24×24 sun has many tiny ray subpaths that render
fuzzy at 20px. Swap both the navbar toggle and the dropdown 'Light'
choice for the same outline (circle + 8 stroked rays) icon diff uses.
- The search form's phx-submit pointed at 'suggest', so pressing Enter
on an exact package name just re-ran the suggestion list. Add a
'submit' handler that, on an exact match against
Preview.Package.Store.get_names/0, sends the same {:search, name}
message used by the suggestion click handler — which loads versions
and renders the version selector.
Member
|
This is great! Thank you @paulo-valim 💜 |
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.
No description provided.