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

Workaround community post slider dependency incorrectly calculating its size #4598

Merged
merged 1 commit into from
Jan 30, 2024

Conversation

absidue
Copy link
Member

@absidue absidue commented Jan 25, 2024

Workaround community post slider dependency incorrectly calculating its size

Pull Request Type

  • Bugfix

Related issue

closes #4486

Description

The dependency that we use for the image sliders in community posts, has a bug that makes its JavaScript severly miscalculate what size it should be, 33 million pixels wide to be exact. The workaround was taken from this issue on the swiper repository. Considering the maintainers response on that issue, it seems rather unlikely that the bug will ever get fixed (if that is really how flex and grid worked, how come every other item in the flex and grid layouts work just fine?), so I've decided to implement the proposed workaround.

Testing

Load the community tab on the subscriptions page, if you can see the posts instead of a blank page, the issue is solved.

Desktop

  • OS: Windows
  • OS Version: 10
  • FreeTube version: 0.19.1

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) January 25, 2024 18:42
@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Jan 25, 2024
Copy link
Collaborator

@kommunarr kommunarr left a comment

Choose a reason for hiding this comment

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

LGTM

@PikachuEXE
Copy link
Collaborator

I cannot reproduce blank page on dev (tried different widths)

Copy link
Member

Choose a reason for hiding this comment

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

Sometimes when the content is not fully loaded the page gets blank. In this clip you see 2 kind of blank pages.

  1. Blank page but community page border gets wider
  2. Blank page border stays normal

Im concerned about the first one. Is that related to the fix?

VirtualBoxVM_c7nlFZtLyn.mp4

Copy link
Member

Choose a reason for hiding this comment

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

lgtm

@FreeTubeBot FreeTubeBot merged commit 205924c into FreeTubeApp:development Jan 30, 2024
5 checks passed
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Jan 30, 2024
@absidue absidue deleted the community-post-slider branch January 30, 2024 06:17
PikachuEXE added a commit to PikachuEXE/FreeTube that referenced this pull request Feb 3, 2024
* development: (92 commits)
  Make video info section more concise (FreeTubeApp#4338)
  Playlist performance improvements (FreeTubeApp#4597)
  ! Fix playlist type not passed when playing next/prev item in a user playlist (FreeTubeApp#4623)
  Properly localize playlist view and video counts (FreeTubeApp#4620)
  Translated using Weblate (Croatian)
  Translated using Weblate (German)
  Translated using Weblate (Croatian)
  Fix search bar handling of Invidious channel URLs (FreeTubeApp#4568)
  Local API: List related games in featured channels section (FreeTubeApp#4562)
  Workaround community post slider dependency incorrectly calculating its size (FreeTubeApp#4598)
  Add support for viewing movie trailers with local api (FreeTubeApp#4391)
  Bump the eslint group with 2 updates (FreeTubeApp#4616)
  Translated using Weblate (French)
  Translated using Weblate (Finnish)
  Bump electron from 28.1.4 to 28.2.0 (FreeTubeApp#4611)
  Translated using Weblate (French)
  Bump the eslint group with 4 updates (FreeTubeApp#4581)
  Bump lefthook from 1.6.0 to 1.6.1 (FreeTubeApp#4608)
  Bump marked from 11.1.1 to 11.2.0 (FreeTubeApp#4612)
  Bump webpack from 5.89.0 to 5.90.0 (FreeTubeApp#4610)
  ...
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.

[Bug]: Community tab in subscriptions is broken.
6 participants