FreeTube icon indicating copy to clipboard operation
FreeTube copied to clipboard

[Bug]: Search Bar Off Center

Open deepspaceaxolotl opened this issue 1 year ago • 29 comments

Guidelines

  • [X] I have encountered this bug in the latest release of FreeTube.
  • [X] I have encountered this bug in the official downloads of FreeTube.
  • [X] I have searched the issue tracker for open and closed issues that are similar to the bug report I want to file, without success.
  • [X] I have searched the documentation for information that matches the description of the bug I want to file, without success.
  • [X] 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 avatar Aug 07 '24 22:08 deepspaceaxolotl

Can you take a screenshot (snipping tool) ?

4yman-0 avatar Aug 08 '24 00:08 4yman-0

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 avatar Aug 08 '24 01:08 4yman-0

There's some overlap I think.

How it is unbalanced Vs How it should look like

4yman-0 avatar Aug 08 '24 01:08 4yman-0

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;
    }
}

deepspaceaxolotl avatar Aug 08 '24 09:08 deepspaceaxolotl

  1. When viewport is too large, use 1fr size 1fr.
  2. When viewport is 1600px>width>1000px, use 1fr smaller_size .5fr (profile picture breaks)
  3. When viewport is too small. use display flex.

4yman-0 avatar Aug 08 '24 10:08 4yman-0

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.

absidue avatar Aug 08 '24 11:08 absidue

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

4yman-0 avatar Aug 15 '24 12:08 4yman-0

Why not?

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

deepspaceaxolotl avatar Aug 18 '24 21:08 deepspaceaxolotl

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.

github-actions[bot] avatar Sep 16 '24 01:09 github-actions[bot]

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

deepspaceaxolotl avatar Nov 03 '24 12:11 deepspaceaxolotl

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

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.)

deepspaceaxolotl avatar Nov 04 '24 00:11 deepspaceaxolotl

could you maybe provide a screenrecording?

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

deepspaceaxolotl avatar Nov 13 '24 12:11 deepspaceaxolotl

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

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

kommunarr avatar Dec 05 '24 23:12 kommunarr

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.

github-actions[bot] avatar Jan 03 '25 01:01 github-actions[bot]

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.

github-actions[bot] avatar Feb 01 '25 01:02 github-actions[bot]

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.

github-actions[bot] avatar Mar 02 '25 02:03 github-actions[bot]

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.

github-actions[bot] avatar Mar 31 '25 02:03 github-actions[bot]

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.

github-actions[bot] avatar Apr 29 '25 02:04 github-actions[bot]

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.

github-actions[bot] avatar May 28 '25 02:05 github-actions[bot]

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.

github-actions[bot] avatar Jun 26 '25 02:06 github-actions[bot]

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.

github-actions[bot] avatar Jul 25 '25 02:07 github-actions[bot]

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.

github-actions[bot] avatar Aug 23 '25 02:08 github-actions[bot]

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.

github-actions[bot] avatar Sep 21 '25 02:09 github-actions[bot]

Still an issue.

deepspaceaxolotl avatar Sep 21 '25 09:09 deepspaceaxolotl

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.

github-actions[bot] avatar Oct 20 '25 02:10 github-actions[bot]

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.

github-actions[bot] avatar Nov 18 '25 02:11 github-actions[bot]