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

[WEB-2316] chore: Change kanban group virtualization logic #5664

Merged
merged 1 commit into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading