You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by ti...@apache.org on 2024/05/29 19:25:40 UTC
(incubator-kie-tools) branch main updated: NO-ISSUE: DMN Editor: Context data type assignment menu is not well readable (#2380)
This is an automated email from the ASF dual-hosted git repository.
tiagobento pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-kie-tools.git
The following commit(s) were added to refs/heads/main by this push:
new f875627d8c4 NO-ISSUE: DMN Editor: Context data type assignment menu is not well readable (#2380)
f875627d8c4 is described below
commit f875627d8c494bdc2d6564564a400e10a1c1dea9
Author: Luiz João Motta <lu...@gmail.com>
AuthorDate: Wed May 29 16:25:35 2024 -0300
NO-ISSUE: DMN Editor: Context data type assignment menu is not well readable (#2380)
---
.../src/expressionVariable/DataTypeSelector.tsx | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/packages/boxed-expression-component/src/expressionVariable/DataTypeSelector.tsx b/packages/boxed-expression-component/src/expressionVariable/DataTypeSelector.tsx
index 5f32425b3a2..4c33f5b02c1 100644
--- a/packages/boxed-expression-component/src/expressionVariable/DataTypeSelector.tsx
+++ b/packages/boxed-expression-component/src/expressionVariable/DataTypeSelector.tsx
@@ -41,6 +41,7 @@ export interface DataTypeSelectorProps {
/** This is the optimal height for the dropdown menu for the "Data Type" */
const DEFAULT_SELECT_DATA_TYPE_MENU_HEIGHT = 500;
+const MININAL_SELECT_DATA_TYPE_MENU_HEIGHT = 70;
/** This margin is the height of the status bar in the on-line editor because it can't be overlaped */
const POPUP_BOTTOM_MARGIN = 46;
@@ -140,7 +141,10 @@ export const DataTypeSelector: React.FunctionComponent<DataTypeSelectorProps> =
DEFAULT_SELECT_DATA_TYPE_MENU_HEIGHT + yPos > availableHeight
) {
const offset = DEFAULT_SELECT_DATA_TYPE_MENU_HEIGHT + yPos - availableHeight;
- return DEFAULT_SELECT_DATA_TYPE_MENU_HEIGHT - offset - POPUP_BOTTOM_MARGIN;
+ const calculatedHeight = DEFAULT_SELECT_DATA_TYPE_MENU_HEIGHT - offset - POPUP_BOTTOM_MARGIN;
+ return calculatedHeight < MININAL_SELECT_DATA_TYPE_MENU_HEIGHT
+ ? MININAL_SELECT_DATA_TYPE_MENU_HEIGHT
+ : calculatedHeight;
}
}
return DEFAULT_SELECT_DATA_TYPE_MENU_HEIGHT;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org