From 67772865cfb55615132b579d689d9d2815753204 Mon Sep 17 00:00:00 2001 From: Piero Toffanin Date: Tue, 25 Jun 2024 16:18:01 -0400 Subject: [PATCH 1/5] Mobile viewport fixes --- app/static/app/css/main.scss | 12 ++++++++++++ app/static/app/js/MapView.jsx | 5 +++-- app/static/app/js/css/MapView.scss | 6 ++++++ app/templates/app/3d_model_display.html | 2 +- app/templates/app/public/3d_model_display.html | 2 +- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/app/static/app/css/main.scss b/app/static/app/css/main.scss index b2908526e..bc69c3404 100644 --- a/app/static/app/css/main.scss +++ b/app/static/app/css/main.scss @@ -34,6 +34,7 @@ html, body, section.main, .content, #wrapper, #page-wrapper{ } [data-mapview], .model-view{ height: calc(100vh); + height: calc(100dvh); } } @@ -117,6 +118,9 @@ ul#side-menu.nav{ padding-top: 4px; margin-top: 0; } + h3{ + font-size: 24px; + } } .top-buffer { @@ -147,6 +151,7 @@ ul#side-menu.nav{ .modal-body { max-height: calc(100vh - 220px); + max-height: calc(100dvh - 220px); overflow-y: auto; } @@ -263,9 +268,16 @@ footer{ .full-height{ height: calc(100vh - 110px); + height: calc(100dvh - 110px); padding-bottom: 12px; } .floatfix{ clear: both; } + +.model-title{ + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; +} \ No newline at end of file diff --git a/app/static/app/js/MapView.jsx b/app/static/app/js/MapView.jsx index 10931964f..f4e4e3a8d 100644 --- a/app/static/app/js/MapView.jsx +++ b/app/static/app/js/MapView.jsx @@ -117,12 +117,13 @@ class MapView extends React.Component { + title={mapType.label} + className={"btn btn-sm " + (mapType.type === this.state.selectedMapType ? "btn-primary" : "btn-default")}> {mapType.label} )} {this.props.title ? -

{this.props.title}

+

{this.props.title}

