tweak pagination and virtualization thresholds to have a smoother scroll (#4991)

This commit is contained in:
rahulramesha 2024-07-02 19:26:26 +05:30 committed by GitHub
parent 12401c54cc
commit c637639a3e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 7 additions and 4 deletions

View file

@ -54,7 +54,7 @@ export const IssueGanttSidebar: React.FC<Props> = observer((props) => {
ganttContainerRef,
isPaginating ? null : intersectionElement,
loadMoreBlocks,
"50% 0% 50% 0%"
"100% 0% 100% 0%"
);
const handleOnDrop = (

View file

@ -224,7 +224,8 @@ export const KanbanIssueBlock: React.FC<IssueBlockProps> = observer((props) => {
classNames="space-y-2 px-3 py-2"
root={scrollableContainerRef}
defaultHeight="100px"
horizontalOffset={50}
horizontalOffset={100}
verticalOffset={200}
>
<KanbanIssueDetailsBlock
cardRef={cardRef}

View file

@ -125,6 +125,7 @@ export const IssueBlockRoot: FC<Props> = observer((props) => {
defaultHeight="3rem"
root={containerRef}
classNames={`relative ${isLastChild && !isExpanded ? "" : "border-b border-b-custom-border-200"}`}
verticalOffset={100}
>
<IssueBlock
issueId={issueId}

View file

@ -102,7 +102,7 @@ export const ListGroup = observer((props: Props) => {
const nextPageResults = getPaginationData(group.id, undefined)?.nextPageResults;
const isPaginating = !!getIssueLoader(group.id);
useIntersectionObserver(containerRef, isPaginating ? null : intersectionElement, loadMoreIssues, `50% 0% 50% 0%`);
useIntersectionObserver(containerRef, isPaginating ? null : intersectionElement, loadMoreIssues, `100% 0% 100% 0%`);
const shouldLoadMore =
nextPageResults === undefined && groupIssueCount !== undefined && groupIssueIds

View file

@ -84,6 +84,7 @@ export const SpreadsheetIssueRow = observer((props: Props) => {
"group selected-issue-row": isIssueSelected,
"border-[0.5px] border-custom-border-400": isIssueActive,
})}
verticalOffset={100}
>
<IssueRowDetails
issueId={issueId}

View file

@ -92,7 +92,7 @@ export const SpreadsheetTable = observer((props: Props) => {
const isPaginating = !!getIssueLoader();
useIntersectionObserver(containerRef, isPaginating ? null : intersectionElement, loadMoreIssues, `50% 0% 50% 0%`);
useIntersectionObserver(containerRef, isPaginating ? null : intersectionElement, loadMoreIssues, `100% 0% 100% 0%`);
const handleKeyBoardNavigation = useTableKeyboardNavigation();