From 8ad59098d1a6a9987c1da45c7d93d13b8b208e87 Mon Sep 17 00:00:00 2001 From: ammarahm-ed Date: Wed, 1 Dec 2021 19:30:11 +0500 Subject: [PATCH 01/24] change color of link --- apps/mobile/html/Web.bundle/site/constants.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/apps/mobile/html/Web.bundle/site/constants.js b/apps/mobile/html/Web.bundle/site/constants.js index d6ac5522e..7421f313a 100755 --- a/apps/mobile/html/Web.bundle/site/constants.js +++ b/apps/mobile/html/Web.bundle/site/constants.js @@ -221,7 +221,10 @@ function setTheme() { .tox .tox-toolbar__primary { background: none !important; border-bottom: 1px solid ${pageTheme.colors.nav} !important; - }`; + } + + + `; let node2 = ` .mce-content-body table[data-mce-selected], { @@ -250,6 +253,17 @@ function setTheme() { opacity:0.5; } +.mce-content-body a { + color: ${pageTheme.colors.accent} !important; +} + +.mce-content-body [data-mce-selected="inline-boundary"] { + background-color: ${pageTheme.colors.shade} !important; +} +.mce-content-body a[data-mce-selected] { + box-shadow: none !important; +} + span.attachment { overflow: hidden; position: relative; From a4c2471f93eb96742aacd35fca70ae59a4a89fa9 Mon Sep 17 00:00:00 2001 From: ammarahm-ed Date: Wed, 1 Dec 2021 19:30:53 +0500 Subject: [PATCH 02/24] editor: set keep_styles to false --- apps/mobile/html/Web.bundle/site/init.js | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/mobile/html/Web.bundle/site/init.js b/apps/mobile/html/Web.bundle/site/init.js index 8a49b3667..93059ba6a 100755 --- a/apps/mobile/html/Web.bundle/site/init.js +++ b/apps/mobile/html/Web.bundle/site/init.js @@ -136,6 +136,7 @@ function init_tiny(size) { 'media imagetools table paste wordcount autoresize directionality blockescape contenthandler' ], toolbar: false, + keep_styles:false, paste_data_images: true, statusbar: false, textpattern_patterns: markdownPatterns, From ad5c3882a435f66a12946243d2b71259e900e688 Mon Sep 17 00:00:00 2001 From: ammarahm-ed Date: Wed, 1 Dec 2021 19:31:27 +0500 Subject: [PATCH 03/24] fix link input cannot be focused --- apps/mobile/src/views/Editor/tiny/toolbar/linkinput.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/apps/mobile/src/views/Editor/tiny/toolbar/linkinput.js b/apps/mobile/src/views/Editor/tiny/toolbar/linkinput.js index 28fe97ad6..d0ebce224 100644 --- a/apps/mobile/src/views/Editor/tiny/toolbar/linkinput.js +++ b/apps/mobile/src/views/Editor/tiny/toolbar/linkinput.js @@ -36,11 +36,6 @@ const ToolbarLinkInput = ({format, value, setVisible}) => { properties.inputMode = value ? INPUT_MODE.NO_EDIT : INPUT_MODE.EDITING; editing.tooltip = format; properties.userBlur = false; - if (properties.pauseSelectionChange) { - setTimeout(() => { - properties.pauseSelectionChange = false; - }, 100); - } return () => { properties.inputMode = null; editing.tooltip = null; @@ -53,7 +48,7 @@ const ToolbarLinkInput = ({format, value, setVisible}) => { if (properties.pauseSelectionChange) { setTimeout(() => { properties.pauseSelectionChange = false; - }, 100); + }, 500); } inputRef.current?.focus(); return; From fd272c13727d288bc84b9f80bd72145d1c2dc8ee Mon Sep 17 00:00:00 2001 From: ammarahm-ed Date: Wed, 1 Dec 2021 19:44:04 +0500 Subject: [PATCH 04/24] change selection color to accent color --- apps/mobile/html/Web.bundle/site/constants.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/apps/mobile/html/Web.bundle/site/constants.js b/apps/mobile/html/Web.bundle/site/constants.js index 7421f313a..59f3ba6fd 100755 --- a/apps/mobile/html/Web.bundle/site/constants.js +++ b/apps/mobile/html/Web.bundle/site/constants.js @@ -222,6 +222,12 @@ function setTheme() { background: none !important; border-bottom: 1px solid ${pageTheme.colors.nav} !important; } + + ::selection { + color: white !important; + background: ${pageTheme.colors.accent} !important; + } + `; @@ -260,6 +266,13 @@ function setTheme() { .mce-content-body [data-mce-selected="inline-boundary"] { background-color: ${pageTheme.colors.shade} !important; } + +::selection { + color: white !important; + background: ${pageTheme.colors.accent} !important; +} + + .mce-content-body a[data-mce-selected] { box-shadow: none !important; } From e163a546648d9925b6c0abeb0509ca089b20e172 Mon Sep 17 00:00:00 2001 From: ammarahm-ed Date: Wed, 1 Dec 2021 21:35:36 +0500 Subject: [PATCH 05/24] update notes-core From 4ed808bad1a64f912bc3eed28e3895e25b567eaa Mon Sep 17 00:00:00 2001 From: ammarahm-ed Date: Thu, 2 Dec 2021 09:35:29 +0500 Subject: [PATCH 06/24] defer updating screen on changing sort direction --- .../mobile/src/components/SortDialog/index.js | 28 +++++++++++++------ 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/apps/mobile/src/components/SortDialog/index.js b/apps/mobile/src/components/SortDialog/index.js index efe82477c..44eef5163 100644 --- a/apps/mobile/src/components/SortDialog/index.js +++ b/apps/mobile/src/components/SortDialog/index.js @@ -66,8 +66,10 @@ class SortDialog extends React.Component { this.setState({ groupOptions: _groupOptions }); - Navigation.setRoutesToUpdate([this.props.screen]); - eSendEvent('groupOptionsUpdate'); + setTimeout(() => { + Navigation.setRoutesToUpdate([this.props.screen]); + eSendEvent('groupOptionsUpdate'); + }, 1); }; render() { @@ -145,7 +147,11 @@ class SortDialog extends React.Component { paddingHorizontal: 12 }}> {this.state.groupOptions.groupBy === 'abc' ? ( - + No sort options available. ) : ( @@ -162,7 +168,6 @@ class SortDialog extends React.Component { : 'checkbox-blank-circle-outline' } textStyle={{ - fontWeight: 'normal', color: colors.pri }} fontSize={SIZE.sm} @@ -183,13 +188,16 @@ class SortDialog extends React.Component { {Object.keys(GROUP).map((item, index) => ( { let _groupOptions = { ...groupOptions, @@ -198,6 +206,7 @@ class SortDialog extends React.Component { if (item === 'alphabetical') { _groupOptions.sortBy = 'title'; + _groupOptions.sortDirection = 'asc'; } else { if (this.state.groupOptions.sortBy === 'title') { _groupOptions.sortBy = 'dateEdited'; @@ -219,8 +228,10 @@ class SortDialog extends React.Component { {item.slice(0, 1).toUpperCase() + item.slice(1, item.length)} + {groupOptions.groupBy === GROUP[item] ? ( ) : null} From f221cf8275304adf471d91af5146a677318095f1 Mon Sep 17 00:00:00 2001 From: ammarahm-ed Date: Thu, 2 Dec 2021 11:52:08 +0500 Subject: [PATCH 07/24] update note item ui --- apps/mobile/src/components/NoteItem/index.js | 107 +++++++------------ apps/mobile/src/utils/TimeUtils.js | 24 +++-- 2 files changed, 54 insertions(+), 77 deletions(-) diff --git a/apps/mobile/src/components/NoteItem/index.js b/apps/mobile/src/components/NoteItem/index.js index 5942d9eb6..b0b5fa394 100644 --- a/apps/mobile/src/components/NoteItem/index.js +++ b/apps/mobile/src/components/NoteItem/index.js @@ -123,9 +123,7 @@ const NoteItem = ({item, isTrash, tags}) => { fontSize={SIZE.xs + 1} iconSize={SIZE.sm} textStyle={{ - marginRight: 0, - fontWeight: 'normal', - fontFamily: null + marginRight: 0 }} style={{ borderRadius: 5, @@ -137,31 +135,6 @@ const NoteItem = ({item, isTrash, tags}) => { onPress={() => navigateToTopic(_item.topic)} /> ))} - {!isTrash && tags - ? tags.slice(0, 2)?.map(item => ( -