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(readme-page): scrollbar not showing up on image load #321

Merged
merged 2 commits into from
Sep 7, 2022

Conversation

kyrie25
Copy link
Member

@kyrie25 kyrie25 commented Sep 6, 2022

weird, but works

Spotify_w4t27w2vJl

@kyrie25 kyrie25 requested a review from a team as a code owner September 6, 2022 14:03
@kyrie25 kyrie25 requested review from rxri and theRealPadster and removed request for a team September 6, 2022 14:03
Copy link
Member

@CharlieS1103 CharlieS1103 left a comment

Choose a reason for hiding this comment

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

Definitely use a mutation observer here, particularly because the page requires the readme to be fetched

@kyrie25
Copy link
Member Author

kyrie25 commented Sep 6, 2022

Definitely use a mutation observer here, particularly because the page requires the readme to be fetched

Fetching images are not DOM mutations, it doesn't work. The image element is already there but the image itself takes a longer time to be fetched and render.
image

particularly because the page requires the readme to be fetched

GitHub API returns a rendered .md in HTML format which has all textContent included but the Spotify client has to fetch the image itself since it only lists the URL in src. If the text doesn't overflow the container but after loading the images it does then MutationObserver can't do anything.

@kyrie25
Copy link
Member Author

kyrie25 commented Sep 6, 2022

I have also tried addEventListener("load", for the section part and each img element in the Readme also but the engine reports that it is loaded when it has actually not finished rendering.

@theRealPadster
Copy link
Member

How does it take so long to load?

@kyrie25
Copy link
Member Author

kyrie25 commented Sep 6, 2022

How does it take so long to load?

I have zero clue lmfao

@kyrie25 kyrie25 merged commit 6186ff4 into main Sep 7, 2022
@kyrie25 kyrie25 deleted the fix/readme-scrollbar branch September 7, 2022 04:19
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