From 41c2ebfb27e69d8681b405fb7ed2a418b2bda233 Mon Sep 17 00:00:00 2001 From: Jacob Shandling <61553566+jacobshandling@users.noreply.github.com> Date: Thu, 16 Nov 2023 14:34:56 -0800 Subject: [PATCH] =?UTF-8?q?UI=20=E2=80=93=20Small=20adjustments=20to=20var?= =?UTF-8?q?ious=20Tooltipwrapper=20instances=20(#15170)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Addresses #14244 - [x] Manual QA for all new/changed functionality --------- Co-authored-by: Jacob Shandling --- .../PlatformWrapper/PlatformWrapper.tsx | 8 ++--- .../PlatformWrapper/_styles.scss | 3 -- .../components/TooltipWrapper/_styles.scss | 1 + .../pages/hosts/ManageHostsPage/_styles.scss | 10 ------- .../details/DeviceUserPage/DeviceUserPage.tsx | 1 - .../HostDetailsPage/HostDetailsPage.tsx | 1 - .../pages/hosts/details/cards/About/About.tsx | 1 - .../utilities/{constants.ts => constants.tsx} | 30 +++++++++++++++---- 8 files changed, 30 insertions(+), 25 deletions(-) rename frontend/utilities/{constants.ts => constants.tsx} (90%) diff --git a/frontend/components/AddHostsModal/PlatformWrapper/PlatformWrapper.tsx b/frontend/components/AddHostsModal/PlatformWrapper/PlatformWrapper.tsx index 5f3a6b1465..397f2f8f6b 100644 --- a/frontend/components/AddHostsModal/PlatformWrapper/PlatformWrapper.tsx +++ b/frontend/components/AddHostsModal/PlatformWrapper/PlatformWrapper.tsx @@ -165,18 +165,18 @@ const PlatformWrapper = ({ return (
{type === "plain" ? ( -

+

Download your Fleet certificate -

+
) : ( -

Download your{" "} Fleet certificate: -

+
)} {isFetchingCertificate && (

diff --git a/frontend/components/AddHostsModal/PlatformWrapper/_styles.scss b/frontend/components/AddHostsModal/PlatformWrapper/_styles.scss index fbd148fcf6..a0db3376c0 100644 --- a/frontend/components/AddHostsModal/PlatformWrapper/_styles.scss +++ b/frontend/components/AddHostsModal/PlatformWrapper/_styles.scss @@ -167,9 +167,6 @@ .download-certificate--tooltip { margin-bottom: 0; - div { - display: inline; - } } &__copy-message { diff --git a/frontend/components/TooltipWrapper/_styles.scss b/frontend/components/TooltipWrapper/_styles.scss index e6f2e5f4c5..efd837fd72 100644 --- a/frontend/components/TooltipWrapper/_styles.scss +++ b/frontend/components/TooltipWrapper/_styles.scss @@ -3,6 +3,7 @@ &__element { white-space: nowrap; + line-height: initial; } &__underline { diff --git a/frontend/pages/hosts/ManageHostsPage/_styles.scss b/frontend/pages/hosts/ManageHostsPage/_styles.scss index 3bc1bf4a4e..0a3c62e2ef 100644 --- a/frontend/pages/hosts/ManageHostsPage/_styles.scss +++ b/frontend/pages/hosts/ManageHostsPage/_styles.scss @@ -285,14 +285,4 @@ top: -2px; } } - - .mdm_enrollment_status__header, - .mdm_server_url__header { - .last-col-header-with-tip { - width: 180px; - } - .component__tooltip-wrapper__tip-text { - left: -156px; // Wide tooltip needs to be shifted left (edge case example when it's second to last column) - } - } } diff --git a/frontend/pages/hosts/details/DeviceUserPage/DeviceUserPage.tsx b/frontend/pages/hosts/details/DeviceUserPage/DeviceUserPage.tsx index 86197be71f..d8badaf4c0 100644 --- a/frontend/pages/hosts/details/DeviceUserPage/DeviceUserPage.tsx +++ b/frontend/pages/hosts/details/DeviceUserPage/DeviceUserPage.tsx @@ -444,7 +444,6 @@ const DeviceUserPage = ({ aboutData={aboutData} deviceMapping={deviceMapping} munki={deviceMacAdminsData?.munki} - wrapFleetHelper={wrapFleetHelper} /> diff --git a/frontend/pages/hosts/details/HostDetailsPage/HostDetailsPage.tsx b/frontend/pages/hosts/details/HostDetailsPage/HostDetailsPage.tsx index 3ecaa2f3a0..e2c7af8ac4 100644 --- a/frontend/pages/hosts/details/HostDetailsPage/HostDetailsPage.tsx +++ b/frontend/pages/hosts/details/HostDetailsPage/HostDetailsPage.tsx @@ -719,7 +719,6 @@ const HostDetailsPage = ({ deviceMapping={deviceMapping} munki={macadmins?.munki} mdm={mdm} - wrapFleetHelper={wrapFleetHelper} />

string, value: string) => string; } const About = ({ diff --git a/frontend/utilities/constants.ts b/frontend/utilities/constants.tsx similarity index 90% rename from frontend/utilities/constants.ts rename to frontend/utilities/constants.tsx index 61fb0bc4e1..c4e765220f 100644 --- a/frontend/utilities/constants.ts +++ b/frontend/utilities/constants.tsx @@ -2,6 +2,7 @@ import URL_PREFIX from "router/url_prefix"; import { OsqueryPlatform } from "interfaces/platform"; import paths from "router/paths"; import { ISchedulableQuery } from "interfaces/schedulable_query"; +import React from "react"; const { origin } = global.window.location; export const BASE_URL = `${origin}${URL_PREFIX}/api`; @@ -262,11 +263,30 @@ export const VULNERABLE_DROPDOWN_OPTIONS = [ ]; // Keys from API -export const MDM_STATUS_TOOLTIP: Record = { - "On (automatic)": `MDM was turned on automatically using Apple Automated Device Enrollment (DEP), Windows Autopilot, or Windows Azure AD Join. Administrators can block end users from turning MDM off.`, - "On (manual)": `MDM was turned on manually. End users can turn MDM off.`, - Off: `Hosts with MDM off don't receive macOS
settings and macOS update encouragement.
`, - Pending: `Hosts ordered via Apple Business Manager
(ABM). These will automatically enroll to Fleet
and turn on MDM when they're unboxed.
`, +export const MDM_STATUS_TOOLTIP: Record = { + "On (automatic)": ( + + MDM was turned on automatically using Apple Automated Device Enrollment + (DEP), Windows Autopilot, or Windows Azure AD Join. Administrators can + block end users from turning MDM off. + + ), + "On (manual)": ( + MDM was turned on manually. End users can turn MDM off. + ), + Off: ( + + Hosts with MDM off don't receive macOS
settings and macOS + update encouragement. +
+ ), + Pending: ( + + Hosts ordered via Apple Business Manager
(ABM). These will + automatically enroll to Fleet
and turn on MDM when they're + unboxed. +
+ ), }; export const DEFAULT_CREATE_USER_ERRORS = {