-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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: Minor bug in column scroll in mobile viewport #7448
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.
PR Summary
This pull request addresses a minor bug in column scrolling for mobile viewports. The change reduces the width of a specific table header cell from 35px to 30px.
- Modified
packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeader.tsx
to adjust cell width - Reduced width of third table header cell from 35px to 30px for mobile viewports
- Aims to prevent first letter of input from being displayed during column scrolling on mobile
- Further testing on mobile devices recommended to ensure full resolution of the issue
1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
@harshit078 Thanks for the issue AND the PR I have some feedbacks / questions:
|
@@ -11,7 +11,7 @@ const StyledInlineCellEditModeContainer = styled.div` | |||
display: flex; | |||
height: 24px; | |||
|
|||
margin-left: -${({ theme }) => theme.spacing(1)}; | |||
margin-left: ${({ theme }) => theme.spacing(1)}; |
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.
changing it might break the alignment for other inline edit input
@@ -38,6 +38,6 @@ export const Default: Story = { | |||
await canvas.findByText('Tasks'); | |||
await canvas.findByText('People'); | |||
await canvas.findByText('Opportunities'); | |||
await canvas.findByText('My Customs'); | |||
await canvas.findByText('Rockets'); |
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.
Fixing an unrelated story
@@ -24,15 +24,13 @@ import { | |||
type RecordInlineCellProps = { | |||
readonly?: boolean; | |||
loading?: boolean; | |||
isCentered?: boolean; |
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 need to drilldown props as we already have it from the context
const StyledInlineCellEditModeContainer = styled.div` | ||
align-items: center; | ||
|
||
display: flex; | ||
width: 100%; |
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.
this is correct and ease positioning
middleware: [ | ||
flip(), | ||
offset( | ||
isCentered | ||
? { | ||
mainAxis: -32, |
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.
this was non sense :p
/award 150 |
Awarding harshit078: 150 points 🕹️ Well done! Check out your new contribution on oss.gg/harshit078 |
@@ -36,7 +36,7 @@ const meta: Meta<typeof EventRowMainObjectUpdated> = { | |||
}, | |||
} as TimelineActivity, | |||
mainObjectMetadataItem: generatedMockObjectMetadataItems.find( | |||
(item) => item.namePlural === 'person', | |||
(item) => item.nameSingular === 'person', |
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.
non related too
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 will actually approve it as it looks not so bad regarding the table too! I still think we could implement something more robust but it still a good step forward
Thank you @harshit078 :)
Thanks @harshit078 for your contribution! |
@charlesBochet The whole misalignment of RecordInline cell container started from #6899 where it was decided to reduce the width of container which led to their current looking state. |
One more feature to work on would be to improve the overall snap and scroll behaviour for ismobile when scrolling across the table. Screen.Recording.2024-10-05.at.3.24.01.PM.mov |
Yes but the issue was that the editModeContainer was a 0px container putted right before the displayMode which made very hard to properly align the floating inplace input. I have changed it to be absolutely positioned on top which give us more control! Yes the we can do better regarding the snap, maybe some animation? |
Yes, I agree to your point on giving |
> [!Note] > - This PR fixes twentyhq#7447 --------- Co-authored-by: Charles Bochet <[email protected]>
Note