: ""}
diff --git a/app/static/app/js/css/MapView.scss b/app/static/app/js/css/MapView.scss index e07a423b6..171ae2518 100644 --- a/app/static/app/js/css/MapView.scss +++ b/app/static/app/js/css/MapView.scss @@ -1,8 +1,14 @@ [data-mapview]{ height: calc(100vh - 100px); + height: calc(100dvh - 100px); } .map-view{ + .map-title{ + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; + } height: calc(100% - 20px); position: relative; diff --git a/app/templates/app/3d_model_display.html b/app/templates/app/3d_model_display.html index e6f4a5454..9cc0b7db2 100644 --- a/app/templates/app/3d_model_display.html +++ b/app/templates/app/3d_model_display.html @@ -27,7 +27,7 @@ {% load render_bundle from webpack_loader %} {% render_bundle 'ModelView' attrs='async' %} -

{{title}}

+

{{title}}

{{title}} +

{{title}}

Date: Thu, 27 Jun 2024 15:17:46 -0400 Subject: [PATCH 2/5] Fix map view mobile quirks --- app/static/app/css/main.scss | 3 +-- app/static/app/js/MapView.jsx | 26 ++++++++++++++------------ app/static/app/js/css/Map.scss | 4 ++++ app/static/app/js/css/MapView.scss | 12 ++++++++---- app/static/app/js/css/ModelView.scss | 4 ++++ 5 files changed, 31 insertions(+), 18 deletions(-) diff --git a/app/static/app/css/main.scss b/app/static/app/css/main.scss index bc69c3404..90747ccc7 100644 --- a/app/static/app/css/main.scss +++ b/app/static/app/css/main.scss @@ -111,7 +111,6 @@ ul#side-menu.nav{ } .content{ - clear: both; padding-top: 8px; h1,h2,h3,h4,h5{ @@ -221,7 +220,7 @@ button i.glyphicon{ float: right; margin-right: 15px; padding: 9px 10px; - margin-top: 5px; + margin-top: 7px; margin-bottom: 5px; } diff --git a/app/static/app/js/MapView.jsx b/app/static/app/js/MapView.jsx index f4e4e3a8d..a6316e69b 100644 --- a/app/static/app/js/MapView.jsx +++ b/app/static/app/js/MapView.jsx @@ -112,19 +112,21 @@ class MapView extends React.Component { if (mapTypeButtons.length === 1) mapTypeButtons = []; return (
-
- {mapTypeButtons.map(mapType => - - )} +
+ {this.props.title ? +

{this.props.title}

+ : ""} + +
+ {mapTypeButtons.map(mapType => + + )} +
- - {this.props.title ? -

{this.props.title}

- : ""}
.leaflet-container{ + width: 100%; + } } \ No newline at end of file diff --git a/app/static/app/js/css/MapView.scss b/app/static/app/js/css/MapView.scss index 171ae2518..5f709f601 100644 --- a/app/static/app/js/css/MapView.scss +++ b/app/static/app/js/css/MapView.scss @@ -20,10 +20,6 @@ top: 6px; } - .map-type-selector{ - float: right; - } - .map-container{ height: 100%; position: relative; @@ -31,4 +27,12 @@ z-index: 99999; } } + + .map-view-header{ + display: flex; + justify-content: space-between; + .map-type-selector{ + flex: none; + } + } } \ No newline at end of file diff --git a/app/static/app/js/css/ModelView.scss b/app/static/app/js/css/ModelView.scss index d10164249..6cf23f8b7 100644 --- a/app/static/app/js/css/ModelView.scss +++ b/app/static/app/js/css/ModelView.scss @@ -116,6 +116,10 @@ #show_2d_profile{ color: initial !important; } + + h3{ + font-size: 14px; + } } #potree_map_header{ From 53fa8fddf0d7f1a3af51bfcbcd2ae79d6e0ed7af Mon Sep 17 00:00:00 2001 From: Piero Toffanin Date: Thu, 27 Jun 2024 15:57:45 -0400 Subject: [PATCH 3/5] Fix modals, paginator search --- app/static/app/css/main.scss | 2 +- app/static/app/js/css/Paginator.scss | 13 ++++++++++++- app/templates/app/base.html | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/app/static/app/css/main.scss b/app/static/app/css/main.scss index 90747ccc7..ed8a59213 100644 --- a/app/static/app/css/main.scss +++ b/app/static/app/css/main.scss @@ -279,4 +279,4 @@ footer{ text-overflow: ellipsis; overflow: hidden; white-space: nowrap; -} \ No newline at end of file +} diff --git a/app/static/app/js/css/Paginator.scss b/app/static/app/js/css/Paginator.scss index b3f3aff6e..d0f78a19d 100644 --- a/app/static/app/js/css/Paginator.scss +++ b/app/static/app/js/css/Paginator.scss @@ -13,7 +13,8 @@ } } .btn-group.open > .dropdown-menu{ - top: 22px; + top: 24px; + padding-right: 4px; a{ border: none; } @@ -31,6 +32,10 @@ max-width: 210px; } + .pagination>li{ + display: inline-block; + } + .search-popup{ min-width: 256px; @@ -48,6 +53,12 @@ } } + @media (max-width: 576px) { + .search-popup{ + min-width: 180px; + } + } + .clear-search{ margin-top: 1px; font-weight: bold; diff --git a/app/templates/app/base.html b/app/templates/app/base.html index 9114d5d54..380de376e 100644 --- a/app/templates/app/base.html +++ b/app/templates/app/base.html @@ -22,7 +22,7 @@ - + From 1e78755dab06ffc5cc7e19b42ffb7cbd4adcca5f Mon Sep 17 00:00:00 2001 From: Piero Toffanin Date: Thu, 27 Jun 2024 16:19:16 -0400 Subject: [PATCH 4/5] Fix tags field on firefox --- app/static/app/js/css/TagsField.scss | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/static/app/js/css/TagsField.scss b/app/static/app/js/css/TagsField.scss index dc744d0c1..3c7a07820 100644 --- a/app/static/app/js/css/TagsField.scss +++ b/app/static/app/js/css/TagsField.scss @@ -1,5 +1,6 @@ .tags-field{ height: auto; + min-height: 45px; padding-bottom: 2px; &:hover{ @@ -31,6 +32,7 @@ } .inputText{ display: inline-block; + position: fixed; outline: none; border: none; margin-bottom: 10px; From 825c638b164dbd91d0841f743be33d9e31477c06 Mon Sep 17 00:00:00 2001 From: Piero Toffanin Date: Tue, 2 Jul 2024 12:30:33 -0400 Subject: [PATCH 5/5] Fix task list on mobile --- .../js/components/AssetDownloadButtons.jsx | 2 +- .../app/js/components/EditProjectDialog.jsx | 2 +- app/static/app/js/components/FormDialog.jsx | 4 +-- .../app/js/components/ProjectListItem.jsx | 4 +-- app/static/app/js/components/TaskListItem.jsx | 26 +++++------------- app/static/app/js/css/ProjectListItem.scss | 27 ++++--------------- app/static/app/js/css/TaskListItem.scss | 16 +++++++++-- 7 files changed, 31 insertions(+), 50 deletions(-) diff --git a/app/static/app/js/components/AssetDownloadButtons.jsx b/app/static/app/js/components/AssetDownloadButtons.jsx index 445d62d6f..da128f533 100644 --- a/app/static/app/js/components/AssetDownloadButtons.jsx +++ b/app/static/app/js/components/AssetDownloadButtons.jsx @@ -53,7 +53,7 @@ class AssetDownloadButtons extends React.Component { : ""} {this.props.showLabel ? ] : undefined} + leftButtons={this.props.showDuplicate ? [] : undefined} ref={(domNode) => { this.dialog = domNode; }}>
diff --git a/app/static/app/js/components/FormDialog.jsx b/app/static/app/js/components/FormDialog.jsx index 0314405e9..608d7608b 100644 --- a/app/static/app/js/components/FormDialog.jsx +++ b/app/static/app/js/components/FormDialog.jsx @@ -166,10 +166,10 @@ class FormDialog extends React.Component { onClick={this.handleDelete}> {this.state.deleting ? - {_("Deleting...")} + {_("Deleting...")} : - {_("Delete")} + {_("Delete")} } ); } diff --git a/app/static/app/js/components/ProjectListItem.jsx b/app/static/app/js/components/ProjectListItem.jsx index 6a7cc488e..e689e591f 100644 --- a/app/static/app/js/components/ProjectListItem.jsx +++ b/app/static/app/js/components/ProjectListItem.jsx @@ -638,12 +638,12 @@ class ProjectListItem extends React.Component { onClick={this.handleUpload} ref={this.setRef("uploadButton")}> - {_("Select Images and GCP")} + {_("Select Images and GCP")} {this.state.buttons.map((button, i) => {button})}
diff --git a/app/static/app/js/components/TaskListItem.jsx b/app/static/app/js/components/TaskListItem.jsx index f895582a0..01b8d91a8 100644 --- a/app/static/app/js/components/TaskListItem.jsx +++ b/app/static/app/js/components/TaskListItem.jsx @@ -507,7 +507,7 @@ class TaskListItem extends React.Component { let buttonHtml = (); if (subItems.length > 0){ // The button expands sub items @@ -654,7 +654,7 @@ class TaskListItem extends React.Component { return (
{text}
); + title={text}> {text}
); } let statusLabel = ""; @@ -739,36 +739,22 @@ class TaskListItem extends React.Component { /> : ""}
-
+
{name} {userTags.length > 0 ? userTags.map((t, i) =>
{t}
) : ""}
-
+
{task.images_count}
-
+
{this.hoursMinutesSecs(this.state.time)}
-
- {taskActions.length > 0 ? -
- -
    - {taskActions} -
-
- : ""} -
-
+
{showEditLink ? {statusLabel} : statusLabel} -
-
{taskActions.length > 0 ?