fleet/frontend/components/ActivityItem/_styles.scss
Gabriel Hernandez cdefa0c9e9
Chore rework UI activities (#25539)
For #23912

new UI for activities on the global, past, and upcoming feeds. These are
the same changes in [this
PR](https://github.com/fleetdm/fleet/pull/25329), except we are
reverting the changes around fleet initiated activities as that is not
in the current activities API.

We are doing this so that the new activities can go out in a release
while the backend is still being built and will be ready later.

> NOTE: this does contain the code for cancel activity functionality but
it hidden from the user.

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
- [x] Added/updated automated tests
- [x] Manual QA for all new/changed functionality
2025-01-20 10:39:46 +00:00

170 lines
3.2 KiB
SCSS

.activity-item {
display: grid; // Grid system is used to create variable solid line lengths
grid-template-columns: 16px 16px 8px 1fr;
grid-template-rows: max-content;
&__avatar-wrapper {
box-sizing: border-box;
display: grid;
grid-template-columns: 16px 16px;
grid-template-rows: 8px 32px 1fr;
grid-column-start: 1;
grid-column-end: 3;
.avatar-wrapper {
grid-column-start: 1;
grid-column-end: 3;
grid-row-start: 2;
grid-row-end: 3;
}
}
&__avatar-upper-dash {
border-right: 1px solid $ui-fleet-black-10;
grid-column-start: 1;
grid-column-end: 2;
grid-row-start: 1;
grid-row-end: 2;
}
&__avatar-lower-dash {
border-right: 1px solid $ui-fleet-black-10;
grid-column-start: 1;
grid-column-end: 2;
grid-row-start: 3;
grid-row-end: 4;
}
&__details-wrapper {
display: flex;
gap: $pad-medium;
justify-content: space-between;
align-items: center;
grid-column-start: 4;
grid-row-start: 1;
padding: $pad-small;
margin-bottom: $pad-large;
.premium-icon-tip {
position: relative;
top: 4px;
padding-right: $pad-xsmall;
}
.activity-details {
margin: 0;
line-height: 16px;
}
&:hover {
border-radius: $border-radius-large;
background-color: $ui-off-white;
cursor: pointer;
.activity-item__details-actions {
visibility: visible;
}
}
.button {
height: 16px;
&--icon svg {
padding: 0;
}
}
}
&__details-actions {
visibility: hidden;
display: flex;
gap: $pad-medium;
}
&__close-icon {
cursor: pointer;
&:hover {
svg {
path {
stroke: $core-vibrant-blue;
}
}
}
};
&__details-topline {
font-size: $x-small;
overflow-wrap: anywhere;
}
&__details-content {
margin-right: $pad-xsmall;
}
&__details-bottomline {
font-size: $xx-small;
color: $ui-fleet-black-50;
}
&__show-query-icon {
margin-left: $pad-xsmall;
}
&:first-child {
.activity-item__avatar-upper-dash {
border-right: none;
}
}
&:last-child {
.activity-item__avatar-lower-dash {
border-right: none;
}
}
/**
* Starting here are the styles for the activity item when it is the
* only activity that is being displayed (controlled by the `soloActivity prop`.
* We switch from grid to flexbox since we don't need the solid lines anymore.
* we also dont show to actions on hover
*/
&__solo-activity {
border: 1px solid $ui-fleet-black-10;
border-radius: $border-radius-large;
padding: $pad-medium;
display: flex;
gap: $pad-medium;
.activity-item__avatar-wrapper {
display: block;
}
.activity-item__avatar-lower-dash {
display: none;
}
.activity-item__details-wrapper {
display: block;
padding: 0;
margin-bottom: 0;
&:hover {
cursor: auto;
background-color: transparent;
}
}
.activity-item__details-actions {
display: none;
}
}
&__no-details {
.activity-item__details-wrapper {
&:hover {
cursor: auto;
background-color: transparent;
}
}
}
}