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

<502> Remove jump when switching page #610

Merged
merged 3 commits into from
Apr 3, 2024

Conversation

federicobucchi
Copy link
Contributor

Motivation:

#502

The menu items shouldn't jump after changing pages

Modifications:

Added style in: assets/stylesheets/_screen.scss

Result:

The menu items are not shifting after the page change

Copy link
Contributor

@rauhul rauhul left a comment

Choose a reason for hiding this comment

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

looks pretty good, its a bit odd that the text visually expands from the top left corner but im not sure how easy that is to fix

Screen.Recording.2024-03-22.at.2.09.37.PM.mov

@federicobucchi
Copy link
Contributor Author

@rauhul I didn't even notice that. Can you please try now?

@federicobucchi
Copy link
Contributor Author

@swift-ci please test

Copy link
Contributor

@rauhul rauhul left a comment

Choose a reason for hiding this comment

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

nice! no jumping and expanding from the center, thanks for fixing this :D

Comment on lines +234 to +241
a::before {
display: block;
content: attr(data-text);
font-weight: bold;
height: 0;
overflow: hidden;
visibility: hidden;
}
Copy link
Member

Choose a reason for hiding this comment

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

Will screen readers pick this duplicate text up?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did test with VoiceOver and it doesn't pick the duplicate text

Copy link
Member

@alexandersandberg alexandersandberg left a comment

Choose a reason for hiding this comment

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

Side-effect:

Also, I feel like the drop-down arrow was better aligned before.

Before After
CleanShot 2024-03-26 at 18 45 36 CleanShot 2024-03-26 at 18 45 09

@federicobucchi
Copy link
Contributor Author

@alexandersandberg

fixed the arrow position and submenu items alignment

Before

Screenshot 2024-03-26 at 1 08 03 PM

After

Screenshot 2024-03-26 at 1 07 56 PM

@federicobucchi
Copy link
Contributor Author

@swift-ci please test

Copy link
Member

@kaishin kaishin left a comment

Choose a reason for hiding this comment

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

Using a pseudo-element is a clever trick. I am not convinced that bolding the active link is worth the trouble compared to other ways to visually differentiate the active link, but it solves the jumpiness problem for now 👍

@kaishin kaishin mentioned this pull request Mar 26, 2024
@federicobucchi
Copy link
Contributor Author

@swift-ci please test

@federicobucchi
Copy link
Contributor Author

@alexandersandberg can you please review so we can merge?

Copy link
Member

@alexandersandberg alexandersandberg left a comment

Choose a reason for hiding this comment

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

Apologies for the slow response — looks good!

@federicobucchi federicobucchi merged commit 8da0644 into main Apr 3, 2024
1 check passed
@federicobucchi federicobucchi deleted the fb/remove-jump-hover-menu branch April 3, 2024 19:00
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.

Show current page in nav bar
4 participants