@@ -93,58 +93,126 @@ Get-ChildItem -Path $SourceDir -Recurse -Filter *.xaml | ForEach-Object {
9393 $subPage += ' None'
9494 }
9595
96- if ($filename -eq ' ColorSchemes.xaml' )
96+ # Register top-level pages
97+ if ($filename -eq ' Launch.xaml' )
9798 {
98- # ColorSchemes.xaml doesn't have any SettingContainers!
99-
100- # TODO CARLOS: remove from script; hard code in MainPage instead
101- # Register the page itself
102- # $entries += [pscustomobject]@{
103- # DisplayText = 'vm'
104- # ParentPage = "winrt::xaml_typename<Microsoft::Terminal::Settings::Editor::ColorSchemes>()"
105- # NavigationParam = "winrt::box_value(hstring{L`"ColorSchemes_Nav`"})"
106- # SubPage = 'BreadcrumbSubPage::ColorSchemes_Edit'
107- # ElementName = 'L""'
108- # File = $filename
109- # }
110-
111- # TODO CARLOS: remove from script; hard code in MainPage instead
99+ $entries += [pscustomobject ]@ {
100+ DisplayTextLocalized = " RS_(L`" Nav_Launch/Content`" )"
101+ HelpTextLocalized = " std::nullopt"
102+ ParentPage = " winrt::xaml_typename<$ ( $pageClass ) >()"
103+ NavigationParam = " winrt::box_value(hstring{L`" Launch_Nav`" })"
104+ SubPage = " BreadcrumbSubPage::None"
105+ ElementName = ' L""'
106+ File = $filename
107+ }
108+ }
109+ elseif ($filename -eq ' Interaction.xaml' )
110+ {
111+ $entries += [pscustomobject ]@ {
112+ DisplayTextLocalized = " RS_(L`" Nav_Interaction/Content`" )"
113+ HelpTextLocalized = " std::nullopt"
114+ ParentPage = " winrt::xaml_typename<$ ( $pageClass ) >()"
115+ NavigationParam = " winrt::box_value(hstring{L`" Interaction_Nav`" })"
116+ SubPage = " BreadcrumbSubPage::None"
117+ ElementName = ' L""'
118+ File = $filename
119+ }
120+ }
121+ elseif ($filename -eq ' GlobalAppearance.xaml' )
122+ {
123+ $entries += [pscustomobject ]@ {
124+ DisplayTextLocalized = " RS_(L`" Nav_Appearance/Content`" )"
125+ HelpTextLocalized = " std::nullopt"
126+ ParentPage = " winrt::xaml_typename<$ ( $pageClass ) >()"
127+ NavigationParam = " winrt::box_value(hstring{L`" Appearance_Nav`" })"
128+ SubPage = " BreadcrumbSubPage::None"
129+ ElementName = ' L""'
130+ File = $filename
131+ }
132+ }
133+ elseif ($filename -eq ' ColorSchemes.xaml' )
134+ {
135+ $entries += [pscustomobject ]@ {
136+ DisplayTextLocalized = " RS_(L`" Nav_ColorSchemes/Content`" )"
137+ HelpTextLocalized = " std::nullopt"
138+ ParentPage = " winrt::xaml_typename<$ ( $pageClass ) >()"
139+ NavigationParam = " winrt::box_value(hstring{L`" ColorSchemes_Nav`" })"
140+ SubPage = " BreadcrumbSubPage::None"
141+ ElementName = ' L""'
142+ File = $filename
143+ }
144+
112145 # Manually register the "add new" button
113- # $entries += [pscustomobject]@{
114- # DisplayText = 'RS_(L"ColorScheme_AddNewButton/Text")'
115- # ParentPage = "winrt::xaml_typename<Microsoft::Terminal::Settings::Editor::ColorSchemes>()"
116- # NavigationParam = "winrt::box_value(hstring{L`"ColorSchemes_Nav`"})"
117- # SubPage = 'BreadcrumbSubPage::None'
118- # ElementName = 'L"AddNewButton"'
119- # File = $filename
120- # }
121- return
146+ $entries += [pscustomobject ]@ {
147+ DisplayTextLocalized = ' RS_(L"ColorScheme_AddNewButton/Text")'
148+ HelpTextLocalized = ' std::nullopt'
149+ ParentPage = " winrt::xaml_typename<$ ( $pageClass ) >()"
150+ NavigationParam = " winrt::box_value(hstring{L`" ColorSchemes_Nav`" })"
151+ SubPage = ' BreadcrumbSubPage::None'
152+ ElementName = ' L"AddNewButton"'
153+ File = $filename
154+ }
155+
156+ }
157+ elseif ($filename -eq ' Rendering.xaml' )
158+ {
159+ $entries += [pscustomobject ]@ {
160+ DisplayTextLocalized = " RS_(L`" Nav_Rendering/Content`" )"
161+ HelpTextLocalized = " std::nullopt"
162+ ParentPage = " winrt::xaml_typename<$ ( $pageClass ) >()"
163+ NavigationParam = " winrt::box_value(hstring{L`" Rendering_Nav`" })"
164+ SubPage = " BreadcrumbSubPage::None"
165+ ElementName = ' L""'
166+ File = $filename
167+ }
168+ }
169+ elseif ($filename -eq ' Compatibility.xaml' )
170+ {
171+ $entries += [pscustomobject ]@ {
172+ DisplayTextLocalized = " RS_(L`" Nav_Compatibility/Content`" )"
173+ HelpTextLocalized = " std::nullopt"
174+ ParentPage = " winrt::xaml_typename<$ ( $pageClass ) >()"
175+ NavigationParam = " winrt::box_value(hstring{L`" Compatibility_Nav`" })"
176+ SubPage = " BreadcrumbSubPage::None"
177+ ElementName = ' L""'
178+ File = $filename
179+ }
180+ }
181+ elseif ($filename -eq ' Actions.xaml' )
182+ {
183+ $entries += [pscustomobject ]@ {
184+ DisplayTextLocalized = " RS_(L`" Nav_Actions/Content`" )"
185+ HelpTextLocalized = " std::nullopt"
186+ ParentPage = " winrt::xaml_typename<$ ( $pageClass ) >()"
187+ NavigationParam = " winrt::box_value(hstring{L`" Actions_Nav`" })"
188+ SubPage = " BreadcrumbSubPage::None"
189+ ElementName = ' L""'
190+ File = $filename
191+ }
192+ }
193+ elseif ($filename -eq ' NewTabMenu.xaml' )
194+ {
195+ $entries += [pscustomobject ]@ {
196+ DisplayTextLocalized = " RS_(L`" Nav_NewTabMenu/Content`" )"
197+ HelpTextLocalized = " std::nullopt"
198+ ParentPage = " winrt::xaml_typename<$ ( $pageClass ) >()"
199+ NavigationParam = " winrt::box_value(hstring{L`" NewTabMenu_Nav`" })"
200+ SubPage = " BreadcrumbSubPage::None"
201+ ElementName = ' L""'
202+ File = $filename
203+ }
122204 }
123205 elseif ($filename -eq ' Extensions.xaml' )
124206 {
125-
126- # TODO CARLOS: remove from script; hard code in MainPage instead
127- # Register the main extension page
128- # $entries += [pscustomobject]@{
129- # DisplayText = 'RS_(L"Nav_Extensions/Content")'
130- # ParentPage = "winrt::xaml_typename<Microsoft::Terminal::Settings::Editor::Extensions>()"
131- # NavigationParam = "nullptr"
132- # SubPage = 'BreadcrumbSubPage::None'
133- # ElementName = 'L""'
134- # File = $filename
135- # }
136-
137- # TODO CARLOS: remove from script; hard code in MainPage instead
138- # Register the extension view
139- # $entries += [pscustomobject]@{
140- # DisplayText = 'vm.Package().DisplayName()'
141- # ParentPage = "winrt::xaml_typename<Microsoft::Terminal::Settings::Editor::Extensions>()"
142- # NavigationParam = "vm"
143- # SubPage = 'BreadcrumbSubPage::Extensions_Extension'
144- # ElementName = 'L""'
145- # File = $filename
146- # }
147- return
207+ $entries += [pscustomobject ]@ {
208+ DisplayTextLocalized = " RS_(L`" Nav_Extensions/Content`" )"
209+ HelpTextLocalized = " std::nullopt"
210+ ParentPage = " winrt::xaml_typename<$ ( $pageClass ) >()"
211+ NavigationParam = " winrt::box_value(hstring{L`" Extensions_Nav`" })"
212+ SubPage = " BreadcrumbSubPage::None"
213+ ElementName = ' L""'
214+ File = $filename
215+ }
148216 }
149217
150218 # Find all local:SettingContainer start tags
@@ -286,7 +354,7 @@ Get-ChildItem -Path $SourceDir -Recurse -Filter *.xaml | ForEach-Object {
286354}
287355
288356# Ensure there aren't any duplicate entries
289- $entries = $entries | Sort-Object RootUid , ParentPage, NavigationParam, SubPage, ElementName, File - Unique
357+ $entries = $entries | Sort-Object DisplayTextLocalized , HelpTextLocalized , ParentPage, NavigationParam, SubPage, ElementName, File - Unique
290358
291359$buildTimeEntries = @ ()
292360$profileEntries = @ ()
@@ -340,6 +408,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
340408 // May not exist for all entries
341409 std::optional<hstring> HelpTextLocalized;
342410
411+ // TODO CARLOS: this might not be necessary; remove
343412 // x:Class of the parent Page (i.e. winrt::xaml_typename<Microsoft::Terminal::Settings::Editor::Launch>())
344413 winrt::Windows::UI::Xaml::Interop::TypeName ParentPage;
345414
@@ -357,6 +426,8 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
357426 const std::array<IndexEntry, $ ( $profileEntries.Count ) >& LoadProfileIndex();
358427 const std::array<IndexEntry, $ ( $ntmEntries.Count ) >& LoadNTMFolderIndex();
359428 const std::array<IndexEntry, $ ( $schemeEntries.Count ) >& LoadColorSchemeIndex();
429+
430+ const IndexEntry& PartialProfileIndexEntry();
360431}
361432"@
362433
@@ -406,6 +477,12 @@ $( ($schemeEntries -join "`r`n") )
406477 };
407478 return entries;
408479 }
480+
481+ const IndexEntry& PartialProfileIndexEntry()
482+ {
483+ static IndexEntry entry{ L"", std::nullopt, winrt::xaml_typename<Microsoft::Terminal::Settings::Editor::Profiles_Base>(), nullptr, BreadcrumbSubPage::None, L"" };
484+ return entry;
485+ }
409486}
410487"@
411488
0 commit comments