fix(chart): 上升的状态格改成「/」

上升不是行星,本命、月亮盘和分盘的状态格不再写「不适用」。悬停或点一下说明原因。报告同一格写「/」,并在表下加中英文说明。

Co-Authored-By: Grok (agent loop)
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
jesse-ux
2026-10-22 00:03:19 +08:00
co-authored by Grok (agent loop) Cursor
parent 9812f31737
commit d2edf8b7a8
12 changed files with 154 additions and 20 deletions
+20
View File
@@ -5846,6 +5846,26 @@ button.synastry-dd-add { border-radius: 0 0 var(--radius-md) var(--radius-md); }
outline: 2px solid var(--color-focus);
outline-offset: 2px;
}
/* The ascendant status cell is "/" plus the same bubble. Padding moves onto the
button so the tap target fills the cell without a second chrome. */
.chart-page-planet-table td.chart-page-asc-status { padding: 0; }
.chart-page-asc-status-mark {
display: flex;
align-items: center;
justify-content: flex-start;
width: 100%;
min-height: 44px;
margin: 0;
padding: var(--space-3);
border: 0;
background: transparent;
color: inherit;
font: inherit;
line-height: inherit;
text-align: inherit;
cursor: help;
}
.chart-page-planet-table td.chart-page-planet-mid .chart-page-asc-status-mark { justify-content: center; }
/* Only the small type is lifted for the chart page's narrow stage. Raising
every `text` would also resize the planet symbols, which are already sized
for this width. */
@@ -77,10 +77,29 @@ function PlanetRow({ row }: { row: ChartViewPlanetRow }) {
);
}
/** The ascendant is the chart's starting point, not a planet, so it has no dignity. */
const ASCENDANT_STATUS_HELP = "上升点是命盘的起点,不是行星,不判断入旺或落陷";
function AscendantStatusCell({ className }: { className?: string }) {
return (
<td className={className ? `${className} chart-page-asc-status` : "chart-page-asc-status"}>
<button
type="button"
className="chart-page-asc-status-mark"
data-chart-help={ASCENDANT_STATUS_HELP}
aria-label={ASCENDANT_STATUS_HELP}
>
<span aria-hidden="true">/</span>
</button>
</td>
);
}
/**
* The ascendant is a chart point: nakshatra, lord and pada come from the
* engine (BUG-1201); it has no dignity, so the status cell says 不适用.
* `house` is 1 except on the Moon chart, which counts from the Moon.
* engine (BUG-1201). It is not a planet, so the status cell is "/" and
* ASCENDANT_STATUS_HELP. `house` is 1 except on the Moon chart, which counts
* from the Moon.
*/
function AscendantRow({ row, house = row.house }: { row: ChartViewAscendantRow; house?: number }) {
return (
@@ -96,7 +115,7 @@ function AscendantRow({ row, house = row.house }: { row: ChartViewAscendantRow;
{row.nakshatraLord ? <BodyGlyph name={row.nakshatraLord} /> : "—"}
</td>
<td className="chart-page-planet-mid chart-page-planet-num">{row.pada ?? "—"}</td>
<td>不适用</td>
<AscendantStatusCell />
</tr>
);
}
@@ -112,6 +131,7 @@ function NatalTable({ planets, ascendant, ascendantHouse, caption }: {
caption: string;
}) {
return (
<ChartSymbolHelp resetKey={caption}>
<div className="chart-page-planet-table-wrap">
<table className="chart-page-planet-table">
<caption>{caption}</caption>
@@ -135,6 +155,7 @@ function NatalTable({ planets, ascendant, ascendantHouse, caption }: {
</tbody>
</table>
</div>
</ChartSymbolHelp>
);
}
@@ -166,7 +187,7 @@ function VargaAscendantRow({ row, supportsDignity, supportsVargottama }: { row:
<td className="chart-page-planet-num">{row.signLabel} {formatDegreeMinutes(row.degreeInSign)}</td>
<td>1宫</td>
<td>{row.natalSignLabel}</td>
{supportsDignity && <td className="chart-page-planet-mid">不适用</td>}
{supportsDignity && <AscendantStatusCell className="chart-page-planet-mid" />}
{supportsVargottama && <td className="chart-page-planet-mid">{row.vargottama ? "是" : "否"}</td>}
</tr>
);
@@ -183,6 +204,7 @@ export function VargaTable({ varga }: { varga: ChartViewVarga }) {
supportsVargottama: varga.supportsVargottama === true,
};
return (
<ChartSymbolHelp resetKey={`${varga.id}:${columns.supportsDignity}:${columns.supportsVargottama}`}>
<div className="chart-page-planet-table-wrap">
<table className="chart-page-planet-table">
<caption>{varga.id} · {varga.meaning}</caption>
@@ -202,6 +224,7 @@ export function VargaTable({ varga }: { varga: ChartViewVarga }) {
</tbody>
</table>
</div>
</ChartSymbolHelp>
);
}