Hover cards for domains and people, and defaults in option tooltips
- A domain's name in any list opens a card on hover: whether it's taking mail, how many people it has, which of its key records (mail routing, SPF, DKIM, DMARC) are live in public DNS, and whether DNS, signing keys and certificates are automatic. - A person's shows their name, storage against their quota, role, groups and when they joined. The server keeps no last sign-in on the account, so the card doesn't claim one. - Cards load on open and are cached for a minute. - Option tooltips end with the option's default, and an option set away from its default gets a small "changed" mark.
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
import { EmptyState } from '@/components/common/EmptyState';
|
||||
import { PageHeader } from '@/components/common/PageHeader';
|
||||
import { HelpPanel } from '@/help/HelpPanel';
|
||||
import { ObjectHoverCard } from '@/features/hovercards/ObjectHoverCard';
|
||||
import { iconForView } from '@/lib/viewIcon';
|
||||
import React, { useState, useEffect, useCallback, useMemo } from 'react';
|
||||
import { useNavigate, useSearchParams } from 'react-router-dom';
|
||||
@@ -270,7 +271,11 @@ function renderCellValue(
|
||||
case 'objectId': {
|
||||
const id = String(value);
|
||||
const display = getDisplayName(ft.objectName, id);
|
||||
return display ?? id;
|
||||
return (
|
||||
<ObjectHoverCard objectName={ft.objectName} id={id}>
|
||||
{display ?? id}
|
||||
</ObjectHoverCard>
|
||||
);
|
||||
}
|
||||
|
||||
case 'set': {
|
||||
@@ -1305,18 +1310,27 @@ export function DynamicList({ viewName }: DynamicListProps) {
|
||||
/>
|
||||
</td>
|
||||
)}
|
||||
{list.columns.map((col) => (
|
||||
<td key={col.name} className="px-3 py-2">
|
||||
{renderCellValue(
|
||||
item[col.name],
|
||||
fields[col.name],
|
||||
col.name,
|
||||
schema!,
|
||||
resolved.obj.objectName,
|
||||
getDisplayName,
|
||||
)}
|
||||
</td>
|
||||
))}
|
||||
{list.columns.map((col, colIndex) => {
|
||||
const cell = renderCellValue(
|
||||
item[col.name],
|
||||
fields[col.name],
|
||||
col.name,
|
||||
schema!,
|
||||
resolved.obj.objectName,
|
||||
getDisplayName,
|
||||
);
|
||||
return (
|
||||
<td key={col.name} className="px-3 py-2">
|
||||
{colIndex === 0 && item[col.name] != null ? (
|
||||
<ObjectHoverCard objectName={resolved.obj.objectName} id={itemId}>
|
||||
{cell}
|
||||
</ObjectHoverCard>
|
||||
) : (
|
||||
cell
|
||||
)}
|
||||
</td>
|
||||
);
|
||||
})}
|
||||
{hasItemActions && <td className="px-3 py-2 text-right">{renderItemActions(item)}</td>}
|
||||
</tr>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user