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

#2033 - Comment area covered by record name #2290

Merged
merged 3 commits into from
Dec 7, 2023

Conversation

EthanW96
Copy link
Collaborator

@EthanW96 EthanW96 commented Dec 5, 2023

Add scroll-margin-top property to comment-activity-section to offset the fixed header nav bar covering the comment area.

This css property has good browser coverage according to caniuse and csstricks suggests using it. I'm welcome to other suggestions though if alternatives exist I'm not aware of.

#2033

@corsacca corsacca linked an issue Dec 6, 2023 that may be closed by this pull request
@corsacca
Copy link
Member

corsacca commented Dec 6, 2023

Thanks @EthanW96 !

With 60px i get:
image

Changing scroll-margin-top to 160px seems better:
image

It might depend on the size of the top second nav bar?
image

@EthanW96
Copy link
Collaborator Author

EthanW96 commented Dec 6, 2023

Yeah it appears so. Do we want to overestimate at 160px (or a bit higher)? Or try something more programmatic?

@corsacca
Copy link
Member

corsacca commented Dec 6, 2023

THanks @EthanW96 !
How does the 160px make it look for you? I'm assuming different browsers and sizes could be playing in to this.

@EthanW96
Copy link
Collaborator Author

EthanW96 commented Dec 6, 2023

@corsacca Yeah, so Chrome 119.0.6045.200 and Firefox 120.0.1 on my laptop using dev tools (425px wide) and my cell running Chrome 119.0.6045.193 on Android 13 all give me the same thing at 160px:
image

When the top second nav bar is shown on a device 320px or less I get a bit of overlap even at 160px. I emulated this using Chrome dev tools and setting the window width to a "Mobile S" device (320px wide) and even at 160px I get a bit of overlap:
image

Do we need a few breakpoints to resolve this properly? Are you finding 60px works for larger mobile devices?

@corsacca
Copy link
Member

corsacca commented Dec 7, 2023

This is likely a browser thing instead of a screen size issue.
For 60px (this should be correct).
Using responsible dev tools and window resize i get on brave on mac:
image

Much better using firebox:
image

@corsacca
Copy link
Member

corsacca commented Dec 7, 2023

Actually. On brave on a live website scroll-margin-top: 60px; works great. MIght just be my local dev.

@corsacca
Copy link
Member

corsacca commented Dec 7, 2023

@EthanW96 lets go with the 60px version

@EthanW96
Copy link
Collaborator Author

EthanW96 commented Dec 7, 2023

@corsacca awesome! I've set it to 60px.

@corsacca
Copy link
Member

corsacca commented Dec 7, 2023

Thank you @EthanW96!

@corsacca corsacca merged commit 9f1de54 into DiscipleTools:develop Dec 7, 2023
2 checks passed
@EthanW96 EthanW96 deleted the ethan-issue-2033 branch January 31, 2024 11: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.

Comment area covered by record name
2 participants