Skip to content

Commit

Permalink
chore: Clean up outdated help tooltips
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Clelland <[email protected]>
  • Loading branch information
michaelntech committed Aug 14, 2023
1 parent a105d13 commit cefa983
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 99 deletions.
24 changes: 0 additions & 24 deletions src/js/components/devices/__snapshots__/device-groups.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -813,30 +813,6 @@ exports[`DeviceGroups Component renders correctly 1`] = `
</div>
</div>
</div>
<div
class=""
data-mui-internal-clone-element="true"
style="position: absolute; right: 45px;"
>
<div
class="relative"
>
<svg
aria-hidden="true"
class="MuiSvgIcon-root MuiSvgIcon-colorPrimary MuiSvgIcon-fontSizeMedium css-1nin21u-MuiSvgIcon-root-icon"
data-testid="HelpIcon"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"
/>
</svg>
<div
class="css-10ee8t0-iconAura "
/>
</div>
</div>
</div>
</div>
</div>
Expand Down
34 changes: 15 additions & 19 deletions src/js/components/devices/authorized-devices.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ import { getOnboardingComponentFor } from '../../utils/onboardingmanager';
import useWindowSize from '../../utils/resizehook';
import { clearAllRetryTimers, setRetryTimer } from '../../utils/retrytimer';
import Loader from '../common/loader';
import { HELPTOOLTIPS, MenderHelpTooltip } from '../helptips/helptooltips';
import { defaultHeaders, defaultTextRender, getDeviceIdentityText, routes as states } from './base-devices';
import DeviceList, { minCellWidth } from './devicelist';
import ColumnCustomizationDialog from './dialogs/custom-columns-dialog';
Expand Down Expand Up @@ -464,24 +463,21 @@ export const Authorized = ({
<Loader show={!isInitialized} />
<div className="padding-bottom" ref={deviceListRef}>
{devices.length > 0 ? (
<>
<DeviceList
columnHeaders={columnHeaders}
customColumnSizes={customColumnSizes}
devices={devices}
deviceListState={deviceListState}
idAttribute={idAttribute}
onChangeRowsPerPage={onPageLengthChange}
onExpandClick={onExpandClick}
onPageChange={handlePageChange}
onResizeColumns={columns => dispatch(updateUserColumnSettings(columns))}
onSelect={onSelectionChange}
onSort={onSortChange}
pageLoading={pageLoading}
pageTotal={deviceCount}
/>
<MenderHelpTooltip id={HELPTOOLTIPS.expandDevice.id} style={{ position: 'absolute', right: 45 }} />
</>
<DeviceList
columnHeaders={columnHeaders}
customColumnSizes={customColumnSizes}
devices={devices}
deviceListState={deviceListState}
idAttribute={idAttribute}
onChangeRowsPerPage={onPageLengthChange}
onExpandClick={onExpandClick}
onPageChange={handlePageChange}
onResizeColumns={columns => dispatch(updateUserColumnSettings(columns))}
onSelect={onSelectionChange}
onSort={onSortChange}
pageLoading={pageLoading}
pageTotal={deviceCount}
/>
) : (
<EmptyState
allCount={allCount}
Expand Down
36 changes: 0 additions & 36 deletions src/js/components/helptips/__snapshots__/helptooltips.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,6 @@ NodeList [
<p>
It is possible to create groups of devices. Once you have created a group and added one or more devices to it, you can deploy an update to that specific group only.
</p>,
<p>
To avoid accidents, Mender only allows a device to be in one group at the time.
</p>,
<p>
You can find out additional information about device groups in
<a
href="/help/devices"
>
the help section
</a>
.
</p>,
]
`;

Expand Down Expand Up @@ -371,30 +359,6 @@ NodeList [
]
`;

exports[`Helptooltips Components renders ExpandDevice correctly 1`] = `
NodeList [
<h3>
Device inventory
</h3>,
<p>
Mender automatically collects identity and inventory information from connected devices. You can view this information by clicking on a device to expand the row.
</p>,
<p>
Which information is collected about devices is fully configurable;
<a
class=""
href="https://docs.mender.io/client-installation/identity"
rel="noopener noreferrer"
target="_blank"
>
see the documentation for how to configure this
</a>
.
</p>,
]
`;

exports[`Helptooltips Components renders ForceDeployment correctly 1`] = `
NodeList [
<h3>
Expand Down
20 changes: 0 additions & 20 deletions src/js/components/helptips/helptooltips.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// limitations under the License.
import React, { useCallback } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import { Link } from 'react-router-dom';

import { setSnackbar } from '../../actions/appActions';
import { setAllTooltipsReadState, setTooltipReadState } from '../../actions/userActions';
Expand Down Expand Up @@ -58,24 +57,6 @@ const AddGroup = () => (
It is possible to create groups of devices. Once you have created a group and added one or more devices to it, you can deploy an update to that specific
group only.
</p>
<p>To avoid accidents, Mender only allows a device to be in one group at the time.</p>
<p>
You can find out additional information about device groups in <Link to="/help/devices">the help section</Link>.
</p>
</>
);

const ExpandDevice = () => (
<>
<h3>Device inventory</h3>
<p>
Mender automatically collects identity and inventory information from connected devices. You can view this information by clicking on a device to expand
the row.
</p>
<p>
Which information is collected about devices is fully configurable;{' '}
<DocsLink path="client-installation/identity" title="see the documentation for how to configure this" />.
</p>
</>
);

Expand Down Expand Up @@ -289,7 +270,6 @@ export const HELPTOOLTIPS = {
deviceSupportTip: { id: 'deviceSupportTip', Component: DeviceSupportTip },
deviceTypeTip: { id: 'deviceTypeTip', Component: DeviceTypeTip },
expandArtifact: { id: 'expandArtifact', Component: ExpandArtifact },
expandDevice: { id: 'expandDevice', Component: ExpandDevice },
forceDeployment: { id: 'forceDeployment', Component: ForceDeployment },
globalSettings: { id: 'globalSettings', Component: GlobalSettings },
groupDeployment: { id: 'groupDeployment', Component: GroupDeployment },
Expand Down

0 comments on commit cefa983

Please sign in to comment.