Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure appropriate width of table columns #4207

Merged
merged 28 commits into from
Aug 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
c8476ce
made antd tables scrollable and added wordbreak for them;
MichaelBuessemeyer Jun 17, 2019
bc8f8a9
Merge branch 'master' of github.com:scalableminds/webknossos into mak…
MichaelBuessemeyer Jun 20, 2019
2b55630
change color of the dataset name in the table back to black/grey
MichaelBuessemeyer Jun 20, 2019
62450f1
Updated the changelog
MichaelBuessemeyer Jun 20, 2019
dc76ec5
Merge branch 'master' of github.com:scalableminds/webknossos into mak…
MichaelBuessemeyer Jun 20, 2019
5506230
Merge branch 'master' into make-tables-scrollable
MichaelBuessemeyer Jun 21, 2019
93df5c5
Merge branch 'master' of github.com:scalableminds/webknossos into mak…
MichaelBuessemeyer Jun 27, 2019
24a3169
apllying fix only to dataset table & set min width
MichaelBuessemeyer Jun 27, 2019
94ab418
Merge branch 'make-tables-scrollable' of github.com:scalableminds/web…
MichaelBuessemeyer Jun 27, 2019
fea8478
Merge branch 'master' into make-tables-scrollable
MichaelBuessemeyer Jun 27, 2019
c00ac34
Merge branch 'master' of github.com:scalableminds/webknossos into mak…
MichaelBuessemeyer Jun 28, 2019
78c759f
also apply table scroll fix to explorative annotations table
MichaelBuessemeyer Jun 28, 2019
92a8261
Merge branch 'make-tables-scrollable' of github.com:scalableminds/web…
MichaelBuessemeyer Jun 28, 2019
2c1652d
Update CHANGELOG.md
MichaelBuessemeyer Jul 2, 2019
e275b75
Update CHANGELOG.md
MichaelBuessemeyer Jul 2, 2019
d9954ea
Merge branch 'master' into make-tables-scrollable
MichaelBuessemeyer Jul 2, 2019
6c2cbbe
merged origin:master into this branch
MichaelBuessemeyer Jul 26, 2019
658d1c6
Merge branch 'make-tables-scrollable' of github.com:scalableminds/web…
MichaelBuessemeyer Jul 26, 2019
e4b2f0d
setting width of columns manually
MichaelBuessemeyer Jul 26, 2019
70304dd
Merge branch 'master' into make-tables-scrollable
MichaelBuessemeyer Jul 29, 2019
5b94697
added changelog entry
MichaelBuessemeyer Jul 29, 2019
3523e43
added css rule to not word break column titles
MichaelBuessemeyer Jul 31, 2019
7df2383
Merge branch 'master' into make-tables-scrollable
MichaelBuessemeyer Jul 31, 2019
2bd7fc2
Merge branch 'master' into make-tables-scrollable
philippotto Aug 5, 2019
452411d
Merge branch 'master' into make-tables-scrollable
normanrz Aug 8, 2019
b1cf760
increased name and scale column min-width
MichaelBuessemeyer Aug 12, 2019
6fb90b7
Merge branch 'master' into make-tables-scrollable
normanrz Aug 12, 2019
c84eb08
Merge branch 'master' into make-tables-scrollable
MichaelBuessemeyer Aug 12, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.md).
-

### Changed
- Each of the columns of the dataset table and explorative annotations table in the dashboard now have an individual fixed width, so the tables become scrollable on smaller screens. [#4207](https://github.com/scalableminds/webknossos/pull/4207)
- When uploading a zipped annotation (such as volume / hybrid / collection), the zip name is used for the resulting explorative annotation, rather than the name of the contained NML file. [#4222](https://github.com/scalableminds/webknossos/pull/4222)

### Fixed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ class DatasetTable extends React.PureComponent<Props, State> {
title="Name"
dataIndex="name"
key="name"
width={280}
sorter={Utils.localeCompareBy(typeHint, dataset => dataset.name)}
sortOrder={sortedInfo.columnKey === "name" && sortedInfo.order}
render={(name: string, dataset: APIMaybeUnimportedDataset) => (
Expand Down Expand Up @@ -181,7 +182,7 @@ class DatasetTable extends React.PureComponent<Props, State> {
title="Scale & Extent"
dataIndex="scale"
key="scale"
width={220}
width={280}
render={(__, dataset: APIMaybeUnimportedDataset) =>
`${formatScale(dataset.dataSource.scale)} ${getDatasetExtentAsString(dataset)}`
}
Expand Down Expand Up @@ -229,6 +230,7 @@ class DatasetTable extends React.PureComponent<Props, State> {
/>
<Column
title="Data Layers"
width={200}
dataIndex="dataSource.dataLayers"
render={(__, dataset: APIMaybeUnimportedDataset) =>
(dataset.dataSource.dataLayers || []).map(layer => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -407,12 +407,14 @@ class ExplorativeAnnotationsView extends React.PureComponent<Props, State> {
<Column
title="ID"
dataIndex="id"
width={100}
render={(__, tracing: APIAnnotationCompact) => formatHash(tracing.id)}
sorter={Utils.localeCompareBy(typeHint, annotation => annotation.id)}
className="monospace-id"
/>
<Column
title="Name"
width={200}
dataIndex="name"
sorter={Utils.localeCompareBy(typeHint, annotation => annotation.name)}
render={(name: string, tracing: APIAnnotationCompact) =>
Expand All @@ -421,6 +423,7 @@ class ExplorativeAnnotationsView extends React.PureComponent<Props, State> {
/>
<Column
title="Stats"
width={100}
render={(__, annotation: APIAnnotationCompact) =>
// Flow doesn't recognize that stats must contain the nodeCount if the treeCount is != null
annotation.stats.treeCount != null &&
Expand Down Expand Up @@ -478,10 +481,12 @@ class ExplorativeAnnotationsView extends React.PureComponent<Props, State> {
<Column
title="Modification Date"
dataIndex="modified"
width={150}
sorter={Utils.compareBy(typeHint, annotation => annotation.modified)}
render={modified => <FormattedDate timestamp={modified} />}
/>
<Column
width={200}
title="Actions"
className="nowrap"
key="action"
Expand Down
4 changes: 2 additions & 2 deletions frontend/stylesheets/antd_overwrites.less
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@
word-break: break-word;
}

.large-table table > thead > tr > th:not(.ant-table-expand-icon-th) {
min-width: 200px;
.ant-table-column-title {
word-break: normal;
}

label.ant-checkbox-wrapper {
Expand Down