diff --git a/changes/fix-2653 b/changes/fix-2653 new file mode 100644 index 0000000000..3d677afa5e --- /dev/null +++ b/changes/fix-2653 @@ -0,0 +1 @@ +* Hide columns in query table at smaller page sizes \ No newline at end of file diff --git a/frontend/components/TableContainer/DataTable/_styles.scss b/frontend/components/TableContainer/DataTable/_styles.scss index 7ce850f946..860b774fed 100644 --- a/frontend/components/TableContainer/DataTable/_styles.scss +++ b/frontend/components/TableContainer/DataTable/_styles.scss @@ -60,10 +60,11 @@ &:first-child { border-top-left-radius: 6px; + padding: $pad-medium 17px; } &.selection__header { - width: 20px; + width: 1px; } &:last-child { @@ -142,10 +143,15 @@ tbody { td { - padding: 0px 27px; + padding: 0 27px; white-space: nowrap; height: 40px; + &:first-child { + padding: 0 17px; + width: 1px; + } + // form-field wraps the dropdown menu .form-field { margin: 0; diff --git a/frontend/pages/queries/ManageQueriesPage/_styles.scss b/frontend/pages/queries/ManageQueriesPage/_styles.scss index 1bcb527bc9..a96a5bd6ab 100644 --- a/frontend/pages/queries/ManageQueriesPage/_styles.scss +++ b/frontend/pages/queries/ManageQueriesPage/_styles.scss @@ -116,22 +116,61 @@ .data-table__table { table-layout: fixed; - // thead { - // // Width for all columns except checkbox and "Name" columns - // // For observers all columns except "Name" and "Author" columns - // // Width calculation adjusts for each row's horizontal padding - // th:not(:nth-child(1)):not(:nth-child(2)) { - // width: calc(180px - (27px * 2)); - // } - // } + .selection__header { + text-align: center; + } + + thead { + th:not(:nth-child(1)):not(:nth-child(2)):not(:nth-child(4)) { + width: 100px; + } + th:nth-child(1) { + width: 8px; + } + th:nth-child(2) { + width: 200px; + } + th:nth-child(4) { + width: 40px; + } + @include breakpoint(tablet) { + th:nth-child(3), + th:nth-child(5), + th:nth-child(7) { + display: none; + } + } + @include breakpoint(ltdesktop) { + th:nth-child(1) { + width: 8px; + } + th:nth-child(3), + th:nth-child(5) { + display: none; + } + } + } tbody { + td:nth-child(1) { + text-align: center; + } + @include breakpoint(tablet) { + td:nth-child(3), + td:nth-child(5), + td:nth-child(7) { + display: none; + } + } + @include breakpoint(ltdesktop) { + td:nth-child(3), + td:nth-child(5) { + display: none; + } + } td { overflow: hidden; text-overflow: ellipsis; - } - // Width and overflow behavior for the link in the "Name" column - td { .button { display: block; text-align: start;