Skip to content

Commit

Permalink
change kanban group virtualization logic (#5664)
Browse files Browse the repository at this point in the history
  • Loading branch information
rahulramesha authored Sep 20, 2024
1 parent a4933b5 commit 66cfc73
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 10 deletions.
2 changes: 1 addition & 1 deletion web/core/components/core/render-if-visible-HOC.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const RenderIfVisible: React.FC<Props> = (props) => {
}, [isVisible, intersectionRef, shouldRecordHeights]);

const child = isVisible ? <>{children}</> : placeholderChildren;
const style = isVisible || placeholderChildren ? {} : { height: placeholderHeight.current, width: "100%" };
const style = isVisible || !shouldRecordHeights ? {} : { height: placeholderHeight.current, width: "100%" };
const className = isVisible || placeholderChildren ? classNames : cn(classNames, "bg-custom-background-80");

return React.createElement(as, { ref: intersectionRef, style, className }, child);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ export const KanBan: React.FC<IKanBan> = observer((props) => {

{groupByVisibilityToggle.showIssues && (
<RenderIfVisible
verticalOffset={0}
verticalOffset={100}
horizontalOffset={100}
root={scrollableContainerRef}
classNames="relative h-full"
Expand Down
3 changes: 0 additions & 3 deletions web/core/components/issues/issue-layouts/list/block-root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import { HIGHLIGHT_CLASS, getIssueBlockId, isIssueNew } from "../utils";
import { TRenderQuickActions } from "./list-view-types";

type Props = {
issueIds: string[];
issueId: string;
issuesMap: TIssueMap;
updateIssue: ((projectId: string | null, issueId: string, data: Partial<TIssue>) => Promise<void>) | undefined;
Expand All @@ -44,7 +43,6 @@ type Props = {

export const IssueBlockRoot: FC<Props> = observer((props) => {
const {
issueIds,
issueId,
issuesMap,
groupId,
Expand Down Expand Up @@ -161,7 +159,6 @@ export const IssueBlockRoot: FC<Props> = observer((props) => {
subIssues?.map((subIssueId) => (
<IssueBlockRoot
key={`${subIssueId}`}
issueIds={issueIds}
issueId={subIssueId}
issuesMap={issuesMap}
updateIssue={updateIssue}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ export const IssueBlocksList: FC<Props> = (props) => {
issueIds.map((issueId: string, index: number) => (
<IssueBlockRoot
key={issueId}
issueIds={issueIds}
issueId={issueId}
issuesMap={issuesMap}
updateIssue={updateIssue}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ interface Props {
issueId: string;
isScrolled: MutableRefObject<boolean>;
containerRef: MutableRefObject<HTMLTableElement | null>;
issueIds: string[];
spreadsheetColumnsList: (keyof IIssueDisplayProperties)[];
spacingLeft?: number;
selectionHelpers: TSelectionHelper;
Expand All @@ -57,7 +56,6 @@ export const SpreadsheetIssueRow = observer((props: Props) => {
canEditProperties,
isScrolled,
containerRef,
issueIds,
spreadsheetColumnsList,
spacingLeft = 6,
selectionHelpers,
Expand Down Expand Up @@ -124,7 +122,6 @@ export const SpreadsheetIssueRow = observer((props: Props) => {
portalElement={portalElement}
isScrolled={isScrolled}
containerRef={containerRef}
issueIds={issueIds}
spreadsheetColumnsList={spreadsheetColumnsList}
selectionHelpers={selectionHelpers}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ export const SpreadsheetTable = observer((props: Props) => {
portalElement={portalElement}
containerRef={containerRef}
isScrolled={isScrolled}
issueIds={issueIds}
spreadsheetColumnsList={spreadsheetColumnsList}
selectionHelpers={selectionHelpers}
/>
Expand Down

0 comments on commit 66cfc73

Please sign in to comment.