Open ijreilly opened 3 months ago
Disclaimer: This comment was automatically generated with AI. It can give some useful hints as to where to look for, but sometimes it can also give very inaccurate answers so takes this with a pinch of salt :).
To address the issue of the focused cell acting weird when scrolling horizontally, follow these steps:
Locate the relevant component: The issue is likely within the table components handling activities. Check /packages/twenty-front/src/modules/activities/table/components/CellCommentChip.tsx
and /packages/twenty-front/src/modules/activities/table/components/CommentChip.tsx
.
Check the scrolling behavior: Ensure that the focused cell maintains its state and position correctly during horizontal scrolling. This might involve adjusting the CSS or the component's state management.
Adjust the context if necessary: Review the InlineCellMutationContext
and useInlineCell
hook in /packages/twenty-front/src/modules/object-record/record-inline-cell
to ensure the focused cell's state is managed correctly during scroll events.
Modify the component: If needed, add or adjust event listeners for scroll events to maintain the focus state. Example:
useEffect(() => {
const handleScroll = () => {
// Logic to maintain focus state
};
window.addEventListener('scroll', handleScroll);
return () => window.removeEventListener('scroll', handleScroll);
}, []);
Test the changes: Ensure the focused cell behaves correctly during horizontal scrolling.
/packages/twenty-front/src/modules/activities/table /packages/twenty-front/src/modules/activities/table/components /packages/twenty-front/src/modules/object-record/record-inline-cell
looking into it. let me see if this can be fixed.
https://github.com/twentyhq/twenty/assets/51697796/aa848bab-e849-4352-aab8-2d7525a673bf
Working on it 🔥 - P0 priority.
Edit: changing priority to P2, this is tricky then i thought, just z-index won't fix this i believe.
also Question: Also later we will have a behaviour that when cell is focused, table shouldn't be scrollable (left and right) ideally this is what I think behaviour is, tackling both makes at the same time makes more sense to me.
Duplicated issue: https://github.com/twentyhq/twenty/issues/6813, let's make sure both are fixed
The issue is still there!
https://github.com/twentyhq/twenty/assets/51697796/1cb614ea-b73f-4629-abd8-7341b826dee2