From deb0e2f85b179116684d787c9e2f009f7b33bdf4 Mon Sep 17 00:00:00 2001 From: Gazook89 Date: Sun, 30 Jul 2023 15:00:42 -0500 Subject: [PATCH 1/9] add meta viewport tag in header --- client/template.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/template.js b/client/template.js index cab4790b9..5a6c5a271 100644 --- a/client/template.js +++ b/client/template.js @@ -11,6 +11,8 @@ const template = async function(name, title='', props = {}){ return ` + + From 1f173814ec76032fd946972b4ffb45930b33db08 Mon Sep 17 00:00:00 2001 From: Gazook89 Date: Sun, 30 Jul 2023 19:40:39 -0500 Subject: [PATCH 2/9] Add viewport meta tag for mobile view. --- client/template.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/client/template.js b/client/template.js index 5a6c5a271..e8ac8e22f 100644 --- a/client/template.js +++ b/client/template.js @@ -11,8 +11,7 @@ const template = async function(name, title='', props = {}){ return ` - - + From bda8037cd68fe6019bb00d2647796086379c23ea Mon Sep 17 00:00:00 2001 From: Gazook89 Date: Sun, 30 Jul 2023 20:12:16 -0500 Subject: [PATCH 3/9] change onMouse events to onPointer events for mobile use. --- shared/naturalcrit/splitPane/splitPane.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shared/naturalcrit/splitPane/splitPane.jsx b/shared/naturalcrit/splitPane/splitPane.jsx index 38f84b220..4ecd3ef2a 100644 --- a/shared/naturalcrit/splitPane/splitPane.jsx +++ b/shared/naturalcrit/splitPane/splitPane.jsx @@ -122,7 +122,7 @@ const SplitPane = createClass({ renderDivider : function(){ return <> {this.renderMoveArrows()} -
+
@@ -133,7 +133,7 @@ const SplitPane = createClass({ }, render : function(){ - return
+ return
Date: Sun, 30 Jul 2023 20:49:16 -0500 Subject: [PATCH 4/9] preventDefaults on pointerEvents to prevent some default behavior. --- shared/naturalcrit/splitPane/splitPane.jsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/shared/naturalcrit/splitPane/splitPane.jsx b/shared/naturalcrit/splitPane/splitPane.jsx index 4ecd3ef2a..df8d940b0 100644 --- a/shared/naturalcrit/splitPane/splitPane.jsx +++ b/shared/naturalcrit/splitPane/splitPane.jsx @@ -61,7 +61,8 @@ const SplitPane = createClass({ return result; }, - handleUp : function(){ + handleUp : function(e){ + e.preventDefault(); if(this.state.isDragging){ this.props.onDragFinish(this.state.currentDividerPos); window.localStorage.setItem(this.props.storageKey, this.state.currentDividerPos); @@ -76,6 +77,8 @@ const SplitPane = createClass({ }, handleMove : function(e){ + + e.preventDefault(); if(!this.state.isDragging) return; const newSize = this.limitPosition(e.pageX); From 73e44b8d7a2b28e9ff544208b07ff5bea9349d77 Mon Sep 17 00:00:00 2001 From: Gazook89 Date: Mon, 31 Jul 2023 15:06:09 -0500 Subject: [PATCH 5/9] add `touch-action` css property to splitPane --- shared/naturalcrit/splitPane/splitPane.less | 1 + 1 file changed, 1 insertion(+) diff --git a/shared/naturalcrit/splitPane/splitPane.less b/shared/naturalcrit/splitPane/splitPane.less index bba4c21c1..4196011b9 100644 --- a/shared/naturalcrit/splitPane/splitPane.less +++ b/shared/naturalcrit/splitPane/splitPane.less @@ -1,5 +1,6 @@ .splitPane{ + touch-action: none; position : relative; display : flex; height : 100%; From 0bde3362269caf657f9f2ce9c1cb28bea1f18520 Mon Sep 17 00:00:00 2001 From: Gazook89 Date: Mon, 31 Jul 2023 22:20:27 -0500 Subject: [PATCH 6/9] move all pointer events to divider, not splitPane --- shared/naturalcrit/splitPane/splitPane.jsx | 4 ++-- shared/naturalcrit/splitPane/splitPane.less | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/shared/naturalcrit/splitPane/splitPane.jsx b/shared/naturalcrit/splitPane/splitPane.jsx index df8d940b0..4281b0dad 100644 --- a/shared/naturalcrit/splitPane/splitPane.jsx +++ b/shared/naturalcrit/splitPane/splitPane.jsx @@ -125,7 +125,7 @@ const SplitPane = createClass({ renderDivider : function(){ return <> {this.renderMoveArrows()} -
+
@@ -136,7 +136,7 @@ const SplitPane = createClass({ }, render : function(){ - return
+ return
Date: Tue, 1 Aug 2023 13:29:57 -0500 Subject: [PATCH 7/9] set editor font size to 16px on touchscreens iOS requires minimum 16px font to prevent auto-zooming into input fields. --- shared/naturalcrit/codeEditor/codeEditor.less | 3 +++ 1 file changed, 3 insertions(+) diff --git a/shared/naturalcrit/codeEditor/codeEditor.less b/shared/naturalcrit/codeEditor/codeEditor.less index 1334299e4..80af543d9 100644 --- a/shared/naturalcrit/codeEditor/codeEditor.less +++ b/shared/naturalcrit/codeEditor/codeEditor.less @@ -9,6 +9,9 @@ } .codeEditor{ + @media screen and (pointer : coarse) { + font-size : 16px; + } .CodeMirror-foldmarker { font-family: inherit; text-shadow: none; From 2e13eed2ef37b135f8cf7b04989aff46bc5510e6 Mon Sep 17 00:00:00 2001 From: Gazook89 Date: Tue, 1 Aug 2023 13:52:44 -0500 Subject: [PATCH 8/9] revert moving pointerMove & pointerUp, now on splitPane --- shared/naturalcrit/splitPane/splitPane.jsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/shared/naturalcrit/splitPane/splitPane.jsx b/shared/naturalcrit/splitPane/splitPane.jsx index 4281b0dad..47f8ceafe 100644 --- a/shared/naturalcrit/splitPane/splitPane.jsx +++ b/shared/naturalcrit/splitPane/splitPane.jsx @@ -63,6 +63,7 @@ const SplitPane = createClass({ handleUp : function(e){ e.preventDefault(); + console.log('up'); if(this.state.isDragging){ this.props.onDragFinish(this.state.currentDividerPos); window.localStorage.setItem(this.props.storageKey, this.state.currentDividerPos); @@ -72,6 +73,8 @@ const SplitPane = createClass({ handleDown : function(e){ e.preventDefault(); + + console.log('down'); this.setState({ isDragging: true }); //this.unFocus() }, @@ -79,6 +82,8 @@ const SplitPane = createClass({ handleMove : function(e){ e.preventDefault(); + + console.log('move'); if(!this.state.isDragging) return; const newSize = this.limitPosition(e.pageX); @@ -125,7 +130,7 @@ const SplitPane = createClass({ renderDivider : function(){ return <> {this.renderMoveArrows()} -
+
@@ -136,7 +141,7 @@ const SplitPane = createClass({ }, render : function(){ - return
+ return
Date: Tue, 1 Aug 2023 14:16:31 -0500 Subject: [PATCH 9/9] remove logs --- shared/naturalcrit/splitPane/splitPane.jsx | 6 ------ 1 file changed, 6 deletions(-) diff --git a/shared/naturalcrit/splitPane/splitPane.jsx b/shared/naturalcrit/splitPane/splitPane.jsx index 47f8ceafe..c4cd207c2 100644 --- a/shared/naturalcrit/splitPane/splitPane.jsx +++ b/shared/naturalcrit/splitPane/splitPane.jsx @@ -63,7 +63,6 @@ const SplitPane = createClass({ handleUp : function(e){ e.preventDefault(); - console.log('up'); if(this.state.isDragging){ this.props.onDragFinish(this.state.currentDividerPos); window.localStorage.setItem(this.props.storageKey, this.state.currentDividerPos); @@ -73,17 +72,12 @@ const SplitPane = createClass({ handleDown : function(e){ e.preventDefault(); - - console.log('down'); this.setState({ isDragging: true }); //this.unFocus() }, handleMove : function(e){ - e.preventDefault(); - - console.log('move'); if(!this.state.isDragging) return; const newSize = this.limitPosition(e.pageX);