-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Correctly separate widgets in side-column mode. #16668
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
|
This is the widgets array I added to DefaultPersonRecordPageLayout to enable all the widgets and figure out the delta. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues found across 3 files
|
🚀 Preview Environment Ready! Your preview environment is available at: http://bore.pub:32788 This environment will automatically shut down when the PR is closed or after 5 hours. |
Devessier
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your work! I suggest a few technical changes but overall it looks good.
| if (variant === 'side-column' && !isEditable) { | ||
| return css` | ||
| background: ${theme.background.secondary}; | ||
| border-bottom: 1px solid ${theme.border.color.light}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good! As mentioned in DM, I think we have to do that in conjunction to a padding removal on the vertical list/editor components.
| const StyledVerticalListContainer = styled.div` | ||
| display: flex; | ||
| flex-direction: column; | ||
| gap: ${({ theme }) => theme.spacing(2)}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we don't want to keep gap here. Let's go with that, we can update the styles later if we want to adding spacing.
| import { Section } from 'twenty-ui/layout'; | ||
|
|
||
| const StyledRecordDetailSectionContainer = styled(Section)` | ||
| border-top: 1px solid ${({ theme }) => theme.border.color.light}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't drop this property. The component is used in the normal code path, currently in production.
I suggest you to fork the whole RecordDetailSectionContainer component into FieldsWidgetSectionContainer.
Most code paths will likely diverge, and RecordDetailSectionContainer will likely be replaced by Fields widget!
Closes 2006
Removed the top-border in FieldsWidget and added buttom-border to WidgetCard.
Beyond this, I tried making the spacing of these widgets even at the top and the bottom, but it turns out the widgets are also used in activity views, so configuring them for side-column messes up those activity views/tabs.
I feel that in order to make these widgets cleaner in side-column, we have to make the widgets context aware - I tried figuring out some other solution, but since some cards have spacing defined within, we do not really have a clean and quick solution imo.
If we do not align spacing, the following delta remains in bottom-spacing of the widgets and it looks ugly.
Let me know your thoughts.