fleet/frontend/components/TableContainer/_styles.scss
jacobshandling 32c42c301f
UI - Show software details My device page (#25022)
## #23315 

- On device user page > Software, make rows clickable and on click, open
the Software details modal to display information about the installation
on the host.
- Update Software details modal copy and allow long file paths to wrap


https://github.com/user-attachments/assets/1e714c5e-1614-46c0-bb56-d6dc8ad4f8ae

<img width="1350" alt="Screenshot 2024-12-26 at 10 27 44 AM"
src="https://github.com/user-attachments/assets/5cefc45a-b0ef-41d9-84e6-21ac17aaeffe"
/>
<img width="1350" alt="Screenshot 2024-12-26 at 10 27 19 AM"
src="https://github.com/user-attachments/assets/e0866961-31a4-4bd3-82e8-18f72cf4dc30"
/>
<img width="1350" alt="Screenshot 2024-12-26 at 10 27 37 AM"
src="https://github.com/user-attachments/assets/2bf6c880-664d-4315-8a40-8de61a5e4748"
/>


- [x] Changes file added for user-visible changes in `changes/`, 
- [x] Manual QA for all new/changed functionality

---------

Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2024-12-26 14:51:28 -08:00

267 lines
5.2 KiB
SCSS

.table-container {
.form-field {
width: initial; // 100% causes weird rendering in dropdown
}
// Container is responsive design used when customFilters is rendered
.container {
display: grid;
grid-template-columns: 1fr auto auto; /* First column takes all remaining space */
grid-template-rows: auto auto; /* Two rows */
width: 100%;
height: max-content;
gap: $pad-small $pad-medium;
}
.box {
min-width: max-content;
align-content: center;
display: flex;
flex-direction: row;
gap: $pad-medium;
> div {
display: flex;
flex-direction: row;
}
}
.search {
grid-column: 1 / -1; /* Span across all columns */
grid-row: 1; /* Place in the first row */
}
.box:nth-child(1) {
grid-column: 1 / span 2; /* Make Box 1 expand across two columns */
grid-row: 2;
}
.box:nth-child(2) {
grid-column: 2; /* Place Box 2 in the second row, second column */
grid-row: 2;
}
.box:nth-child(4) {
grid-column: 3; /* Place Box 4 in the second row, third column */
grid-row: 2;
max-width: min-content;
}
/* Media query for larger screens */
@media (min-width: $table-controls-break) {
.container {
grid-template-columns: 1fr auto auto auto; /* First column takes all remaining space */
grid-template-rows: auto; /* Single row */
}
.search {
grid-column: 1 / -1; /* Keep spanning across all columns if needed */
grid-row: auto;
}
.box:nth-child(1) {
grid-column: 1; /* Ensure Box 1 stays in the first column */
}
.box:nth-child(2) {
grid-column: 2; /* Place Box 2 in the second column */
}
.box:nth-child(3) {
grid-column: 3; /* Place Box 3 in the third column */
grid-row: 2;
}
.box:nth-child(4) {
grid-column: 4; /* Place Box 4 in the fourth column */
}
}
// TODO: Fix hacky solution to clientside search being 0 no longer accessing rows.length
.client-result-count-0 {
display: none;
}
&__header {
display: flex;
width: 100%;
justify-content: space-between;
align-items: center;
gap: $pad-small;
margin-top: 3px; // Fits button highlight during tabbing
&.stack-table-controls {
align-items: start;
@media (min-width: $break-xs) {
flex-direction: row;
align-items: end;
justify-content: space-between;
.table-container__search {
order: -2;
}
.table-container__results-count {
order: -1;
}
}
@media (min-width: $break-md) {
align-items: center;
.table-container__search {
order: initial;
}
}
}
// filter and search bar height
.dropdown__select,
.input-with-icon {
height: 40px;
}
}
&__header-left {
display: flex;
width: 100%;
justify-content: space-between;
flex-direction: row;
align-items: center;
&.stack-table-controls {
flex-direction: column;
align-items: start;
@media (min-width: $break-md) {
justify-content: space-between;
}
}
.Select-multi-value-wrapper {
height: 38px; // Fixes overlap with .Select outline
}
}
&__results-count {
display: flex;
align-items: center;
font-size: $x-small;
font-weight: $bold;
color: $core-fleet-black;
margin: 0;
height: 40px;
gap: 12px;
.count-error {
color: $ui-error;
}
.count-loading {
color: $ui-fleet-black-50;
}
}
&__edit-columns-button:hover {
cursor: pointer;
text-decoration: underline;
color: $core-vibrant-blue-over;
}
&__search-input {
position: relative;
color: $core-fleet-blue;
width: 100%;
.input-with-icon {
width: 100%;
min-width: 250px;
}
&.stack-table-controls {
padding-bottom: $pad-large;
margin-left: 0;
@media (min-width: $break-xs) {
padding-bottom: 0;
}
}
.input-field {
padding-left: 42px;
width: 100%;
}
.fleeticon {
position: absolute;
top: 10px;
left: 12px;
font-size: $medium;
color: $core-fleet-black;
}
}
.table-container__search-input.wide-search {
margin-left: 0;
margin-bottom: $pad-small;
}
#search-tooltip {
width: 190px;
text-align: center;
}
&__empty-page {
display: flex;
flex-direction: column;
align-items: center;
}
&__previous {
width: 350px;
.pagination__pager-wrap {
justify-content: left;
button:last-child {
display: none;
}
}
}
.fleet-checkbox__tick {
top: 1px;
}
// Truncates clickable button cells (not compatible with buttons with icons)
tbody {
.children-wrapper {
overflow: hidden;
white-space: nowrap;
display: block;
text-overflow: ellipsis;
}
.icon {
vertical-align: sub;
}
}
.linkToFilteredHosts__header {
width: 120px;
}
// This hides View all host link unless the row is hovered
tr {
.row-hover-link {
opacity: 0;
transition: 250ms;
text-overflow: none;
}
&:hover,
&:focus-visible {
.row-hover-link {
opacity: 1;
}
}
}
}