Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Device manager - filter out nulled metadatas in device tile properly (PSG-703) #9251

Merged
merged 5 commits into from
Sep 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/components/views/settings/devices/DeviceTile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,12 @@ const DeviceTile: React.FC<DeviceTileProps> = ({ device, children, onClick }) =>
<DeviceTileName device={device} />
<div className="mx_DeviceTile_metadata">
{ metadata.map(({ id, value }, index) =>
<Fragment key={id}>
{ !!index && ' · ' }
<DeviceMetadata id={id} value={value} />
</Fragment>,
!!value
? <Fragment key={id}>
{ !!index && ' · ' }
<DeviceMetadata id={id} value={value} />
</Fragment>
: null,
) }
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,6 @@ exports[`<DevicesPanel /> renders device panel with devices 1`] = `
>
Unverified
</span>
·
·
</div>
</div>
<div
Expand Down Expand Up @@ -259,8 +257,6 @@ exports[`<DevicesPanel /> renders device panel with devices 1`] = `
>
Unverified
</span>
·
·
</div>
</div>
<div
Expand Down Expand Up @@ -336,8 +332,6 @@ exports[`<DevicesPanel /> renders device panel with devices 1`] = `
>
Unverified
</span>
·
·
</div>
</div>
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,6 @@ exports[`<CurrentDeviceSection /> renders device and correct security card when
>
Unverified
</span>
·
·
</div>
</div>
<div
Expand Down Expand Up @@ -283,8 +281,6 @@ exports[`<CurrentDeviceSection /> renders device and correct security card when
>
Unverified
</span>
·
·
</div>
</div>
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ exports[`<DeviceTile /> renders a device with no metadata 1`] = `
>
Unverified
</span>
·
·
</div>
</div>
<div
Expand Down Expand Up @@ -83,8 +81,6 @@ exports[`<DeviceTile /> renders a verified device with no metadata 1`] = `
>
Unverified
</span>
·
·
</div>
</div>
<div
Expand Down Expand Up @@ -134,8 +130,6 @@ exports[`<DeviceTile /> renders display name with a tooltip 1`] = `
>
Unverified
</span>
·
·
</div>
</div>
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ exports[`<SelectableDeviceTile /> renders unselected device tile with checkbox 1
Unverified
</span>
·
·
<span
data-testid="device-metadata-lastSeenIp"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ exports[`<SessionManagerTab /> renders current session section with a verified s
>
Verified
</span>
·
·
</div>
</div>
<div
Expand Down Expand Up @@ -181,8 +179,6 @@ exports[`<SessionManagerTab /> renders current session section with an unverifie
>
Unverified
</span>
·
·
</div>
</div>
<div
Expand Down Expand Up @@ -279,8 +275,6 @@ exports[`<SessionManagerTab /> sets device verification status correctly 1`] = `
>
Verified
</span>
·
·
</div>
</div>
<div
Expand Down