Add 10 lucide icons and replace their legacy image consumers - #13424
Closed
lokesh wants to merge 4 commits into
Closed
Add 10 lucide icons and replace their legacy image consumers#13424lokesh wants to merge 4 commits into
lokesh wants to merge 4 commits into
Conversation
Staged ahead of the replacement work so the sprite already carries them when each legacy image swap lands. No references yet; the sprite build auto-discovers everything under static/icons/src/. Claude-Session: https://claude.ai/code/session_01RtTEd3rAHJYz3zKi3zUWwD
lokesh
added a commit
to lokesh/openlibrary
that referenced
this pull request
Aug 25, 2026
The 17 lucide additions had ridden along in the ol-button commit with nothing consuming them; they now land via internetarchive#13424 instead. Claude-Session: https://claude.ai/code/session_01RtTEd3rAHJYz3zKi3zUWwD
lock, octagon-x, and plus targeted CSS rules that turn out to be dead (page-plain message boxes, .addAnother); star belongs to the rating-widget rewrite; bell, download, and shopping-cart belong to the PNG sprite-sheet teardown. Each lands with the PR that wires it up. Claude-Session: https://claude.ai/code/session_01RtTEd3rAHJYz3zKi3zUWwD
page-plain's message/alert/stop/info boxes serve only the DAISY page, which uses none of them; div.verify came from a template that no longer exists; button.addAnother has no consumer anywhere. Claude-Session: https://claude.ai/code/session_01RtTEd3rAHJYz3zKi3zUWwD
Flash messages, edit-page alerts, and the not-logged notice render type-mapped sprite icons in markup; merge surfaces (author banners, authors-search prompt, facet head) use git-merge; the author-edit help img, lists CTA heart, covers trash/saved, dropper listen, audiobook button, and team-page links move to macros.icon or ol-icon; external CTAs get a trailing square-arrow-out-up-right glyph. Three sites keep CSS-drawn glyphs as masked pseudo-elements because no template owns their markup: jQuery UI dialog paragraphs, the preview button's book, and the cover-sort drag affordance. The legacy images themselves stay on disk so patch deploys keep working (binary deletions break git apply on the .diff endpoint); a follow-up chore deletes them once this lands. Claude-Session: https://claude.ai/code/session_01RtTEd3rAHJYz3zKi3zUWwD
Collaborator
Author
|
Scrapping this approach for now. Final state was lokesh/openlibrary@b2cee0eb5 if we ever want to revisit. |
lokesh
added a commit
that referenced
this pull request
Aug 25, 2026
* Delete 50 legacy image files replaced by the icon system 21 of these were replaced by sprite icons in #12955; the other 29 have had no references in the codebase for years and turned up while auditing. Verified none of the 50 is referenced from any template, JS, CSS or Python on the icon-system branch. Split out of #12955 so that PR carries no binary content: GitHub's .diff omits binary data, so a patch deploy of a PR containing binary deletions aborts unless it passes --exclude=static/images/*. This one never needs to reach testing, so the flag stops mattering. Merge after #12955. Claude-Session: https://claude.ai/code/session_01Lv9GuFfV3JRG7hmKGmN1t4 * Replace the list delete trashcan link with an ol-button The delete/remove control on list pages was an anchor with a sprite-image trashcan; it now uses ol-button with the trash icon, which lets the last of the legacy image files go. On a list's own page the button moves into the CTA column under the lending button and dropper, so the dropper's ad-hoc margin and its 50px reservation for the absolutely positioned control give way to a single flex gap owning the rhythm. Claude-Session: https://claude.ai/code/session_01NmxEn3FtZunApjLZAW78wo * Move the unreferenced phase-2 icon set out to its own PR The 17 lucide additions had ridden along in the ol-button commit with nothing consuming them; they now land via #13424 instead. Claude-Session: https://claude.ai/code/session_01RtTEd3rAHJYz3zKi3zUWwD * Point the service-worker fixture at a surviving image The matcher test used the now-deleted barcode_scanner.svg as its sample path. Claude-Session: https://claude.ai/code/session_01RtTEd3rAHJYz3zKi3zUWwD * Scope the empty check-in-container rule to list pages The grid variant applied to every .list-books--grid (search results, author pages, reading log), not just list seeds. Claude-Session: https://claude.ai/code/session_01RtTEd3rAHJYz3zKi3zUWwD * Move the ol-button trashcan swap to its own PR Restores the list templates, JS, and CSS to master and keeps back_list-trash.png, whose last reference lives until #13425 lands. This PR is back to being a pure deletion of unreferenced files. Claude-Session: https://claude.ai/code/session_01RtTEd3rAHJYz3zKi3zUWwD * Keep read aloud.svg: buttonCta.css still references it URL-encoded The audit grep missed the %20-encoded url() in buttonCta.css:39, so deleting the file would blank the open-access audiobook button icon. It goes once that button is on the sprite (icons/chore/phase2-icon-set). Claude-Session: https://claude.ai/code/session_01RtTEd3rAHJYz3zKi3zUWwD
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.
Phase 2 of the icon-system migration (#12955): adds the sprite icons the legacy-icon audit called for, and switches every live consumer of the corresponding legacy images over to them in the same PR.
Icons added (10)
triangle-alert·info·circle-help·git-merge·headphones·map-pin·book-open·grip-vertical·square-arrow-out-up-right·heartSeven icons from the original audit list were dropped:
lock,octagon-x, andplustargeted CSS rules that turned out to be dead (deleted here instead);starbelongs to the rating-widget rewrite;bell,download, andshopping-cartbelong to the PNG sprite-sheet teardown. Each lands with the PR that wires it up.Surfaces switched
site/body.htmland the hand-rendered boxes on login, signup, book edit): type-mapped icons — error →triangle-alert, info/note →info, success →circle-check. The old CSS showed a checkmark for every non-error type, including info.#preMerge/#postMerge/#errorMergebanners, the authors-search "Merge authors" prompt, and the search-facet "Merge duplicates" link (previously a Python-built string, now template markup).headphones, "Locate" →map-pin, audiobook button →headphones(was the one-offread aloud.svg), and allcta-btn--externalbuttons get a trailingsquare-arrow-out-up-rightinstead of a background image.trash, "Saved!" →circle-check, sortable-area affordance →grip-vertical.circle-help), lists landing CTA (heart), not-logged notice + edit-page alert banners (info), team-page links (ol-iconglobe/book-open).Three sites keep CSS-drawn glyphs as masked pseudo-elements because no template owns their markup: jQuery UI dialog paragraphs, the preview button's book glyph (was a
mask:ofopen-book.svg), and the cover-sort drag affordance.Dead code deleted along the way
page-plain.css's four message boxes (only the DAISY page loads that bundle, and it uses none of them),div.verify(template no longer exists), andbutton.addAnother(no consumer anywhere).What this PR does NOT do
git applyon GitHub's.diff, see Delete 68 legacy image files no longer referenced anywhere #13329). A follow-up chore deletes them once this lands.stars.png(rating widget) and the tier-3 PNG sprite sheets (icons_sprite*.png,icons_lists.png) are separate follow-ups.Testing
Verified on local dev: login flash box, lists CTA, search-result Locate buttons, Preview book mask, facet-head merge link, authors-search merge prompt, author-edit help icon, not-logged notice, and the sprite containing exactly the 10 new symbols.
pre-commit(stylelint, eslint, i18n, unused-templates) passes on all changed files.Note for reviewers
Found while auditing:
buttonCta.cssreferencedread aloud.svgURL-encoded (read%20aloud.svg), which the #13329 deletion sweep missed; that file is restored there and its consumer switched to the sprite here.