[263] UX: Startansicht kleiner Häuser, Raumprogramm, Statusleiste, Ressourcen-Reiter, Menübegriffe, Über-Eintrag, Esc

Einpassen: Mindestausschnitt 8 m mit Bauteilen (30 m nur leer), 6 % Rand. Raumprogramm zweizeilig mit Tooltips.
Statusleiste: Hinweis mindestens 170 px mit title, unter 1500 px enger ohne Build. Ressourcen-Reiter umbrechen,
Zeilennamen mit title. Menü: 3D-Ansicht statt zweimal Perspektive, Ellipsen ' …' einheitlich (Test),
Hilfe → Über dossier …. Publiziert-Meldung nennt die Datei; Verlauf/BCF/Kollisionen schliessen mit Esc.
This commit is contained in:
Claude committed 2026-11-15 22:45:53 +00:00
1 parent ec5e77195d
commit a903058bfe
37 files changed
+301 -81

No files matched your search

+1
View File
@@ -203,6 +203,7 @@ export {
toScreen,
viewForCamera,
defaultViewFor,
HOUSE_FIT_EXTENT_M,
viewForScale,
visibleEdgeRuns,
} from "../plan/planView/geometry";
+18 -16
View File
@@ -135,7 +135,7 @@ export const de = {
"menu.edit.delete": "Löschen",
"menu.view": "Ansicht",
"menu.view.floorplan": "Grundriss",
"menu.view.perspective": "Perspektive",
"menu.view.perspective": "3D-Ansicht",
"menu.view.referenceLines": "Referenzlinien",
"menu.view.floorDown": "Geschoss tiefer",
"menu.view.floorUp": "Geschoss höher",
@@ -175,7 +175,7 @@ export const de = {
"menu.native.move": "Bewegen",
"menu.native.mirror": "Spiegeln",
"menu.native.rotate": "Drehen",
"menu.native.objectSettings": "Objekteinstellungen…",
"menu.native.objectSettings": "Objekteinstellungen …",
"menu.native.view": "Ansicht",
"menu.native.window": "Fenster",
"menu.native.panels": "Panels",
@@ -1107,8 +1107,8 @@ export const de = {
"dock.dropRight": "Rechts andocken",
// ── Kontextmenü (Einträge) ───────────────────────────────────────────────
"ctx.layerSettings": "Ebeneneinstellungen…",
"ctx.addSubLayer": "Sub-Ebene hinzufügen…",
"ctx.layerSettings": "Ebeneneinstellungen …",
"ctx.addSubLayer": "Sub-Ebene hinzufügen …",
"ctx.assignSelection": "Selektion hierher übertragen",
"ctx.assignSelection.disabled": "Keine Wand ausgewählt — zuerst im Grundriss/3D eine Wand anklicken.",
"ctx.duplicate": "Duplizieren",
@@ -1150,7 +1150,7 @@ export const de = {
"ctx.delete": "Löschen",
"ctx.delete.lastLayer": "Die letzte Ebene kann nicht gelöscht werden.",
"ctx.delete.lastLevel": "Die letzte Zeichnungsebene kann nicht gelöscht werden.",
"ctx.levelSettings": "Einstellungen…",
"ctx.levelSettings": "Einstellungen …",
"ctx.fitSelection": "Auf Auswahl einpassen",
"ctx.clearSelection": "Auswahl aufheben",
"ctx.fit": "Ansicht einpassen",
@@ -1594,7 +1594,7 @@ export const de = {
"Wiederverwendbare Fenstertypen mit Öffnungsart, Verglasung und Standardmassen für neu platzierte Fenster.",
"resources.windowTypes.empty": "Noch keine Fenstertypen.",
"resources.windowTypes.placeholder": "Fenstertyp",
"resources.addPreset": "Aus Bibliothek…",
"resources.addPreset": "Aus Bibliothek …",
"resources.addPreset.hint": "Übliche Bauart als Vorlage übernehmen",
"preset.fe-dk-1": "Dreh-Kipp 1-flügelig",
"preset.fe-dk-2": "Dreh-Kipp 2-flügelig (Stulp)",
@@ -2836,11 +2836,11 @@ export const de = {
"file.newFromComplexSample": "Neu aus Vorlage: Musterhaus (komplex)",
"file.newFromTemplateFile": "Neu aus Vorlage: Datei wählen …",
"file.save": "Projekt speichern",
"file.open": "Projekt öffnen",
"file.import": "DXF/DWG importieren…",
"file.exportPdf": "Als PDF exportieren…",
"file.exportDxf": "Als DXF/DWG exportieren…",
"file.exportSchedule": "Bauteilliste (CSV)…",
"file.open": "Projekt öffnen …",
"file.import": "DXF/DWG importieren …",
"file.exportPdf": "Als PDF exportieren …",
"file.exportDxf": "Als DXF/DWG exportieren …",
"file.exportSchedule": "Bauteilliste (CSV) …",
"file.exportIfc": "IFC exportieren",
"file.exportObj": "OBJ exportieren (3D-Mesh)",
"file.exportStl": "STL exportieren (3D-Mesh)",
@@ -3788,9 +3788,9 @@ export const de = {
"start.recent.remove": "Aus der Liste entfernen",
"start.recentMissing": "Datei nicht gefunden — aus der Liste entfernt.",
"nav.bcf": "BCF-Themen",
"bcf.open": "Öffnen…",
"bcf.open": "Öffnen …",
"bcf.new": "Neu",
"bcf.save": "Speichern…",
"bcf.save": "Speichern …",
"bcf.format": "Format",
"bcf.author": "Autor",
"bcf.author.placeholder": "Name oder E-Mail",
@@ -4018,7 +4018,8 @@ export const de = {
"publish.log": "Publikationsprotokoll",
"publish.sheetsShort": "Blätter",
"publish.empty": "Der Satz enthält keine Blätter.",
"publish.done": "Publiziert (Dateien)",
"publish.done": "Publiziert: «{file}» ({n} Dateien in einem ZIP)",
"publish.doneOne": "Publiziert: «{file}»",
"publish.failed": "Publikation fehlgeschlagen",
"cmd.praesentation.label": "Präsentationsplan",
"cmd.praesentation.prompt": "Präsentationsplan einrichten …",
@@ -4058,9 +4059,9 @@ export const de = {
"presentation.donePages": "Präsentationsplan 1:{scale} auf {pages} Plakaten erstellt",
"presentation.failed": "Präsentationsplan konnte nicht erstellt werden",
// [211] Rendering mit Blender/Cycles
"cmd.rendering.label": "Rendering…",
"cmd.rendering.label": "Rendering …",
"cmd.rendering.prompt": "Rendering mit Blender einrichten …",
"cmd.bild3d.label": "3D-Bild exportieren…",
"cmd.bild3d.label": "3D-Bild exportieren …",
"cmd.bild3d.prompt": "3D-Bild als PNG exportieren …",
"menu.view.image3d": "3D-Bild exportieren …",
"image3d.title": "3D-Bild exportieren",
@@ -4459,6 +4460,7 @@ export const de = {
"costs.export.fail": "Export der Kostenschätzung fehlgeschlagen.",
"menu.help": "Hilfe",
"menu.help.shortcuts": "Tastaturkürzel …",
"menu.help.about": "Über dossier …",
"help.shortcuts.title": "Tastaturkürzel",
"help.shortcuts.intro": "Tastenkombinationen und Befehlskürzel, wie sie gerade gelten (inklusive eigener Änderungen aus den Einstellungen).",
"help.shortcuts.filter": "Suchen …",
+24 -22
View File
@@ -134,7 +134,7 @@ export const en: Record<TranslationKey, string> = {
"menu.edit.delete": "Delete",
"menu.view": "View",
"menu.view.floorplan": "Floor plan",
"menu.view.perspective": "Perspective",
"menu.view.perspective": "3D view",
"menu.view.referenceLines": "Reference lines",
"menu.view.floorDown": "Story down",
"menu.view.floorUp": "Story up",
@@ -162,18 +162,18 @@ export const en: Record<TranslationKey, string> = {
"menu.native.newFromTemplate": "New From Template",
"menu.native.newFromSample": "Sample House",
"menu.native.newFromComplexSample": "Sample House (Complex)",
"menu.native.newFromTemplateFile": "Choose Template File…",
"menu.native.open": "Open…",
"menu.native.newFromTemplateFile": "Choose Template File …",
"menu.native.open": "Open …",
"menu.native.save": "Save",
"menu.native.saveAs": "Save As…",
"menu.native.import": "Import…",
"menu.native.saveAs": "Save As …",
"menu.native.import": "Import …",
"menu.native.export": "Export",
"menu.native.exportSchedule": "Schedule (CSV)",
"menu.native.edit": "Edit",
"menu.native.move": "Move",
"menu.native.mirror": "Mirror",
"menu.native.rotate": "Rotate",
"menu.native.objectSettings": "Object Settings…",
"menu.native.objectSettings": "Object Settings …",
"menu.native.view": "View",
"menu.native.window": "Window",
"menu.native.panels": "Panels",
@@ -1102,8 +1102,8 @@ export const en: Record<TranslationKey, string> = {
"dock.dropRight": "Dock right",
// Context menu.
"ctx.layerSettings": "Layer settings…",
"ctx.addSubLayer": "Add sub-layer…",
"ctx.layerSettings": "Layer settings …",
"ctx.addSubLayer": "Add sub-layer …",
"ctx.assignSelection": "Assign selection here",
"ctx.assignSelection.disabled": "No wall selected — first click a wall in the plan/3D.",
"ctx.duplicate": "Duplicate",
@@ -1145,7 +1145,7 @@ export const en: Record<TranslationKey, string> = {
"ctx.delete": "Delete",
"ctx.delete.lastLayer": "The last layer cannot be deleted.",
"ctx.delete.lastLevel": "The last drawing level cannot be deleted.",
"ctx.levelSettings": "Settings…",
"ctx.levelSettings": "Settings …",
"ctx.fitSelection": "Fit to selection",
"ctx.clearSelection": "Clear selection",
"ctx.fit": "Fit view",
@@ -1588,7 +1588,7 @@ export const en: Record<TranslationKey, string> = {
"Reusable window types with opening style, glazing and default dimensions for newly placed windows.",
"resources.windowTypes.empty": "No window types yet.",
"resources.windowTypes.placeholder": "Window type",
"resources.addPreset": "From library…",
"resources.addPreset": "From library …",
"resources.addPreset.hint": "Add a common construction as a template",
"preset.fe-dk-1": "Tilt-and-turn, single sash",
"preset.fe-dk-2": "Tilt-and-turn, double sash",
@@ -2822,13 +2822,13 @@ export const en: Record<TranslationKey, string> = {
"file.new": "New Project",
"file.newFromSample": "New From Template: Sample House",
"file.newFromComplexSample": "New From Template: Sample House (Complex)",
"file.newFromTemplateFile": "New From Template: Choose File…",
"file.newFromTemplateFile": "New From Template: Choose File …",
"file.save": "Save project",
"file.open": "Open project",
"file.import": "Import DXF/DWG…",
"file.exportPdf": "Export as PDF…",
"file.exportDxf": "Export as DXF/DWG…",
"file.exportSchedule": "Component schedule (CSV)…",
"file.open": "Open project …",
"file.import": "Import DXF/DWG …",
"file.exportPdf": "Export as PDF …",
"file.exportDxf": "Export as DXF/DWG …",
"file.exportSchedule": "Component schedule (CSV) …",
"file.exportIfc": "Export IFC",
"file.exportObj": "Export OBJ (3D mesh)",
"file.exportStl": "Export STL (3D mesh)",
@@ -3000,7 +3000,7 @@ export const en: Record<TranslationKey, string> = {
"core.restarted": "Internal error in the core – the operation was aborted; the project and the undo history have been restored.",
"core.restartedHistoryLost": "Internal error in the core – the operation was aborted and the project has been restored. The undo history could not be restored and was cleared.",
"project.save.failed": "Project could not be saved; the file and the recovery copy are unchanged.",
"menu.native.restoreBackup": "Restore Previous Version…",
"menu.native.restoreBackup": "Restore Previous Version …",
"backup.none": "There is no previous version (.obp~) of this file.",
"backup.damaged": "The previous version (.obp~) is damaged and cannot be opened.",
"backup.restored": "Previous version opened. It replaces the file only when you save; the current version then becomes the backup (.obp~).",
@@ -3774,9 +3774,9 @@ export const en: Record<TranslationKey, string> = {
"start.recent.remove": "Remove from list",
"start.recentMissing": "File not found — removed from the list.",
"nav.bcf": "BCF issues",
"bcf.open": "Open…",
"bcf.open": "Open …",
"bcf.new": "New",
"bcf.save": "Save…",
"bcf.save": "Save …",
"bcf.format": "Format",
"bcf.author": "Author",
"bcf.author.placeholder": "Name or e-mail",
@@ -4004,7 +4004,8 @@ export const en: Record<TranslationKey, string> = {
"publish.log": "Publication log",
"publish.sheetsShort": "sheets",
"publish.empty": "The set contains no sheets.",
"publish.done": "Published (files)",
"publish.done": "Published: “{file}” ({n} files in one ZIP)",
"publish.doneOne": "Published: “{file}”",
"publish.failed": "Publishing failed",
"cmd.praesentation.label": "Presentation sheet",
"cmd.praesentation.prompt": "Set up presentation sheet …",
@@ -4044,9 +4045,9 @@ export const en: Record<TranslationKey, string> = {
"presentation.donePages": "Presentation sheet 1:{scale} created on {pages} posters",
"presentation.failed": "Could not create the presentation sheet",
// [211] Rendering mit Blender/Cycles
"cmd.rendering.label": "Rendering…",
"cmd.rendering.label": "Rendering …",
"cmd.rendering.prompt": "Set up rendering with Blender …",
"cmd.bild3d.label": "Export 3D image…",
"cmd.bild3d.label": "Export 3D image …",
"cmd.bild3d.prompt": "Export 3D image as PNG …",
"menu.view.image3d": "Export 3D Image …",
"image3d.title": "Export 3D image",
@@ -4445,6 +4446,7 @@ export const en: Record<TranslationKey, string> = {
"costs.export.fail": "Export of the cost estimate failed.",
"menu.help": "Help",
"menu.help.shortcuts": "Keyboard Shortcuts …",
"menu.help.about": "About dossier …",
"help.shortcuts.title": "Keyboard Shortcuts",
"help.shortcuts.intro": "Key combinations and command aliases as they apply now (including your changes from Settings).",
"help.shortcuts.filter": "Search …",
+14
View File
@@ -29,3 +29,17 @@ describe("en.ts: einheitliche Schreibweise", () => {
expect(hits).toEqual([]);
});
});
// [263] Auslassungspunkte: Befehle, die einen Dialog öffnen, enden auf „ …“ (Leerzeichen davor) — in Menüs, Dateimenü,
// Kontextmenüs und Befehlsnamen, de und en gleich. Fortschrittstexte („Suche…“) und Platzhalter sind ausgenommen.
describe("Auslassungspunkte in Menü- und Befehlstexten", () => {
const isCommandKey = (k: string) => /^(menu|file|ctx)\./.test(k) || /^cmd\..*\.label$/.test(k) || k === "bcf.open" || k === "bcf.save";
for (const [name, dict] of [["de", de], ["en", en]] as const) {
it(`${name}: „ …“ mit Leerzeichen, nie „x…“ oder „...“`, () => {
const hits = Object.entries(dict)
.filter(([k, v]) => typeof v === "string" && isCommandKey(k) && (/\S…$/.test(v) || /\.\.\.$/.test(v)))
.map(([k, v]) => `${k}: ${v}`);
expect(hits).toEqual([]);
});
}
});
+20 -1
View File
@@ -15,7 +15,7 @@
//
// Bezeichner englisch, UI-Text/Kommentare deutsch (CONVENTIONS.md).
import { useCallback, useRef } from "react";
import { useCallback, useEffect, useRef } from "react";
import type { CSSProperties, PointerEvent as ReactPointerEvent } from "react";
import { PanelFrame } from "./PanelFrame";
import { getPanel } from "./registry";
@@ -158,9 +158,28 @@ export function FloatingPanel({
const title = def ? t(def.title) : panel.panelId;
// [263] Verlauf/BCF/Kollisionen: Fokus ins Fenster beim Öffnen, damit Esc es schliesst.
const rootRef = useRef<HTMLElement | null>(null);
const closeOnEscape = !!def?.closeOnEscape;
useEffect(() => {
if (closeOnEscape) rootRef.current?.focus({ preventScroll: true });
}, [closeOnEscape]);
return (
<section
className="floating-panel"
ref={rootRef}
tabIndex={closeOnEscape ? -1 : undefined}
onKeyDown={
closeOnEscape
? (e) => {
if (e.key === "Escape" && !e.defaultPrevented) {
e.stopPropagation();
onClose(panel.panelId);
}
}
: undefined
}
style={style}
onPointerDownCapture={() => onFocus(panel.panelId)}
role="dialog"
+2
View File
@@ -128,6 +128,7 @@ export function KennzahlenSection() {
type="text"
className="kz-input"
value={row.name}
title={row.name || undefined}
placeholder={t("program.namePlaceholder")}
onChange={(e) => patchRow(i, { name: e.target.value }, "name")}
/>
@@ -157,6 +158,7 @@ export function KennzahlenSection() {
type="text"
className="kz-input"
value={row.group ?? ""}
title={row.group || undefined}
onChange={(e) => patchRow(i, { group: e.target.value === "" ? undefined : e.target.value }, "group")}
/>
<span
+3
View File
@@ -174,6 +174,7 @@ registerPanel({
title: "nav.bcf",
icon: <BcfTabIcon />,
hasDisplayMode: false,
closeOnEscape: true,
render: () => <BcfPanel />,
});
@@ -184,6 +185,7 @@ registerPanel({
title: "nav.clash",
icon: <BcfTabIcon />,
hasDisplayMode: false,
closeOnEscape: true,
render: () => <ClashPanel />,
});
@@ -194,6 +196,7 @@ registerPanel({
title: "nav.history",
icon: <HistoryTabIcon />,
hasDisplayMode: false,
closeOnEscape: true,
render: () => <HistoryPanel />,
});
+5
View File
@@ -153,6 +153,11 @@ export interface PanelDef {
* Kopfzeile anbieten soll. Default: kein Umschalter.
*/
hasDisplayMode?: boolean;
/**
* [263] Schwebend schliesst Esc das Fenster (Fokus im Fenster; es nimmt ihn beim Öffnen), wie bei den modalen Dialogen.
* Nur für Panels, die man kurz aufruft und wieder wegschickt (Verlauf, BCF, Kollisionen); Werkzeug-Panels bleiben.
*/
closeOnEscape?: boolean;
/**
* Optionale Aktions-Elemente rechts in der EINEN Kopfzeile des PanelFrame
* (z. B. „+ Kategorie", Fenster-Ausklinken). So bündeln Panels ihre Aktionen
+6 -1
View File
@@ -6,7 +6,7 @@
*/
import { describe, it, expect } from "vitest";
import { defaultViewFor, MIN_FIT_EXTENT_M, PAD, PX_PER_M, type ModelRect } from "./geometry";
import { defaultViewFor, HOUSE_FIT_EXTENT_M, MIN_FIT_EXTENT_M, PAD, PX_PER_M, type ModelRect } from "./geometry";
import type { Primitive } from "../generatePlan";
import { PlanPickIndex } from "./planPick";
@@ -120,6 +120,11 @@ describe("defaultViewFor [147]", () => {
expect(v.x + v.w / 2).toBeCloseTo(0.5 * PX_PER_M);
expect(v.y + v.h / 2).toBeCloseTo(-0.5 * PX_PER_M);
});
it("[263] kleines Haus (5 × 4 m): Mindestausschnitt 8 m statt 30 m, das Haus füllt über die Hälfte", () => {
const v = defaultViewFor({ minX: 0, minY: 0, maxX: 5, maxY: 4 }, PAD, HOUSE_FIT_EXTENT_M);
expect(v.w).toBeCloseTo(HOUSE_FIT_EXTENT_M * PX_PER_M + 2 * PAD);
expect(5 * PX_PER_M / v.w).toBeGreaterThan(0.5);
});
it("ungültige Grenzen (NaN/Infinity) → endlicher Standardausschnitt", () => {
const v = defaultViewFor({ minX: NaN, minY: 0, maxX: Infinity, maxY: 1 });
expect([v.x, v.y, v.w, v.h].every(Number.isFinite)).toBe(true);
+2
View File
@@ -16,6 +16,8 @@ export const PX_PER_M = 90; // viewBox-Einheiten je Meter (Modell → SVG-Benutz
export const PAD = 60; // Rand in viewBox-Einheiten
/** Kleinste Kantenlänge (m) des Einpass-Bereichs: leeres/winziges Modell öffnet bei ca. 1:100 statt extrem nah ([147]). */
export const MIN_FIT_EXTENT_M = 30;
/** [263] Kleinster Einpass-Bereich (m), sobald Bauteile da sind: ein Haus von 5 m soll den Bildschirm füllen, nicht 1/6 davon. */
export const HOUSE_FIT_EXTENT_M = 8;
/**
* Modell-Meter → SVG-Benutzerraum (viewBox-Einheiten) mit FIXEM Welt-Ursprung
+14
View File
@@ -0,0 +1,14 @@
import { describe, expect, it, vi } from "vitest";
import { openAboutDialog, setAboutDialogOpener } from "./aboutDialogHook";
describe("aboutDialogHook [263]", () => {
it("ruft den registrierten Öffner auf, danach nicht mehr", () => {
const fn = vi.fn();
setAboutDialogOpener(fn);
openAboutDialog();
expect(fn).toHaveBeenCalledTimes(1);
setAboutDialogOpener(null);
openAboutDialog();
expect(fn).toHaveBeenCalledTimes(1);
});
});
+14
View File
@@ -0,0 +1,14 @@
// [263] Modul-Hook: die Oberleiste registriert den Öffner des Über-Dialogs (Hilfe → Über dossier …); das Menü ruft ihn auf,
// ohne an TopBar-State gekoppelt zu sein (Muster `shortcutOverviewHook`).
let opener: (() => void) | null = null;
/** TopBar registriert hier den Öffner (oder hebt ihn beim Unmount auf). */
export function setAboutDialogOpener(fn: (() => void) | null): void {
opener = fn;
}
/** Öffnet den Über-Dialog, falls die Oberleiste ihn registriert hat. */
export function openAboutDialog(): void {
opener?.();
}
+1 -1
View File
@@ -65,7 +65,7 @@ export async function publishSet(project: Project, setId: string): Promise<CoreO
if (!bundle) return null;
const saved = await saveBinaryFile(bundle.bytes, bundle.fileName, bundle.mime);
if (!saved) return null;
getState().notify(`${t("publish.done")}: ${files.length}`, "info");
getState().notify(files.length === 1 ? t("publish.doneOne", { file: bundle.fileName }) : t("publish.done", { file: bundle.fileName, n: files.length }), "info");
return publishOps(project, set, plan, now.toISOString(), `pub-${now.getTime()}`);
} catch (err) {
getState().notify(`${t("publish.failed")}: ${err instanceof Error ? err.message : String(err)}`, "error");
+41 -3
View File
@@ -1031,6 +1031,9 @@ body {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
/* [263] Der Hinweis (z. B. „1/4 Treffer — erneut klicken …“) schrumpfte bei 1280 px mit Koordinaten auf „1…“. */
flex: 1 1 auto;
min-width: 170px;
}
/* Rechter Wert-Cluster. */
@@ -1038,9 +1041,25 @@ body {
display: inline-flex;
align-items: center;
gap: 8px;
flex: 0 0 auto;
flex: 0 1 auto;
min-width: 0;
overflow: hidden;
white-space: nowrap;
}
.sb-build {
display: inline-flex;
align-items: center;
gap: inherit;
}
/* [263] Schmale Fenster: Build-Nummer weg (steht im Über-Dialog), Abstände enger — dem Hinweis bleibt Platz. */
@media (max-width: 1500px) {
.sb-cluster {
gap: 5px;
}
.sb-build {
display: none;
}
}
/* Ein Wert-Feld: kleine Beschriftung + Wert. */
.sb-field {
@@ -3055,8 +3074,10 @@ body {
kein Rahmen/Verschmelzen mit dem Rand. */
.res-tabs {
display: flex;
/* [263] Umbrechen statt abschneiden: bei 1280 px verschwanden „Dachtypen“ … rechts ohne Hinweis. */
flex-wrap: wrap;
gap: 2px;
padding: 10px 16px 0;
padding: 10px 16px 6px;
flex: 0 0 auto;
border-bottom: 1px solid var(--line);
}
@@ -9115,7 +9136,19 @@ body {
/* Raumprogramm: Gruppenspalte, Aktionen, Soll/Ist-Vergleich, Import-Dialog ([61]). */
.kz-program-row {
grid-template-columns: minmax(0, 1fr) 52px 36px 64px 56px 18px;
/* [263] Zwei Zeilen je Raum: Name über die ganze Breite, darunter Fläche, Anzahl, Gruppe (flexibel), Status, Entfernen —
im 320-px-Panel blieben dem Namen sonst ≈ 40 px. */
grid-template-columns: 52px 36px minmax(0, 1fr) 56px 18px;
}
.kz-program-row > :first-child {
grid-column: 1 / -1;
}
.kz-program-head > :first-child {
display: none;
}
.kz-program-row:not(.kz-program-head) {
padding-bottom: 4px;
border-bottom: 1px solid var(--line, rgba(128, 128, 128, 0.2));
}
.kz-program-actions {
display: flex;
@@ -9422,3 +9455,8 @@ body {
overflow-y: auto;
box-sizing: border-box;
}
/* [263] Schwebendes Panel nimmt den Fokus (Esc schliesst Verlauf/BCF/Kollisionen), ohne Fokusring ums ganze Fenster. */
.floating-panel:focus {
outline: none;
}
+7 -1
View File
@@ -12,6 +12,7 @@ import type { DropdownItem } from "./Dropdown";
import { t } from "../i18n";
import type { View3d, ViewType } from "../model/viewTypes";
import { openRenderDialog } from "../state/renderDialogHook";
import { openAboutDialog } from "../state/aboutDialogHook";
import { openShortcutOverview } from "../state/shortcutOverviewHook";
import { openImageExportDialog } from "../state/imageExportDialogHook";
@@ -185,7 +186,12 @@ export const AppMenuBar = memo(function AppMenuBar({
{ label: t("menu.window.settings"), onSelect: onOpenSettings },
];
const helpItems: DropdownItem[] = [{ label: t("menu.help.shortcuts"), onSelect: openShortcutOverview }];
const helpItems: DropdownItem[] = [
{ label: t("menu.help.shortcuts"), onSelect: openShortcutOverview },
{ divider: true },
// [263] Auf macOS (natives Menü) steht „Über dossier“ im App-Menü; dieses Menü gibt es nur im Browser/Electron.
{ label: t("menu.help.about"), onSelect: openAboutDialog },
];
return (
<div className="tb-menubar" role="menubar">
+5 -3
View File
@@ -422,7 +422,7 @@ export const StatusBar = memo(function StatusBar({
return (
<footer className="statusbar">
{/* Links: Werkzeug-Hinweis. */}
<span className="sb-hint" data-testid="status-hint">{pickHint ?? hint}</span>
<span className="sb-hint" data-testid="status-hint" title={pickHint ?? hint}>{pickHint ?? hint}</span>
{/* Rechts: abgeleiteter Wert-Cluster. Interaktive Kontrollen (Linien-
Darstellung, Fang) zuerst, danach die reinen Anzeigewerte. */}
@@ -460,8 +460,10 @@ export const StatusBar = memo(function StatusBar({
<Field label={t("status.floor")} value={activeFloor} />
<Sep />
<Field label={t("status.layer")} value={activeLayer} />
<Sep />
<span className="sb-field" title={t("status.build.title")}><span className="sb-val" style={{ opacity: 0.55 }}>{formatBuildShort(BUILD_INFO, t("about.build"))}</span></span>
<span className="sb-build">
<Sep />
<span className="sb-field" title={t("status.build.title")}><span className="sb-val" style={{ opacity: 0.55 }}>{formatBuildShort(BUILD_INFO, t("about.build"))}</span></span>
</span>
</div>
</footer>
);
+6
View File
@@ -8,6 +8,7 @@
// aus App, Aktionen melden sich über Callbacks zurück. Bezeichner englisch,
// UI-Text/Kommentare deutsch (CONVENTIONS.md).
import { setAboutDialogOpener } from "../state/aboutDialogHook";
import { TEXT_FONTS } from "../text/fontList";
import { t } from "../i18n";
import { useModalFocus } from "./modalFocus";
@@ -1393,6 +1394,11 @@ export const TopBar = memo(function TopBar({
// Unter Tauri (native macOS-Ampeln oben links via titleBarStyle "Overlay")
// braucht die Zeile links Platz, damit `dossier.` nicht darunter liegt.
const [aboutOpen, setAboutOpen] = useState(false);
// [263] Hilfe → „Über dossier …“ öffnet denselben Dialog wie die Wortmarke.
useEffect(() => {
setAboutDialogOpener(() => setAboutOpen(true));
return () => setAboutDialogOpener(null);
}, []);
const tauriNativeTitlebar =
typeof window !== "undefined" && "__TAURI_INTERNALS__" in window;
+1 -1
View File
@@ -806,7 +806,7 @@ export function ComponentsTab({
<ColorSwatch color={c.foreground ?? c.color} />
)}
</span>
<span className="res-md-row-name">{c.name}</span>
<span className="res-md-row-name" title={c.name}>{c.name}</span>
</button>
);
})}
+1 -1
View File
@@ -382,7 +382,7 @@ export function HatchesTab({
<span className="res-md-row-thumb">
<HatchSwatch hatch={h} size={30} />
</span>
<span className="res-md-row-name">{h.name}</span>
<span className="res-md-row-name" title={h.name}>{h.name}</span>
</button>
))}
{hatches.length === 0 && (
+1 -1
View File
@@ -275,7 +275,7 @@ function LayeredStylesTab({
orientation={orientation}
/>
</span>
<span className="res-md-row-name">{s.name}</span>
<span className="res-md-row-name" title={s.name}>{s.name}</span>
</button>
))}
{types.length === 0 && (
+1 -1
View File
@@ -287,7 +287,7 @@ export function LinesTab({
}`}
onClick={() => setSelectedId(l.id)}
>
<span className="res-md-row-name">{l.name}</span>
<span className="res-md-row-name" title={l.name}>{l.name}</span>
<LineSwatch style={l} width={150} height={14} />
</button>
))}
+1 -1
View File
@@ -146,7 +146,7 @@ export function ModelViewsTab({ project, handlers }: { project: Project; handler
if (e.key === "Enter" || e.key === " ") setSelectedId(id);
}}
>
<span className="res-md-row-name" style={{ flex: 1, opacity: own ? 1 : 0.75 }}>
<span className="res-md-row-name" title={name} style={{ flex: 1, opacity: own ? 1 : 0.75 }}>
{name}
</span>
<button
+1 -1
View File
@@ -102,7 +102,7 @@ export function PalettesTab({
className={`res-md-row${selected?.id === p.id ? " active" : ""}`}
onClick={() => setSelectedId(p.id)}
>
<span className="res-md-row-name">{p.name}</span>
<span className="res-md-row-name" title={p.name}>{p.name}</span>
<span className="res-md-row-meta">{p.colors.length}</span>
</button>
))}
+1 -1
View File
@@ -156,7 +156,7 @@ export function PenSetsTab({
className={`res-md-row${selected?.id === s.id ? " active" : ""}`}
onClick={() => setSelectedId(s.id)}
>
<span className="res-md-row-name">{s.name}</span>
<span className="res-md-row-name" title={s.name}>{s.name}</span>
{project.activePenSetId === s.id && (
<span className="res-pen-active-badge">{t("resources.pens.activeBadge")}</span>
)}
+1 -1
View File
@@ -59,7 +59,7 @@ export function TypeLibraryTab<T extends { id: string; name: string }>({
className={`res-md-row${selected?.id === item.id ? " active" : ""}`}
onClick={() => setSelectedId(item.id)}
>
<span className="res-md-row-name">{item.name}</span>
<span className="res-md-row-name" title={item.name}>{item.name}</span>
</button>
))}
{types.length === 0 && (
+1 -1
View File
@@ -271,7 +271,7 @@ export function ViewTemplatesTab({ project, handlers }: { project: Project; hand
if (e.key === "Enter" || e.key === " ") setSelectedId(x.id);
}}
>
<span className="res-md-row-name" style={{ flex: 1 }}>
<span className="res-md-row-name" title={x.name} style={{ flex: 1 }}>
{x.name}
{usedBy(x.id) > 0 && <span style={{ display: "block", fontSize: "0.85em", opacity: 0.65 }}>{t("resources.viewTemplates.linkedCount", { n: usedBy(x.id) })}</span>}
</span>
+5 -3
View File
@@ -18,7 +18,7 @@ import { RichTextEditor } from "../../editors/RichTextEditor";
import { LiveMeet, LiveValue } from "./planView/liveMeet";
import { publishPlanViewport, viewBoxToMeshRect } from "../../state/planViewport";
import { DEFAULT_MARQUEE_COLOR, DEFAULT_SNAP_COLOR } from "../../theme/accents";
import { type ViewBox__plan_planView_geometry as ViewBox, PX_PER_M, PAD, toScreen, meetScale, defaultViewFor } from "../../core";
import { type ViewBox__plan_planView_geometry as ViewBox, PX_PER_M, PAD, toScreen, meetScale, defaultViewFor, HOUSE_FIT_EXTENT_M } from "../../core";
import {
polyUsesPattern,
HatchPattern,
@@ -172,7 +172,8 @@ export const PlanView = forwardRef<PlanViewHandle, PlanViewProps>(
const b = fitBounds ?? planRaw.bounds;
// Fester Einpass-Bereich (Blatt): Rand relativ zu seiner Grösse statt der festen Modell-Marge.
const pad = fitBounds ? Math.max(b.maxX - b.minX, b.maxY - b.minY) * PX_PER_M * 0.04 : PAD;
return defaultViewFor(b, pad, fitBounds ? 0 : undefined);
// [263] Mit Bauteilen kleinerer Mindestausschnitt (kleines Haus füllt das Fenster); leeres Projekt: 30 m.
return defaultViewFor(b, pad, fitBounds ? 0 : planRaw.houseBounds ? HOUSE_FIT_EXTENT_M : undefined);
}, [planRaw, fitBounds]);
// [204] Startansicht (Öffnen, Geschoss-/Plan-Wechsel ohne gemerkten Zoom): auf das GEBÄUDE eingepasst (Wände, Decken,
@@ -182,7 +183,8 @@ export const PlanView = forwardRef<PlanViewHandle, PlanViewProps>(
// sich auf das ganze Ausmass (sonst liesse sich nicht bis zum Kataster herauszoomen).
const startView = useMemo<ViewBox>(() => {
const h = fitBounds ? undefined : planRaw.houseBounds;
return h ? defaultViewFor(h, PAD) : defaultView;
// [263] Rand 6 % der Kantenlänge (Bemassungsketten, Schnittmarken ausserhalb der Wände bleiben im Bild).
return h ? defaultViewFor(h, Math.max(PAD, 0.06 * PX_PER_M * Math.max(h.maxX - h.minX, h.maxY - h.minY)), HOUSE_FIT_EXTENT_M) : defaultView;
}, [planRaw, fitBounds, defaultView]);
const startViewRef = useRef(startView);
startViewRef.current = startView;