Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Simplify Filter Sidebar component and improve scrollbar styles #432

Merged
merged 1 commit into from Dec 2, 2021

Conversation

obulat
Copy link
Contributor

@obulat obulat commented Nov 18, 2021

Fixes

(slightly) Related to #412 by @panchovm

Description

This PR removes one of the nested Sidebar Filter components to simplify it, and also removes the gap between the sidebar and main content by setting the scrollbar background to transparent. The scrollbar for Filter Sidebar is complicated with the iframe: it now technically doesn't overflow, so the 'thumb' of the scrollbar is invisible, but the gap is still there.
This PR is based on the VCheckbox PR.

Testing Instructions

Run the app and open the Filter sidebar. You should not see this gap between it and the content:
Screen Shot 2021-11-18 at 3 53 59 PM

Checklist

  • My pull request has a descriptive title (not a vague title like Update index.md).
  • My pull request targets the default branch of the repository (main) or a parent feature branch.
  • My commit messages follow best practices.
  • My code follows the established code style of the repository.
  • I added or updated tests for the changes I made (if applicable).
  • I added or updated documentation (if applicable).
  • I tried running the project locally and verified that there are no visible errors.

Developer Certificate of Origin

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

@obulat obulat requested a review from a team as a code owner November 18, 2021 14:40
@obulat obulat requested review from dhruvkb and sarayourfriend and removed request for a team November 18, 2021 14:40
@dhruvkb dhruvkb added this to Needs review in Openverse PRs Nov 18, 2021
@obulat obulat added 🕹 aspect: interface Concerns end-users' experience with the software 🛠 goal: fix Bug fix labels Nov 18, 2021
Base automatically changed from add/checkbox to main November 18, 2021 14:46
@zackkrida
Copy link
Member

I don't feel like I can test this, because I'm not able to see the sidebar scrollbar track or a scrollbar for the sidebar at all, with the exception of the 'mobile' view:

CleanShot 2021-11-18 at 11 49 55@2x
CleanShot 2021-11-18 at 11 49 51@2x

@obulat
Copy link
Contributor Author

obulat commented Nov 19, 2021

feel like I can test this, because I'm not able to see the sidebar scrollbar track or a scrollbar for the sidebar at all, with the exceptio

Do you mean that on this branch you do not see the scrollbar track? This is a feature, not a bug here :) Since the filter sidebar doesn't scroll (it has the full height here), I thought that I might set all colors to transparent for the transitional styles. Can you see the scrollback track (ie the gap between the filters sidebar and the main content) on the main branch?

@zackkrida
Copy link
Member

Can you see the scrollback track (ie the gap between the filters sidebar and the main content) on the main branch?

No, I never see it anywhere. Here's the live site for me:

CleanShot 2021-11-19 at 08 18 38@2x

It's because the site doesn't restrict the sidebar height, so there's never a scrollbar!

This work should be very useful however when we can switch back to a fixed 100vh-height sidebar with its own scrolling.

@sarayourfriend
Copy link
Contributor

I wonder if there's some kind of configuration difference? I always see it in my Firefox browser.

Captura de Tela 2021-11-19 às 07 25 10

Safari too

Captura de Tela 2021-11-19 às 07 25 54

I even opened Chrome for you 😱 and it shows it for me as well.

Captura de Tela 2021-11-19 às 07 26 27

@griffbrad
Copy link

Possible you have different “Show scroll bars” settings in MacOS? (https://support.apple.com/guide/mac-help/change-general-preferences-mchlp1225/mac)

Copy link
Member

@zackkrida zackkrida left a comment

Choose a reason for hiding this comment

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

Lovely work; the removal of the FiltersList is great.

As I mentioned, I now am able to see the scrollbar track when using my mac in clamshell mode with an external mouse and keyboard 🤔

Copy link
Contributor

@sarayourfriend sarayourfriend left a comment

Choose a reason for hiding this comment

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

LGTM!

Openverse PRs automation moved this from Needs review to Reviewer approved Dec 1, 2021
@obulat obulat added the 🟨 priority: medium Not blocking but should be addressed soon label Dec 2, 2021
@obulat obulat merged commit badc9b6 into main Dec 2, 2021
@obulat obulat deleted the fix_sidebar_layout branch December 2, 2021 14:03
Openverse PRs automation moved this from Reviewer approved to Merged! Dec 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🕹 aspect: interface Concerns end-users' experience with the software 🛠 goal: fix Bug fix 🟨 priority: medium Not blocking but should be addressed soon
Projects
No open projects
Openverse PRs
  
Merged!
Development

Successfully merging this pull request may close these issues.

None yet

4 participants