Implement language picker expander as icon#10098
Conversation
changelog: Internal, Performance, Reduce number of image assets loaded in common layout
| <span id="language-picker-description-<%= unique_id %>" class="language-picker__label-text"> | ||
| <%= t('i18n.language') %> | ||
| </span> | ||
| <%= render IconComponent.new(icon: :expand_more, size: 3, class: 'language-picker__expander') %> |
There was a problem hiding this comment.
The specific use of the expand_more was intentional to enable reuse / caching with the same icon used in the banner for "Here's how you know".
There was a problem hiding this comment.
if we wanted we could make add some sort of regression spec that makes sure those two link the same image? to encode the goal in our specs
There was a problem hiding this comment.
That's an interesting thought, though I think it'd be tricky to implement in practice, since both load the image indirectly through CSS. I've been curious to use a bit more of the Chrome DevTools protocol like we did with browser emulation and that might be an option here (e.g. monitoring Network], but even with that could be hard to pinpoint what loads what.
| <span id="language-picker-description-<%= unique_id %>" class="language-picker__label-text"> | ||
| <%= t('i18n.language') %> | ||
| </span> | ||
| <%= render IconComponent.new(icon: :expand_more, size: 3, class: 'language-picker__expander') %> |
There was a problem hiding this comment.
if we wanted we could make add some sort of regression spec that makes sure those two link the same image? to encode the goal in our specs
🛠 Summary of changes
Updates footer language picker expander icon to use
IconComponent.This is a planned follow-on to #10065.
Why?
angle-arrow-*👀 Screenshots
expander.mov