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

[Bug]: Search Bar Off Center #5540

Open
5 of 6 tasks
deepspaceaxolotl opened this issue Aug 7, 2024 · 18 comments · Fixed by #5773
Open
5 of 6 tasks

[Bug]: Search Bar Off Center #5540

deepspaceaxolotl opened this issue Aug 7, 2024 · 18 comments · Fixed by #5773
Labels
B: visual bug Something isn't working

Comments

@deepspaceaxolotl
Copy link

Guidelines

  • I have encountered this bug in the latest release of FreeTube.
  • I have encountered this bug in the official downloads of FreeTube.
  • I have searched the issue tracker for open and closed issues that are similar to the bug report I want to file, without success.
  • I have searched the documentation for information that matches the description of the bug I want to file, without success.
  • This issue contains only one bug.

Describe the bug

The search bar at the top is neither centered within the entire window (due to the filter button on the right) or when the sidebar is taken into account, collapsed or expanded. This makes it feel visually unbalanced, more so when the sidebar is expanded.

Expected Behavior

The search bar should shift to be centered with the viewport excluding the sidebar and not have the filter button taken into account when centering it, as is more common in web design (example: Twitter's search bar during a search).

Issue Labels

visual bug

FreeTube Version

v0.21.3 Beta

Operating System Version

Windows 10 version 22H2

Installation Method

.exe

Primary API used

Local API

Last Known Working FreeTube Version (If Any)

No response

Additional Information

No response

Nightly Build

@deepspaceaxolotl deepspaceaxolotl added the bug Something isn't working label Aug 7, 2024
@github-project-automation github-project-automation bot moved this to To assign in Bug Reports Aug 7, 2024
@absidue absidue mentioned this issue Aug 7, 2024
4 tasks
@4yman-0

This comment was marked as resolved.

@4yman-0
Copy link
Contributor

4yman-0 commented Aug 8, 2024

I also found that:

  1. Profile (Letter) picture and hamburger menu are not spaced equally.
  2. spacing of freetube logo and filter button is unbalanced.
  3. Sidebar padding is too big in English (IDK about other languages).

Maybe turn this into an issue?

@4yman-0
Copy link
Contributor

4yman-0 commented Aug 8, 2024

There's some overlap I think.

How it is unbalanced Vs How it should look like

@deepspaceaxolotl
Copy link
Author

Here's a screenshot.

image

And a mockup of what I expect it to look like with the sidebar expanded.

image

Done with the following CSS in renderer.fa0c5ad3461a3e4f915d.css using Developer Tools, though the numbers would probably need tweaking and this has not been tested on smaller window sizes, so a different solution may be required.

@media only screen and (width >= 1122px) {
    .topNav[data-v-284c500a] {
        grid-template-columns: 1.8fr 720px 1fr;
    }
}

@4yman-0

This comment was marked as outdated.

@absidue
Copy link
Member

absidue commented Aug 8, 2024

Sidebar padding is too big in English (IDK about other languages).

It only looks like that because you aren't subscribed to any channels in your screenshot and the English labels take up a lot less space than the ones in other languages.

@4yman-0 4yman-0 mentioned this issue Aug 15, 2024
4 tasks
@4yman-0
Copy link
Contributor

4yman-0 commented Aug 15, 2024

I don't think moving search bar with sidebar is a good idea

@deepspaceaxolotl
Copy link
Author

Why not?

It feels more in line with how search bars work on websites with sidebars, in my experience.

Copy link
Contributor

This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@deepspaceaxolotl
Copy link
Author

deepspaceaxolotl commented Nov 3, 2024

I don't think #5773 fixes this issue, it's still off-center in the same way. How do I reopen this?

@efb4f5ff-1298-471a-8973-3d47447115dc

Could you elaborate some more on why you think it didnt solve this.

@deepspaceaxolotl
Copy link
Author

The search bar is off-center in the exact same way as I described in the issue. It takes into account the filter button to the side when centered, which results in the actual search bar being off-center, and it doesn't recenter itself when the viewport becomes narrower when the sidebar is expanded, contrary to expectations set by most websites I know of with a search bar and the kind of sidebar FreeTube has. (Hope my tone doesn't come off as condescending, just want to clarify that the width of the search bar wasn't really a factor.)

@efb4f5ff-1298-471a-8973-3d47447115dc

could you maybe provide a screenrecording?

@deepspaceaxolotl
Copy link
Author

Sorry for the late reply. Not quite sure if this is what you wanted, but this shows the search bar not moving right to be centered within the viewport (minus the sidebar) when the sidebar is expanded, and that it isn't centered with the window to begin with due to the filter button.

https://imgur.com/a/KWJW4Yq

@efb4f5ff-1298-471a-8973-3d47447115dc
Copy link
Member

efb4f5ff-1298-471a-8973-3d47447115dc commented Dec 5, 2024

Before reopening this i would like @kommunarr thoughts on this. I do not quite understand the issue from looking at the provided gif

@kommunarr
Copy link
Collaborator

kommunarr commented Dec 5, 2024

The part about the sidebar being expanded I am not so sure on, as the top nav and side navs are fully separate, so expanding the side nav should have no bearing on the top nav, same as in YT. The main point they're getting at here is sensible: this whole box area containing the search bar + filter button is centered, but visually you would expect the search bar itself to be centered, thus making it appear off-center by 30px to the left. Possible fix would be to have the filter button not take up space in the sizing calculations and just use a right margin of the same size to prevent it from being clipped into.

Screenshot_20241205_170812

A separate and perhaps more major problem is that around the 1130px breakpoint, the space to the left of the search bar stops shrinking as you decrease the viewport width, thus causing it to be chilling very off-center until you reach the 680px mobile breakpoint. YT handles this by shrinking the search bar, but I think a better way to do it (since we don't have to care about branding) would be to just remove the FreeTube logo between these two breakpoints. But nobody seems to complain about that from what I've seen, so we either have very few tablet users or people seem to think it's just a stylistic choice on our part (eh).

Screenshot_20241205_172015

Copy link
Contributor

github-actions bot commented Jan 3, 2025

This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.

Copy link
Contributor

github-actions bot commented Feb 1, 2025

This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B: visual bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants