Skip to content

Commit e5ba365

Browse files
authored
Fleet UI: Unify manage automations > paginated list footer styling (#27841)
1 parent ab4bcc8 commit e5ba365

File tree

10 files changed

+23
-46
lines changed

10 files changed

+23
-46
lines changed

frontend/components/Pagination/_styles.scss

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
display: flex;
33
justify-content: flex-end;
44
margin-top: $pad-small;
5-
margin-bottom: $pad-small;
65
margin-left: auto;
76
text-align: right;
87
gap: $pad-large;

frontend/pages/policies/ManagePoliciesPage/components/CalendarEventsModal/CalendarEventsModal.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ const CalendarEventsModal = ({
295295
);
296296
}}
297297
footer={
298-
<div className="form-field__help-text">
298+
<>
299299
A calendar event will be created for end users if one of their
300300
hosts fail any of these policies.{" "}
301301
<CustomLink
@@ -304,7 +304,7 @@ const CalendarEventsModal = ({
304304
newTab
305305
disableKeyboardNavigation={!formData.enabled}
306306
/>
307-
</div>
307+
</>
308308
}
309309
isUpdating={isUpdating}
310310
onSubmit={onUpdateCalendarEvents}

frontend/pages/policies/ManagePoliciesPage/components/CalendarEventsModal/_styles.scss

+1-5
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@
3333
margin: 0;
3434
}
3535

36-
.form-field__help-text {
37-
margin-top: $pad-large;
38-
}
39-
4036
&__hide-main {
4137
visibility: hidden;
4238
}
@@ -67,4 +63,4 @@
6763
// If we're hiding the modal (because the preview is showing), hide the background as well.
6864
.modal__background:has(.calendar-events-modal.calendar-events-modal__hide-main) {
6965
visibility: hidden;
70-
}
66+
}

frontend/pages/policies/ManagePoliciesPage/components/InstallSoftwareModal/InstallSoftwareModal.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ const InstallSoftwareModal = ({
288288
) : null;
289289
}}
290290
footer={
291-
<p className="form-field__help-text">
291+
<>
292292
If compatible with the host, the selected software will be
293293
installed when hosts fail the policy. Host counts will reset
294294
when new software is selected.{" "}
@@ -297,7 +297,7 @@ const InstallSoftwareModal = ({
297297
text="Learn more"
298298
newTab
299299
/>
300-
</p>
300+
</>
301301
}
302302
isUpdating={isUpdating}
303303
onSubmit={onUpdateInstallSoftware}

frontend/pages/policies/ManagePoliciesPage/components/InstallSoftwareModal/_styles.scss

-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
.manage-policies-page {
22
.install-software-modal {
3-
.form-field__help-text {
4-
font-size: 14px;
5-
line-height: 21px;
6-
margin-top: $pad-large;
7-
}
8-
93
.form-field--dropdown {
104
width: 276px;
115
.Select-placeholder {

frontend/pages/policies/ManagePoliciesPage/components/OtherWorkflowsModal/OtherWorkflowsModal.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -370,15 +370,15 @@ const OtherWorkflowsModal = ({
370370
return item;
371371
}}
372372
footer={
373-
<p className={`${baseClass}__help-text`}>
373+
<>
374374
The workflow will be triggered when hosts fail these policies.{" "}
375375
<CustomLink
376376
url="https://www.fleetdm.com/learn-more-about/policy-automations"
377377
text="Learn more"
378378
newTab
379379
disableKeyboardNavigation={!isPolicyAutomationsEnabled}
380380
/>
381-
</p>
381+
</>
382382
}
383383
isUpdating={isUpdating}
384384
onSubmit={onUpdateOtherWorkflows}

frontend/pages/policies/ManagePoliciesPage/components/OtherWorkflowsModal/_styles.scss

-4
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,4 @@
1919
&__no-integrations a {
2020
display: block;
2121
}
22-
23-
&__help-text {
24-
@include help-text;
25-
}
2622
}

frontend/pages/policies/ManagePoliciesPage/components/PoliciesPaginatedList/PoliciesPaginatedList.tsx

+13-15
Original file line numberDiff line numberDiff line change
@@ -198,22 +198,20 @@ function PoliciesPaginatedList(
198198
return (
199199
<div className={`${baseClass} form`}>
200200
<div className="form-field">
201-
<div>
202-
<PaginatedList<IFormPolicy>
203-
ref={paginatedListRef}
204-
fetchPage={fetchPage}
205-
fetchCount={fetchCount}
206-
isSelected={isSelected}
207-
onToggleItem={onToggleItem}
208-
renderItemRow={renderItemRow}
209-
pageSize={DEFAULT_PAGE_SIZE}
210-
onUpdate={onUpdate}
211-
disabled={disabled || gitOpsModeEnabled}
212-
heading={<span className={`${baseClass}__header`}>Policies</span>}
213-
/>
214-
{footer}
215-
</div>
201+
<PaginatedList<IFormPolicy>
202+
ref={paginatedListRef}
203+
fetchPage={fetchPage}
204+
fetchCount={fetchCount}
205+
isSelected={isSelected}
206+
onToggleItem={onToggleItem}
207+
renderItemRow={renderItemRow}
208+
pageSize={DEFAULT_PAGE_SIZE}
209+
onUpdate={onUpdate}
210+
disabled={disabled || gitOpsModeEnabled}
211+
heading={<span className={`${baseClass}__header`}>Policies</span>}
212+
/>
216213
</div>
214+
{footer && <p className="form-field__help-text">{footer}</p>}
217215
<div className="modal-cta-wrap">
218216
<GitOpsModeTooltipWrapper
219217
position="right"

frontend/pages/policies/ManagePoliciesPage/components/PolicyRunScriptModal/PolicyRunScriptModal.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ const PolicyRunScriptModal = ({
186186
) : null;
187187
}}
188188
footer={
189-
<p className="form-field__help-text">
189+
<>
190190
If{" "}
191191
<TooltipWrapper tipContent={compatibleTipContent}>
192192
compatible
@@ -200,7 +200,7 @@ const PolicyRunScriptModal = ({
200200
text="Learn more"
201201
newTab
202202
/>
203-
</p>
203+
</>
204204
}
205205
isUpdating={isUpdating}
206206
onSubmit={onUpdate}

frontend/pages/policies/ManagePoliciesPage/components/PolicyRunScriptModal/_styles.scss

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
.manage-policies-page {
22
.policy-run-script-modal {
3-
.form-field__help-text {
4-
font-size: 14px;
5-
line-height: 21px;
6-
margin-top: $pad-large;
7-
}
8-
93
.form-field--dropdown {
104
width: 276px;
115
.Select-placeholder {
@@ -34,7 +28,7 @@
3428
justify-content: center;
3529
font-size: $small;
3630

37-
div {
31+
div {
3832
color: $ui-fleet-black-75;
3933
font-size: $xx-small;
4034
a {

0 commit comments

Comments
 (0)