Skip to content

Commit dc788cc

Browse files
MichaelBuessemeyerAaron Kanzer
authored and
Aaron Kanzer
committed
Improve mobile support of views (scalableminds#7876)
* make login, registration and forgot password view more responsive to mobile devices - includes adding a link back to login for password reset view * make dashboard dataset view less awful * add changelog entry
1 parent 4db2913 commit dc788cc

File tree

7 files changed

+11
-9
lines changed

7 files changed

+11
-9
lines changed

CHANGELOG.unreleased.md

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released
2020
### Changed
2121
- The "WEBKNOSSOS Changelog" modal now lazily loads its content potentially speeding up the initial loading time of WEBKNOSSOS and thus improving the UX. [#7843](https://github.com/scalableminds/webknossos/pull/7843)
2222
- Updated the min max settings for the histogram to allow floating point color layers to have negative min / max values. [#7873](https://github.com/scalableminds/webknossos/pull/7873)
23+
- Made the login, registration, forgot password and dataset dashboard pages more mobile friendly. [#7876](https://github.com/scalableminds/webknossos/pull/7876)
2324
- From now on only project owner get a notification email upon project overtime. The organization specific email list `overTimeMailingList` was removed. [#7842](https://github.com/scalableminds/webknossos/pull/7842)
2425
- Replaced skeleton comment tab component with antd's `<Tree />`component. [#7802](https://github.com/scalableminds/webknossos/pull/7802)
2526

frontend/javascripts/admin/auth/login_view.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ function LoginView({ history, redirect }: Props) {
2929

3030
return (
3131
<Row justify="center" align="middle" className="login-view">
32-
<Col>
32+
<Col xs={22} sm={20} md={16} lg={12} xl={8}>
3333
<Card className="login-content">
3434
<h3>Login</h3>
3535
<LoginForm layout="horizontal" onLoggedIn={onLoggedIn} />

frontend/javascripts/admin/auth/registration_view.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ function RegistrationViewGeneric() {
8383
<Spin spinning={isLoading}>
8484
<Row justify="center" align="middle" className="login-view">
8585
<Col>
86-
<Card className="login-content drawing-signup" style={{ width: 1000 }}>
86+
<Card className="login-content drawing-signup" style={{ maxWidth: 1000 }}>
8787
<h3>Sign Up</h3>
8888
{content}
8989
<Link to="/auth/login">Already have an account? Login instead.</Link>
@@ -99,7 +99,7 @@ function RegistrationViewWkOrg() {
9999
return (
100100
<Row justify="center" align="middle" className="login-view">
101101
<Col>
102-
<Card className="login-content drawing-signup" style={{ width: 1000 }}>
102+
<Card className="login-content drawing-signup" style={{ maxWidth: 1000 }}>
103103
<h3>Sign Up</h3>
104104
<RegistrationFormWKOrg
105105
onRegistered={() => {

frontend/javascripts/admin/auth/start_reset_password_view.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from "react";
2-
import { RouteComponentProps, withRouter } from "react-router-dom";
2+
import { Link, RouteComponentProps, withRouter } from "react-router-dom";
33
import { Form, Input, Button, Col, Row, Card } from "antd";
44
import { MailOutlined } from "@ant-design/icons";
55
import Request from "libs/request";
@@ -61,6 +61,7 @@ function StartResetPasswordView({ history }: Props) {
6161
</Button>
6262
</FormItem>
6363
</Form>
64+
<Link to="/auth/login">Back to Login</Link>
6465
</Card>
6566
</Col>
6667
</Row>

frontend/javascripts/components/brain_spinner.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export function CoverWithLogin({ onLoggedIn }: { onLoggedIn: () => void }) {
106106
}}
107107
align="middle"
108108
>
109-
<Col span={8}>
109+
<Col xs={22} sm={20} md={16} lg={12} xl={8}>
110110
<h3>Try logging in to view the dataset.</h3>
111111
<LoginForm layout="horizontal" onLoggedIn={onLoggedIn} />
112112
</Col>

frontend/javascripts/dashboard/dataset_folder_view.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ function DatasetFolderViewInner(props: Props) {
203203
<div
204204
style={{
205205
display: "grid",
206-
gridTemplate: "auto / auto 1fr auto",
206+
gridTemplate: "auto / auto minmax(60%, 1fr) auto",
207207
flexGrow: 1,
208208
minHeight: 0,
209209
}}
@@ -224,7 +224,7 @@ function DatasetFolderViewInner(props: Props) {
224224
>
225225
<FolderTreeSidebar setFolderIdForEditModal={setFolderIdForEditModal} />
226226
</div>
227-
<main style={{ gridColumn: "2 / 2", overflow: "auto", paddingRight: 4 }}>
227+
<main style={{ gridColumn: "2 / 3", overflow: "auto", paddingRight: 4 }}>
228228
<DatasetView
229229
user={props.user}
230230
onSelectDataset={setSelectedDataset}

frontend/stylesheets/main.less

+2-2
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,7 @@ button.narrow {
618618
}
619619

620620
.login-content {
621-
width: 600px;
621+
max-width: 600px;
622622
padding: 80px;
623623

624624
@media @smartphones {
@@ -652,7 +652,7 @@ button.narrow {
652652
}
653653

654654
.task-annotation-view {
655-
width: 31%
655+
width: 31%;
656656
}
657657

658658
.organization-switch-menu > ul {

0 commit comments

Comments
 (0)