Skip to content

Commit faa34c8

Browse files
committed
refactor: constrain nested-folder header layout
- Keep the current folder name and path on one left-aligned row - Tail-truncate long folder names and paths within the available header width - Preserve full folder names and paths through hover tooltips - Prevent header content from overlapping pin, search, new-folder, and new-note controls
1 parent d95c417 commit faa34c8

1 file changed

Lines changed: 19 additions & 19 deletions

File tree

‎EdgeMark/UI/Navigation/NoteListView.swift‎

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,32 @@ struct NoteListView: View {
6464

6565
var body: some View {
6666
PageLayout(onSwipeBack: { navigateBack() }) {
67-
HStack {
67+
HStack(spacing: 8) {
6868
HeaderIconButton(
6969
systemName: "chevron.left",
7070
help: l10n["common.back"],
7171
) {
7272
navigateBack()
7373
}
7474

75-
Spacer()
75+
HStack(spacing: 4) {
76+
Text(folderLabel)
77+
.font(.headline)
78+
.lineLimit(1)
79+
.truncationMode(.tail)
80+
.layoutPriority(1)
81+
.help(folderLabel)
82+
83+
Text(folderPath)
84+
.font(.caption)
85+
.foregroundStyle(.tertiary)
86+
.lineLimit(1)
87+
.truncationMode(.tail)
88+
.frame(minWidth: 48, maxWidth: .infinity, alignment: .leading)
89+
.help(folderPath)
90+
}
91+
.frame(maxWidth: .infinity, alignment: .leading)
92+
.clipped()
7693

7794
PinButton()
7895

@@ -99,23 +116,6 @@ struct NoteListView: View {
99116
createNote()
100117
}
101118
}
102-
.overlay {
103-
HStack(spacing: 4) {
104-
Text(folderLabel)
105-
.font(.headline)
106-
.lineLimit(1)
107-
.layoutPriority(1)
108-
109-
Text(folderPath)
110-
.font(.caption)
111-
.foregroundStyle(.tertiary)
112-
.lineLimit(1)
113-
.truncationMode(.middle)
114-
}
115-
.padding(.leading, 40)
116-
.padding(.trailing, 75)
117-
.help(folderPath)
118-
}
119119
} content: {
120120
VStack(spacing: 0) {
121121
ZStack {

0 commit comments

Comments
 (0)