mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-10-24 04:33:17 +00:00
Drop the storage table from the title-case helper consumers
The shared-template rule required every TrueNAS table to use the shared title-case helper. The storage table used it only for the risk-level pill, which the Health reason replaced, so it no longer formats any raw provider value and the required-consumer check failed. The scope-wide guard against a local titleCase helper still covers the file.
This commit is contained in:
@@ -5247,7 +5247,10 @@ Platform table title-case fallback formatting follows the same rule.
|
||||
`formatPlatformTableTitleCaseValue` owns the repeated trimmed-string plus
|
||||
`Unknown` fallback behavior for state/status labels that need simple title
|
||||
case. TrueNAS platform tables must compose that helper instead of declaring
|
||||
local `titleCase` helpers.
|
||||
local `titleCase` helpers. The apps, shares, services and VMs tables are its
|
||||
required consumers. The storage table left that list when its Health cell
|
||||
switched from a title-cased risk-level pill to TrueNAS's own reason text, and
|
||||
the scope-wide guard against a local `titleCase` helper still covers it.
|
||||
Platform table compact list summaries follow the same rule.
|
||||
`summarizePlatformTableValues` owns the repeated trimming, empty-marker label,
|
||||
visible-value count, `+N` overflow suffix, full-title text, and normalized
|
||||
|
||||
@@ -2304,7 +2304,6 @@
|
||||
{ "path": "src/features/truenas/TrueNASAppsTable.tsx" },
|
||||
{ "path": "src/features/truenas/TrueNASNetworkSharesTable.tsx" },
|
||||
{ "path": "src/features/truenas/TrueNASServicesTable.tsx" },
|
||||
{ "path": "src/features/truenas/TrueNASStorageTopologyTable.tsx" },
|
||||
{ "path": "src/features/truenas/TrueNASVirtualMachinesTable.tsx" }
|
||||
],
|
||||
"forbiddenPatterns": [
|
||||
@@ -2320,10 +2319,6 @@
|
||||
"path": "src/features/truenas/TrueNASServicesTable.tsx",
|
||||
"patterns": ["const titleCase"]
|
||||
},
|
||||
{
|
||||
"path": "src/features/truenas/TrueNASStorageTopologyTable.tsx",
|
||||
"patterns": ["const titleCase"]
|
||||
},
|
||||
{
|
||||
"path": "src/features/truenas/TrueNASVirtualMachinesTable.tsx",
|
||||
"patterns": ["const titleCase"]
|
||||
|
||||
@@ -5895,7 +5895,9 @@ describe('shared primitive guardrails', () => {
|
||||
['src/features/truenas/TrueNASAppsTable.tsx', truenasAppsTableSource],
|
||||
['src/features/truenas/TrueNASNetworkSharesTable.tsx', truenasNetworkSharesTableSource],
|
||||
['src/features/truenas/TrueNASServicesTable.tsx', truenasServicesTableSource],
|
||||
['src/features/truenas/TrueNASStorageTopologyTable.tsx', truenasStorageTopologyTableSource],
|
||||
// The storage table no longer formats a raw provider value: its Health
|
||||
// cell carries TrueNAS's own reason text. The scope-wide local-helper
|
||||
// guard below still keeps a private titleCase out of it.
|
||||
['src/features/truenas/TrueNASVirtualMachinesTable.tsx', truenasVirtualMachinesTableSource],
|
||||
];
|
||||
const truenasTitleCaseConsumerPaths = truenasTitleCaseConsumers.map(([path]) => path);
|
||||
|
||||
Reference in New Issue
Block a user