fix: compatibility issues with historical kanban and iframe block (#4587)

* fix: iframe params undefined

* fix: kanban fixed block

* fix: kanban fixed block

* fix: kanban fixed block

* fix: kanban fixed block
This commit is contained in:
Katherine 2024-06-07 10:22:13 +08:00 committed by GitHub
parent cf740897cc
commit 17edad6014
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 5 additions and 21 deletions

View File

@ -53,16 +53,7 @@ export const FixedBlockWrapper: React.FC = (props) => {
* isPopup means that the FixedBlock is in the popup mode
*/
if (!fixedBlock && fixedBlockUID) return <>{props.children}</>;
return (
<div
className="nb-fixed-block"
style={{
height: fixedBlockUID ? `calc(100vh - ${height})` : undefined,
}}
>
{props.children}
</div>
);
return <div className="nb-fixed-block">{props.children}</div>;
};
export interface FixedBlockProps {
@ -99,14 +90,7 @@ export const FixedBlock: React.FC<FixedBlockProps> = (props) => {
};
return (
<FixedBlockContext.Provider value={{ inFixedBlock: true, height, setFixedBlock, fixedBlockUID, fixedBlockUIDRef }}>
<div
className={fixedBlockUID ? fixedBlockCss : ''}
style={{
height: fixedBlockUID ? `calc(100vh - ${height})` : undefined,
}}
>
{props.children}
</div>
<div className={fixedBlockUID ? fixedBlockCss : ''}>{props.children}</div>
</FixedBlockContext.Provider>
);
};

View File

@ -63,7 +63,7 @@ export const Iframe: any = observer(
try {
const tempUrl = await replaceVariableValue(url, variables, localVariables);
const queryString = await parseVariablesAndChangeParamsToQueryString({
searchParams: params,
searchParams: params || [],
variables,
localVariables,
replaceVariableValue,

View File

@ -60,7 +60,7 @@ const InternalKanbanBlockProvider = (props) => {
service,
resource,
groupField,
fixedBlock: field?.decoratorProps?.fixedBlock,
// fixedBlock: field?.decoratorProps?.fixedBlock,
sortField: props?.sortField,
}}
>

View File

@ -28,7 +28,7 @@ export const useKanbanBlockHeight = () => {
const blockTitleHeaderHeight = title ? token.fontSizeLG * token.lineHeightLG + token.padding * 2 - 1 : 0;
const footerheight = token.padding + 2 * token.marginSM + token.paddingLG + 10;
const footerheight = token.padding + 2 * token.marginSM + token.paddingLG + (designable ? 0 : 10);
return height - actionBarHeight - kanbanHeaderHeight - footerheight - blockTitleHeaderHeight;
};