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

fix: Filter chips lacks width for longer values #7025

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

harshit078
Copy link
Contributor

@harshit078 harshit078 commented Sep 13, 2024

Description

This PR solved the issue #7018

  • When given longer values, filter chips break-spaces and lack sufficient width
  • As a result, a design overhaul is given to StyledBar and StyledChipcontainer components.

Before

  • on Desktop
Screenshot 2024-09-15 at 1 19 00 AM
  • On mobile viewport
Screenshot 2024-09-15 at 1 19 26 AM Screenshot 2024-09-15 at 1 19 54 AM

After

  • On desktop
Screenshot 2024-09-15 at 1 20 41 AM
  • On mobile viewport
Screenshot 2024-09-15 at 1 25 38 AM
Screen.Recording.2024-09-15.at.1.22.06.AM.mov

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This pull request addresses issue #7018 by improving the design of filter chips in the ViewBarDetails component to handle longer filter values, especially in mobile viewports.

  • Modified StyledBar and StyledChipcontainer components in ViewBarDetails.tsx to enhance layout and styling
  • Adjusted flex properties, padding, and overflow handling to prevent text from breaking
  • Improved width allocation for longer filter values to ensure proper display
  • Changes aim to resolve the issue of insufficient width for filter chips in mobile view
  • Modifications may affect related components like SortOrFilterChip, EditableFilterChip, and EditableSortChip

1 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings

Copy link
Member

@charlesBochet charlesBochet left a comment

Choose a reason for hiding this comment

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

@harshit078 Thanks for the issue and PR :)

However, I'm not sure about these changes:

Could you rework it?
Also make sure that it looks good on (desktop / mobile) x (with sort / without sort) x (with filter / without filter)

Thank you!

min-height: 32px;
margin-left: ${({ theme }) => theme.spacing(2)};
flex-wrap: wrap;
overflow-x: scroll;
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure about this scroll behavior, it's very difficult to use. I think we want they to pile vertically
@Bonapara could confirm

Copy link
Member

Choose a reason for hiding this comment

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

let's remove the scroll

Copy link
Contributor Author

@harshit078 harshit078 Sep 14, 2024

Choose a reason for hiding this comment

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

@charlesBochet, In the figma designs and the video in #7018 the filter chips scroll horizontally behind the Reset and Save as new view state. If we remove this scroll then how should we approach it ?

Copy link
Member

Choose a reason for hiding this comment

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

oh ok! I missed that, I feel this is not easy to use and need to be discussed again with Bonapara for small screens but we could merge the PR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@charlesBochet, I agree to your point. To overcome this, can we can do a tooltip or information badge for all mobile viewports as a result when user first time applies filters, they can learn ?

display: flex;
align-items: center;
flex: 1;
overflow-x: hidden;
Copy link
Member

Choose a reason for hiding this comment

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

we need item to stack

Copy link
Contributor Author

Choose a reason for hiding this comment

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

On the dev environment, filters stack on each other in column manner. But in figma they are stacking row wise and having a scroll. Is column stack behaviour we need to follow ?

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.

2 participants