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: recordBoard sticky header + scrollThumb #8946

Merged
merged 5 commits into from
Dec 18, 2024

Conversation

harshrajeevsingh
Copy link
Contributor

Fixes: #8944

Screencast.from.2024-12-08.00-43-19.webm

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 PR fixes UI issues with the RecordBoard component's header and scrollbar by adjusting container dimensions and layout properties.

  • Modified StyledContainerWithPadding width calculation in /packages/twenty-front/src/modules/object-record/record-index/components/RecordIndexContainer.tsx to properly account for left margin spacing
  • Removed height: 100% from StyledContainerContainer in /packages/twenty-front/src/modules/object-record/record-board/components/RecordBoard.tsx to fix sticky header behavior
  • Added height: calc(100% - 48px) to StyledBoardContentContainer to ensure proper scrollable area

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

@lucasbordeau lucasbordeau self-assigned this Dec 9, 2024
Copy link
Contributor

@ehconitin ehconitin left a comment

Choose a reason for hiding this comment

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

LGTM! Left a comment!

margin-left: ${({ theme }) => theme.spacing(2)};
width: 100%;
width: calc(100% - ${({ theme }) => theme.spacing(2)});
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we use box-sizing: border-box instead of calculating width?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried! It didn't work ;(

Copy link
Member

Choose a reason for hiding this comment

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

@ehconitin could you try taking over this change?

@@ -17,7 +17,7 @@ import 'overlayscrollbars/overlayscrollbars.css';

const StyledScrollWrapper = styled.div<{ scrollHide?: boolean }>`
display: flex;
height: fit-content;
Copy link
Contributor

Choose a reason for hiding this comment

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

This change introduced in #9062 broke the scroll on the recordboard, reverted!

Copy link
Contributor

@ehconitin ehconitin left a comment

Choose a reason for hiding this comment

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

LGTM!
@harshrajeevsingh Great work, Thanks!
box-sizing: border-box; does work instead of calculating width :)
I am not sure why it didn't work on your side, could you please re-verify if the reason of it not working is linux specific?

@ehconitin ehconitin merged commit e0f1db2 into twentyhq:main Dec 18, 2024
20 checks passed
Copy link

Thanks @harshrajeevsingh for your contribution!
This marks your 22nd PR on the repo. You're top 2% of all our contributors 🎉
See contributor page - Share on LinkedIn - Share on Twitter

Contributions

magrinj added a commit that referenced this pull request Dec 18, 2024
@harshrajeevsingh
Copy link
Contributor Author

LGTM! @harshrajeevsingh Great work, Thanks! box-sizing: border-box; does work instead of calculating width :) I am not sure why it didn't work on your side, could you please re-verify if the reason of it not working is linux specific?

It's working not because of box-sizing: border-box; but because you removed the width property from that container. So, even if you remove the box-sizing: border-box; from this code, it will still work :)

magrinj added a commit that referenced this pull request Dec 20, 2024
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.

RecordBoard Header dissappears on page scroll up + missing scrollbar thumb
4 participants