Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): fix footer link dimensions #1347

Merged
merged 1 commit into from
Nov 13, 2024
Merged

Conversation

koeaw
Copy link
Contributor

@koeaw koeaw commented Nov 5, 2024

Set display property of links in site footer
which are visualised by icons – which contain
images or tags for Material Symbols –
to inline-block to make them fit the icons'
dimensions. Prevents links that are smaller
in size than their visual content, which can
cause unexpected behaviour when hovering.

Solves one of the issues described in #1343.

@koeaw koeaw requested a review from gythaogg November 5, 2024 13:38
@koeaw koeaw force-pushed the kk/fix/footer_icon_link_sizing branch from 4dd81d8 to b95cdd4 Compare November 5, 2024 17:58
@b1rger
Copy link
Contributor

b1rger commented Nov 6, 2024

Can you explain in a bit more detail what this does? "unexpected behaviour when hovering" does not really explain what the problem is.

I tested the PR and I can not see any difference when interacting with the footer elements

@koeaw
Copy link
Contributor Author

koeaw commented Nov 6, 2024

Can you explain in a bit more detail what this does? "unexpected behaviour when hovering" does not really explain what the problem is.

From the issue:

A cursory inspection revealed the links themselves aren't the same size as the icons they surround; I'm assuming this contributes to or is the source of the issue.

When the size and/or positioning of containing and contained elements don't match, spillovers, overlays, offsets or areas without overlap can be the consequence. Users may not necessarily be aware of those until the elements are interacted with.

If a link does not cover the same area as its content, users may end up hovering/clicking/... in the wrong place. When tabbing, the border on the focussed element may look off. Etc.

footer_icons_link_mismatch

I can reword the commit message to be more neutral, e.g. change it to "Prevents links that are smaller in size than their visual content, which can cause unexpected behaviour when interacting with them.", but please let's not turn our frontend commits into frontend basics explainers. This commit message is already 3 times the length of the change itself.

Copy link
Contributor

@gythaogg gythaogg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good to me.

Perhaps in the commit message you meant "focus" instead of "hover" - that's when I would see a box around the link,

@b1rger
Copy link
Contributor

b1rger commented Nov 6, 2024

I'll merge this once I can reproduce the issue

@koeaw
Copy link
Contributor Author

koeaw commented Nov 6, 2024

Changes look good to me.

Thx.

Perhaps in the commit message you meant "focus" instead of "hover" - that's when I would see a box around the link,

I originally noticed on mouse hover – the link destinations would pop up/disappear in areas not 100% consistent with the images. The alternative wording I suggested above would cover any of these without being specific about them.

@koeaw koeaw force-pushed the kk/fix/footer_icon_link_sizing branch from b95cdd4 to d2d598d Compare November 6, 2024 15:47
@koeaw
Copy link
Contributor Author

koeaw commented Nov 6, 2024

Changed the last sentence to (slightly modified from above):
"Prevents links that are smaller different in size than their visual content, which can cause unexpected behaviour when they are interacted with."

@koeaw
Copy link
Contributor Author

koeaw commented Nov 6, 2024

I'll merge this once I can reproduce the issue

Ok.

@koeaw koeaw force-pushed the kk/fix/footer_icon_link_sizing branch from d2d598d to 69bcfb0 Compare November 7, 2024 11:07
Set the display property of the links in the site footer to
inline-block.

The links are visualised by icons which contain images or <span> tags
for Material Symbols.
If a link does not cover the same area as its content, users may end up
hovering/clicking/... in the wrong place. When tabbing, the border on
the focused element may look off.
The inline-block makes the links fit the icons' dimensions, which
prevents links that are smaller in size than their visual content.
@b1rger b1rger force-pushed the kk/fix/footer_icon_link_sizing branch from 69bcfb0 to 04dbab5 Compare November 13, 2024 10:20
@b1rger b1rger merged commit c2c5594 into main Nov 13, 2024
13 checks passed
@b1rger b1rger deleted the kk/fix/footer_icon_link_sizing branch November 13, 2024 10:21
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.

3 participants