forked from baron/baron-sso
ci: add code check badges and coverage reports
This commit is contained in:
@@ -3,19 +3,19 @@ import type { Node as ReactFlowNode } from "@xyflow/react";
|
||||
import * as React from "react";
|
||||
import { useLocation, useParams } from "react-router-dom";
|
||||
import {
|
||||
type TenantSummary,
|
||||
type UserSummary,
|
||||
fetchAllTenants,
|
||||
fetchPublicOrgChart,
|
||||
fetchUsers,
|
||||
type TenantSummary,
|
||||
type UserSummary,
|
||||
} from "../../../lib/adminApi";
|
||||
import { type TenantNode, buildTenantFullTree } from "../../../lib/tenantTree";
|
||||
import { buildTenantFullTree, type TenantNode } from "../../../lib/tenantTree";
|
||||
import {
|
||||
orderHanmacFamilyChildren,
|
||||
orderHanmacFamilyTenants,
|
||||
} from "../hanmacFamilyOrder";
|
||||
import { filterTenantsByVisibility, getOrgUnitType } from "../tenantVisibility";
|
||||
import { getOrgRankWeight } from "../rankPriority";
|
||||
import { filterTenantsByVisibility, getOrgUnitType } from "../tenantVisibility";
|
||||
import { getOrgChartUserDisplayName, getUserOrgProfile } from "../userDisplay";
|
||||
|
||||
export type OrgNode = {
|
||||
@@ -160,7 +160,7 @@ function getComplementaryColor(hexColor: string) {
|
||||
function getDisplayTextWidthUnit(value: string) {
|
||||
return Array.from(value).reduce((sum, char) => {
|
||||
if (char === " ") return sum + 0.4;
|
||||
if (/^[\x00-\x7f]$/.test(char)) return sum + 0.55;
|
||||
if (char.charCodeAt(0) <= 0x7f) return sum + 0.55;
|
||||
return sum + 1;
|
||||
}, 0);
|
||||
}
|
||||
@@ -206,7 +206,7 @@ export function getMemberGridMetrics(
|
||||
? NODE_WIDTH
|
||||
: Math.max(
|
||||
NODE_WIDTH,
|
||||
NODE_PADDING_Y * 2 +
|
||||
NODE_PADDING_Y * 2 +
|
||||
columnCount * memberColumnWidth +
|
||||
(columnCount - 1) * MEMBER_COLUMN_GAP,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user