From e0e426d40ec7092d0d0de7356208555b1ff33596 Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Mon, 11 Jul 2022 15:10:16 +0400 Subject: [PATCH 1/5] [DE mobile] Fix Bug 57990 --- apps/documenteditor/mobile/src/view/settings/Navigation.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/documenteditor/mobile/src/view/settings/Navigation.jsx b/apps/documenteditor/mobile/src/view/settings/Navigation.jsx index 138d870e1..7149df3f8 100644 --- a/apps/documenteditor/mobile/src/view/settings/Navigation.jsx +++ b/apps/documenteditor/mobile/src/view/settings/Navigation.jsx @@ -32,7 +32,7 @@ const NavigationPopover = inject('storeNavigation')(observer(props => { {arrHeaders.map((header, index) => { return ( - { + { setCurrentPosition(header.index); props.onSelectItem(header.index); }}> @@ -121,7 +121,7 @@ const NavigationSheet = inject('storeNavigation')(observer(props => { {arrHeaders.map((header, index) => { return ( - { + { setCurrentPosition(header.index); props.onSelectItem(header.index); }}> From cc74ab53e1060dcb424c11723ca158ee6c2d318a Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Tue, 26 Jul 2022 15:18:15 +0300 Subject: [PATCH 2/5] [SSE mobile] Fix Bug 58279 --- .../mobile/src/controller/CellEditor.jsx | 22 +-- .../mobile/src/view/CellEditor.jsx | 150 +++++++++--------- 2 files changed, 83 insertions(+), 89 deletions(-) diff --git a/apps/spreadsheeteditor/mobile/src/controller/CellEditor.jsx b/apps/spreadsheeteditor/mobile/src/controller/CellEditor.jsx index 9b67440ba..7a15d1114 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/CellEditor.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/CellEditor.jsx @@ -1,4 +1,3 @@ - import React, { useEffect, useState } from 'react'; import CellEditorView from '../view/CellEditor'; import { f7 } from 'framework7-react'; @@ -39,7 +38,7 @@ const CellEditor = inject("storeFunctions")(observer(props => { setFunctionshDisabled(is_image || is_mode_2 || coauth_disable); } - const onFormulaCompleteMenu = funcArr => { + const onFormulaCompleteMenu = async funcArr => { const api = Common.EditorApi.get(); const storeFunctions = props.storeFunctions; const functions = storeFunctions.functions; @@ -94,21 +93,14 @@ const CellEditor = inject("storeFunctions")(observer(props => { return {name, type, descr, caption, args}; }); - setFuncArr(funcArr); - setHintArr(hintArr); + await setFuncArr(funcArr); + await setHintArr(hintArr); - f7.popover.open('#idx-functions-list', '#idx-list-target'); - - const listTarget = document.querySelector('#idx-list-target'); - const rect = listTarget.getBoundingClientRect(); - const popoverList = document.querySelector('#idx-functions-list'); - - popoverList.style.top = `${rect.bottom}px`; - popoverList.style.left = `${rect.left}px`; + await f7.popover.open('#idx-functions-list', '#idx-list-target'); } else { - f7.popover.close('#idx-functions-list'); - setFuncArr(''); - setHintArr(''); + await f7.popover.close('#idx-functions-list'); + await setFuncArr(''); + await setHintArr(''); } } diff --git a/apps/spreadsheeteditor/mobile/src/view/CellEditor.jsx b/apps/spreadsheeteditor/mobile/src/view/CellEditor.jsx index 01186e7e1..cea12d988 100644 --- a/apps/spreadsheeteditor/mobile/src/view/CellEditor.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/CellEditor.jsx @@ -14,78 +14,6 @@ const contentStyle = { flexGrow: 1 }; -const FunctionInfo = props => { - const { t } = useTranslation(); - const _t = t('View.Add', {returnObjects: true}); - const functionObj = props.functionObj; - const functionInfo = props.functionInfo; - - useEffect(() => { - const functionsList = document.querySelector('#functions-list'); - const height = functionsList.offsetHeight + 'px'; - - functionsList.closest('.view').style.height = '200px'; - - return () => { - functionsList.closest('.view').style.height = height; - } - }, []); - - return ( - - - - props.insertFormula(functionObj.name, functionObj.type)}> - - -
-

{functionInfo.caption && functionInfo.args ? `${functionInfo.caption} ${functionInfo.args}` : functionInfo.name}

-

{functionInfo.descr}

-
-
- ) -} - -const FunctionsList = props => { - const isPhone = Device.isPhone; - const functions = props.functions; - const funcArr = props.funcArr; - const hintArr = props.hintArr; - - useEffect(() => { - const functionsList = document.querySelector('#functions-list'); - const height = functionsList.offsetHeight + 'px'; - - functionsList.closest('.view').style.height = height; - }, [funcArr]); - - return ( -
- - {funcArr && funcArr.length && funcArr.map((elem, index) => { - return ( - props.insertFormula(elem.name, elem.type)}> - {(functions[elem.name] || hintArr[index]?.descr) && -
{ - e.stopPropagation(); - let functionInfo = functions[elem.name] || hintArr[index]; - - if(functionInfo) { - f7.views.current.router.navigate('/function-info/', {props: {functionInfo, functionObj: elem, insertFormula: props.insertFormula}}); - } - }}> - -
- } -
- ) - })} -
-
- ) -} - const CellEditorView = props => { const [expanded, setExpanded] = useState(false); const isPhone = Device.isPhone; @@ -132,9 +60,9 @@ const CellEditorView = props => { - @@ -147,6 +75,80 @@ const CellEditorView = props => { ); }; +const FunctionsList = props => { + const isPhone = Device.isPhone; + const functions = props.functions; + const funcArr = props.funcArr; + const hintArr = props.hintArr; + const functionsList = document.querySelector('#functions-list'); + + useEffect(() => { + if(functionsList) { + const height = functionsList.offsetHeight + 'px'; + functionsList.closest('.view').style.height = height; + } + }, [funcArr]); + + return ( +
+ + {funcArr && funcArr.length && funcArr.map((elem, index) => { + return ( + props.insertFormula(elem.name, elem.type)}> + {(functions[elem.name] || hintArr[index]?.descr) && +
{ + e.stopPropagation(); + let functionInfo = functions[elem.name] || hintArr[index]; + + if(functionInfo) { + f7.views.current.router.navigate('/function-info/', {props: {functionInfo, functionObj: elem, insertFormula: props.insertFormula}}); + } + }}> + +
+ } +
+ ) + })} +
+
+ ) +} + +const FunctionInfo = props => { + const { t } = useTranslation(); + const _t = t('View.Add', {returnObjects: true}); + const functionObj = props.functionObj; + const functionInfo = props.functionInfo; + const functionsList = document.querySelector('#functions-list'); + + useEffect(() => { + if(functionsList) { + const height = functionsList.offsetHeight + 'px'; + functionsList.closest('.view').style.height = '200px'; + + return () => { + functionsList.closest('.view').style.height = height; + } + } + }, [functionsList]); + + return ( + + + + props.insertFormula(functionObj.name, functionObj.type)}> + + +
+

{functionInfo.caption && functionInfo.args ? `${functionInfo.caption} ${functionInfo.args}` : functionInfo.name}

+

{functionInfo.descr}

+
+
+ ) +} + const routes = [ { path: '/function-info/', From 47e7fc10621b89133af678b8f2d6048669750e9c Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Tue, 26 Jul 2022 22:22:28 +0300 Subject: [PATCH 3/5] [DE mobile] Fix Bug 58050 --- apps/common/mobile/resources/less/common.less | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/common/mobile/resources/less/common.less b/apps/common/mobile/resources/less/common.less index 837e210ac..f3a948d30 100644 --- a/apps/common/mobile/resources/less/common.less +++ b/apps/common/mobile/resources/less/common.less @@ -1138,6 +1138,8 @@ input[type="number"]::-webkit-inner-spin-button { // Navigation list .list.navigation-list { + overflow-y: auto; + height: 265px; .item-title { color: @text-normal; } From 0632518f8438ac5cb461b48ac0e005673898c880 Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Tue, 26 Jul 2022 23:16:45 +0300 Subject: [PATCH 4/5] [DE mobile] Fix Bug 58044 --- .../mobile/src/view/edit/EditTableContents.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/documenteditor/mobile/src/view/edit/EditTableContents.jsx b/apps/documenteditor/mobile/src/view/edit/EditTableContents.jsx index 581c882ef..516dc69da 100644 --- a/apps/documenteditor/mobile/src/view/edit/EditTableContents.jsx +++ b/apps/documenteditor/mobile/src/view/edit/EditTableContents.jsx @@ -260,12 +260,12 @@ const PageEditStructureTableContents = props => { {styles.map((style, index) => { return ( - - {!isAndroid &&
{style.value}
} + = 1}> + {!isAndroid &&
{style.value === 0 ? '' : style.value}
}