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

Merged
merged 10 commits into from
Oct 8, 2024

Conversation

harshit078
Copy link
Contributor

@harshit078 harshit078 commented Sep 13, 2024

Description

Closes #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
Contributor

@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 ?

@lucasbordeau
Copy link
Contributor

Works like that, merging as it corresponds to the issue.

@lucasbordeau lucasbordeau merged commit 711ff5d into twentyhq:main Oct 8, 2024
11 checks passed
harshit078 added a commit to harshit078/twenty that referenced this pull request Oct 14, 2024
## Description

Closes twentyhq#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
<img width="1575" alt="Screenshot 2024-09-15 at 1 19 00 AM"
src="https://github.com/user-attachments/assets/f8464c35-01f5-4ad8-8af9-839cd8fa779d">

- On mobile viewport
<img width="436" alt="Screenshot 2024-09-15 at 1 19 26 AM"
src="https://github.com/user-attachments/assets/8ca3e56f-691f-4064-9886-26d561710d61">

<img width="430" alt="Screenshot 2024-09-15 at 1 19 54 AM"
src="https://github.com/user-attachments/assets/3250a19c-f10e-48ac-98a8-f836da0ce53e">


## After

- On desktop
<img width="1575" alt="Screenshot 2024-09-15 at 1 20 41 AM"
src="https://github.com/user-attachments/assets/0cd08c83-3261-495d-8b63-3f8c4f7fe802">

- On mobile viewport
<img width="435" alt="Screenshot 2024-09-15 at 1 25 38 AM"
src="https://github.com/user-attachments/assets/ad5d309c-f34f-4001-87bc-96915e9ad484">



https://github.com/user-attachments/assets/0b4ff758-3b6e-4bd5-8247-6b096fa7d1c0

---------

Co-authored-by: Lucas Bordeau <[email protected]>
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.

[bug 🐛 ]: Filter chips lacks width for longer values
3 participants