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

Change labels filter to dynamic height, fixed width, and shadow scroll bar #163

Merged
merged 8 commits into from
Jul 23, 2023

Conversation

seetohjinwei
Copy link
Contributor

@seetohjinwei seetohjinwei commented Jul 6, 2023

Summary:

Fixes #160

Changes Made:

  • Change scroll-container's height to be max-height
  • Change scroll-container's width to be a fixed width of 280px
  • Add shadow scroll bar

Commit Message:

Change labels filter to dynamic height, fixed width, and shadow scroll

Previous, in a repository without labels, or with few labels, the
container would still be a fixed height of `400px`.

Previously, in a repository with many labels, the container would be
scrollable, but the scroll bar would be hidden.

Let's
* Change `scroll-container`'s `height` to be `max-height`
* Change `scroll-container`'s `width` to be a fixed width of `280px`
* Add shadow scroll bar

Tested on Chrome, Firefox, Safari.

Screen Recording 2023-07-14 at 21 17 05

image

@seetohjinwei
Copy link
Contributor Author

Additionally, when using the filter input to search for specific labels, if none of the labels match the search text, there is no indication that there are no labels found.

Should we add some form of indication like No Labels Found for the above situation?

@gycgabriel
Copy link
Collaborator

Additionally, when using the filter input to search for specific labels, if none of the labels match the search text, there is no indication that there are no labels found.

Should we add some form of indication like No Labels Found for the above situation?

Good to have enhancement, can create a new issue.

@seetohjinwei
Copy link
Contributor Author

Created the issue here! #164

Copy link
Collaborator

@gycgabriel gycgabriel left a comment

Choose a reason for hiding this comment

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

LGTM except for showing the scrollbar

@Eclipse-Dominator Was it preferred to hide the scrollbar for LabelFilterComponent?

I think we can look into using shadow scroll instead of scrollbar because there is a bit of jitter when the scrollbar disappears as the labels are filtered

@Eclipse-Dominator
Copy link
Contributor

Eclipse-Dominator commented Jul 13, 2023

@Eclipse-Dominator Was it preferred to hide the scrollbar for LabelFilterComponent?

I think we can look into using shadow scroll instead of scrollbar because there is a bit of jitter when the scrollbar disappears as the labels are filtered

I think my original decision to remove the scrollbar was to preserve spacing for the popup menu as well as to keep the popup bar cleaner. I think the argument for having the scrollbar is also valid.

It might be better if we can look into using shadow scroll. I think the jitter can also be solved if the menu width size is fixed?

What do you think? @seetohjinwei

out

@gycgabriel
Copy link
Collaborator

I think we can go with shadow scroll to keep with the style. Doesn't make sense to add accessibility for only the label filters but not the issue cards.

@seetohjinwei
Copy link
Contributor Author

Hi! Do you mean something like this: https://plainenglish.io/blog/how-to-create-horizontal-vertical-scroll-shadows?

I could try to do it

@gycgabriel
Copy link
Collaborator

gycgabriel commented Jul 14, 2023

Yes. Let's use css, not the javascript one. You can also refer to #148

@seetohjinwei
Copy link
Contributor Author

Alright, thanks! I'll try to make these changes tonight

@seetohjinwei
Copy link
Contributor Author

Hi! I've made the following changes:

  • Add shadow scroll bar (and made the current scroll bar invisible)
  • Made the panel fixed width

Screen Recording 2023-07-14 at 21 17 05

Copy link
Contributor

@Eclipse-Dominator Eclipse-Dominator left a comment

Choose a reason for hiding this comment

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

LGTM other than perhaps have a similar shadow to the dashboard ver where the shadow at the edge is thinner than the center? Right now the corner looks a bit jarring

@seetohjinwei
Copy link
Contributor Author

Changed the CSS for the shadow scroll to match the dashboard one!

image

Copy link
Contributor

@Eclipse-Dominator Eclipse-Dominator left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Collaborator

@gycgabriel gycgabriel left a comment

Choose a reason for hiding this comment

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

image

One thing you could consider is having the padding inside the scrollable container, so something like this mock-up. Can also remove bottom padding altogether. Maybe also change radial gradient from 0.5 to 0.7 alpha to thicken the bottom shadow.

At the end, do remember to change your PR title and commit message to the new implementation.

@seetohjinwei seetohjinwei changed the title Change labels filter to have a dynamic height, and visible scroll bar Change labels filter to dynamic height, fixed width, and shadow scroll bar Jul 16, 2023
@seetohjinwei
Copy link
Contributor Author

I've removed the padding from the outer container, and re-added it to just the search input. I think the scroll-container looks a bit better without padding? I've also removed the top and bottom paddings of the entire popup menu, and changed the radial gradient value.

But, I did notice that the content is rendered above the scroll shadow, which is obvious with the coloured labels, I think #173 is related to this, so I'll try and re-implement the changes made there to this PR once that's done too.

image

@gycgabriel
Copy link
Collaborator

@seetohjinwei #173 has been merged!

@seetohjinwei
Copy link
Contributor Author

I've made the changes with reference to 173!

Screen Recording 2023-07-17 at 21 15 33

gycgabriel
gycgabriel previously approved these changes Jul 18, 2023
Copy link
Collaborator

@gycgabriel gycgabriel left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@gycgabriel gycgabriel left a comment

Choose a reason for hiding this comment

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

LGTM

@gycgabriel gycgabriel merged commit f03524b into CATcher-org:main Jul 23, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Labels Filter Bar Static Height, and invisible scroll bar
3 participants