Skip to content

Migrate svg_icon middleware to return web component - #9132

Merged
anselmbradford merged 18 commits into
mainfrom
ans_icon_wc
Aug 5, 2026
Merged

Migrate svg_icon middleware to return web component#9132
anselmbradford merged 18 commits into
mainfrom
ans_icon_wc

Conversation

@anselmbradford

@anselmbradford anselmbradford commented Jul 1, 2026

Copy link
Copy Markdown
Member

Changes

  • Migrate svg_icon middleware to return web component.

How to test this PR

  1. yarn build and places where the icon appears should look the same as the production site.

In particular:

@anselmbradford
anselmbradford force-pushed the ans_icon_wc branch 9 times, most recently from 5f2c897 to 8123d8e Compare July 1, 2026 19:25
@anselmbradford
anselmbradford marked this pull request as ready for review July 1, 2026 19:40
@wpears

wpears commented Jul 1, 2026

Copy link
Copy Markdown
Member

I notice that the icons in grad path seem to be ~4px lower than on prod. Is that intentional/known?

@anselmbradford

Copy link
Copy Markdown
Member Author

I notice that the icons in grad path seem to be ~4px lower than on prod. Is that intentional/known?

Hmm which icons? I didn't see a 4px offset, but I did notice I needed to add temporary styles for the wc icon inside the non-wc form alert, which can be removed if/when the alert is moved to a wc. 57df3f1

@wpears

wpears commented Jul 1, 2026

Copy link
Copy Markdown
Member

Hmm which icons?

Huh, I retested and this is gone, maybe I hadn't hard refreshed. Sorry for the noise!

@wpears

wpears commented Jul 1, 2026

Copy link
Copy Markdown
Member

I will note, though, that on http://localhost:8000/rural-or-underserved-tool/ if you show / hide the map, after once cycle "show map" no longer gets the + icon.

@anselmbradford

Copy link
Copy Markdown
Member Author

I will note, though, that on http://localhost:8000/rural-or-underserved-tool/ if you show / hide the map, after once cycle "show map" no longer gets the + icon.

Fixed in ade7a8b

I noticed that the show/hide toggle link has a no-decoration class that isn't applying presently. I left that the way it is, but the original design looks like it shouldn't have an underline. That whole toggle should be refactored to be a button.

@anselmbradford

Copy link
Copy Markdown
Member Author

Pushed up a little change in b971470 because I realized you can click in the gap between the text and icon and throw things off.

@anselmbradford

Copy link
Copy Markdown
Member Author

Heading out on OOO. Feel free to merge this in if the bewds are good with the backend changes ✌️ 🇺🇸 ✌️

# Conflicts:
#	cfgov/unprocessed/js/routes/common.js
# Conflicts:
#	cfgov/unprocessed/js/routes/common.js
Comment thread cfgov/core/templatetags/svg_icon.py Outdated
Comment thread cfgov/core/templatetags/svg_icon.py Outdated
Comment thread cfgov/core/templatetags/svg_icon.py Outdated
Comment thread cfgov/core/utils.py Outdated
Comment thread cfgov/core/tests/middleware/test_middleware.py Outdated
anselmbradford and others added 6 commits July 29, 2026 17:12
Co-authored-by: Andy Chosak <andy.chosak@cfpb.gov>
Co-authored-by: Andy Chosak <andy.chosak@cfpb.gov>
Co-authored-by: Andy Chosak <andy.chosak@cfpb.gov>
Co-authored-by: Andy Chosak <andy.chosak@cfpb.gov>
Comment thread cfgov/cfgov/settings/test.py Outdated
Comment thread cfgov/cfgov/settings/test.py Outdated
@anselmbradford
anselmbradford added this pull request to the merge queue Aug 5, 2026
Merged via the queue into main with commit cbaa3b0 Aug 5, 2026
16 of 17 checks passed
@anselmbradford
anselmbradford deleted the ans_icon_wc branch August 5, 2026 18:40
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.

4 participants