@@ -97,9 +97,11 @@ Get-ChildItem -Path $SourceDir -Recurse -Filter *.xaml | ForEach-Object {
9797 if ($filename -eq ' Launch.xaml' )
9898 {
9999 $entries += [pscustomobject ]@ {
100+ DisplayTextUid = " L`" Nav_Launch/Content`" "
100101 DisplayTextLocalized = " RS_(L`" Nav_Launch/Content`" )"
102+ HelpTextUid = " std::nullopt"
101103 HelpTextLocalized = " std::nullopt"
102- ParentPage = " winrt::xaml_typename< $ ( $ pageClass) >() "
104+ ParentPage = $ pageClass
103105 NavigationParam = " winrt::box_value(hstring{L`" Launch_Nav`" })"
104106 SubPage = " BreadcrumbSubPage::None"
105107 ElementName = ' L""'
@@ -109,9 +111,11 @@ Get-ChildItem -Path $SourceDir -Recurse -Filter *.xaml | ForEach-Object {
109111 elseif ($filename -eq ' Interaction.xaml' )
110112 {
111113 $entries += [pscustomobject ]@ {
114+ DisplayTextUid = " L`" Nav_Interaction/Content`" "
112115 DisplayTextLocalized = " RS_(L`" Nav_Interaction/Content`" )"
116+ HelpTextUid = " std::nullopt"
113117 HelpTextLocalized = " std::nullopt"
114- ParentPage = " winrt::xaml_typename< $ ( $ pageClass) >() "
118+ ParentPage = $ pageClass
115119 NavigationParam = " winrt::box_value(hstring{L`" Interaction_Nav`" })"
116120 SubPage = " BreadcrumbSubPage::None"
117121 ElementName = ' L""'
@@ -121,9 +125,11 @@ Get-ChildItem -Path $SourceDir -Recurse -Filter *.xaml | ForEach-Object {
121125 elseif ($filename -eq ' GlobalAppearance.xaml' )
122126 {
123127 $entries += [pscustomobject ]@ {
128+ DisplayTextUid = " L`" Nav_Appearance/Content`" "
124129 DisplayTextLocalized = " RS_(L`" Nav_Appearance/Content`" )"
130+ HelpTextUid = " std::nullopt"
125131 HelpTextLocalized = " std::nullopt"
126- ParentPage = " winrt::xaml_typename< $ ( $ pageClass) >() "
132+ ParentPage = $ pageClass
127133 NavigationParam = " winrt::box_value(hstring{L`" Appearance_Nav`" })"
128134 SubPage = " BreadcrumbSubPage::None"
129135 ElementName = ' L""'
@@ -133,9 +139,11 @@ Get-ChildItem -Path $SourceDir -Recurse -Filter *.xaml | ForEach-Object {
133139 elseif ($filename -eq ' ColorSchemes.xaml' )
134140 {
135141 $entries += [pscustomobject ]@ {
142+ DisplayTextUid = " L`" Nav_ColorSchemes/Content`" "
136143 DisplayTextLocalized = " RS_(L`" Nav_ColorSchemes/Content`" )"
144+ HelpTextUid = " std::nullopt"
137145 HelpTextLocalized = " std::nullopt"
138- ParentPage = " winrt::xaml_typename< $ ( $ pageClass) >() "
146+ ParentPage = $ pageClass
139147 NavigationParam = " winrt::box_value(hstring{L`" ColorSchemes_Nav`" })"
140148 SubPage = " BreadcrumbSubPage::None"
141149 ElementName = ' L""'
@@ -144,9 +152,11 @@ Get-ChildItem -Path $SourceDir -Recurse -Filter *.xaml | ForEach-Object {
144152
145153 # Manually register the "add new" button
146154 $entries += [pscustomobject ]@ {
155+ DisplayTextUid = " L`" ColorScheme_AddNewButton/Text`" "
147156 DisplayTextLocalized = ' RS_(L"ColorScheme_AddNewButton/Text")'
157+ HelpTextUid = ' std::nullopt'
148158 HelpTextLocalized = ' std::nullopt'
149- ParentPage = " winrt::xaml_typename< $ ( $ pageClass) >() "
159+ ParentPage = $ pageClass
150160 NavigationParam = " winrt::box_value(hstring{L`" ColorSchemes_Nav`" })"
151161 SubPage = ' BreadcrumbSubPage::None'
152162 ElementName = ' L"AddNewButton"'
@@ -157,9 +167,11 @@ Get-ChildItem -Path $SourceDir -Recurse -Filter *.xaml | ForEach-Object {
157167 elseif ($filename -eq ' Rendering.xaml' )
158168 {
159169 $entries += [pscustomobject ]@ {
170+ DisplayTextUid = " L`" Nav_Rendering/Content`" "
160171 DisplayTextLocalized = " RS_(L`" Nav_Rendering/Content`" )"
172+ HelpTextUid = " std::nullopt"
161173 HelpTextLocalized = " std::nullopt"
162- ParentPage = " winrt::xaml_typename< $ ( $ pageClass) >() "
174+ ParentPage = $ pageClass
163175 NavigationParam = " winrt::box_value(hstring{L`" Rendering_Nav`" })"
164176 SubPage = " BreadcrumbSubPage::None"
165177 ElementName = ' L""'
@@ -169,9 +181,11 @@ Get-ChildItem -Path $SourceDir -Recurse -Filter *.xaml | ForEach-Object {
169181 elseif ($filename -eq ' Compatibility.xaml' )
170182 {
171183 $entries += [pscustomobject ]@ {
184+ DisplayTextUid = " L`" Nav_Compatibility/Content`" "
172185 DisplayTextLocalized = " RS_(L`" Nav_Compatibility/Content`" )"
186+ HelpTextUid = " std::nullopt"
173187 HelpTextLocalized = " std::nullopt"
174- ParentPage = " winrt::xaml_typename< $ ( $ pageClass) >() "
188+ ParentPage = $ pageClass
175189 NavigationParam = " winrt::box_value(hstring{L`" Compatibility_Nav`" })"
176190 SubPage = " BreadcrumbSubPage::None"
177191 ElementName = ' L""'
@@ -181,9 +195,11 @@ Get-ChildItem -Path $SourceDir -Recurse -Filter *.xaml | ForEach-Object {
181195 elseif ($filename -eq ' Actions.xaml' )
182196 {
183197 $entries += [pscustomobject ]@ {
198+ DisplayTextUid = " L`" Nav_Actions/Content`" "
184199 DisplayTextLocalized = " RS_(L`" Nav_Actions/Content`" )"
200+ HelpTextUid = " std::nullopt"
185201 HelpTextLocalized = " std::nullopt"
186- ParentPage = " winrt::xaml_typename< $ ( $ pageClass) >() "
202+ ParentPage = $ pageClass
187203 NavigationParam = " winrt::box_value(hstring{L`" Actions_Nav`" })"
188204 SubPage = " BreadcrumbSubPage::None"
189205 ElementName = ' L""'
@@ -193,9 +209,11 @@ Get-ChildItem -Path $SourceDir -Recurse -Filter *.xaml | ForEach-Object {
193209 elseif ($filename -eq ' NewTabMenu.xaml' )
194210 {
195211 $entries += [pscustomobject ]@ {
212+ DisplayTextUid = " L`" Nav_NewTabMenu/Content`" "
196213 DisplayTextLocalized = " RS_(L`" Nav_NewTabMenu/Content`" )"
214+ HelpTextUid = " std::nullopt"
197215 HelpTextLocalized = " std::nullopt"
198- ParentPage = " winrt::xaml_typename< $ ( $ pageClass) >() "
216+ ParentPage = $ pageClass
199217 NavigationParam = " winrt::box_value(hstring{L`" NewTabMenu_Nav`" })"
200218 SubPage = " BreadcrumbSubPage::None"
201219 ElementName = ' L""'
@@ -205,9 +223,11 @@ Get-ChildItem -Path $SourceDir -Recurse -Filter *.xaml | ForEach-Object {
205223 elseif ($filename -eq ' Extensions.xaml' )
206224 {
207225 $entries += [pscustomobject ]@ {
226+ DisplayTextUid = " L`" Nav_Extensions/Content`" "
208227 DisplayTextLocalized = " RS_(L`" Nav_Extensions/Content`" )"
228+ HelpTextUid = " std::nullopt"
209229 HelpTextLocalized = " std::nullopt"
210- ParentPage = " winrt::xaml_typename< $ ( $ pageClass) >() "
230+ ParentPage = $ pageClass
211231 NavigationParam = " winrt::box_value(hstring{L`" Extensions_Nav`" })"
212232 SubPage = " BreadcrumbSubPage::None"
213233 ElementName = ' L""'
@@ -328,9 +348,11 @@ Get-ChildItem -Path $SourceDir -Recurse -Filter *.xaml | ForEach-Object {
328348 }
329349
330350 $entries += [pscustomobject ]@ {
351+ DisplayTextUid = " L`" $ ( $uid ) /Header`" "
331352 DisplayTextLocalized = " RS_(L`" $ ( $uid ) /Header`" )"
332- HelpTextLocalized = $resourceKeys -contains " $ ( $uid ) /HelpText" ? " std::optional<hstring>{ RS_(L`" $ ( $uid ) /HelpText`" ) }" : " std::nullopt"
333- ParentPage = " winrt::xaml_typename<$ ( $pageClass ) >()"
353+ HelpTextUid = $resourceKeys -contains " $ ( $uid ) .HelpText" ? " std::optional<hstring>{ L`" $ ( $uid ) /HelpText`" }" : " std::nullopt"
354+ HelpTextLocalized = $resourceKeys -contains " $ ( $uid ) .HelpText" ? " std::optional<hstring>{ RS_(L`" $ ( $uid ) /HelpText`" ) }" : " std::nullopt"
355+ ParentPage = $pageClass
334356 NavigationParam = $navigationParam -eq " nullptr" ? $navigationParam : " winrt::box_value(hstring{L`" $ ( $navigationParam ) `" })"
335357 SubPage = $subPage
336358 ElementName = " L`" $ ( $name ) `" "
@@ -341,9 +363,11 @@ Get-ChildItem -Path $SourceDir -Recurse -Filter *.xaml | ForEach-Object {
341363 if ($duplicateForVM )
342364 {
343365 $entries += [pscustomobject ]@ {
366+ DisplayTextUid = " L`" $ ( $uid ) /Header`" "
344367 DisplayTextLocalized = " RS_(L`" $ ( $uid ) /Header`" )"
345- HelpTextLocalized = $resourceKeys -contains " $ ( $uid ) /HelpText" ? " std::optional<hstring>{ RS_(L`" $ ( $uid ) /HelpText`" ) }" : " std::nullopt"
346- ParentPage = " winrt::xaml_typename<$ ( $pageClass ) >()"
368+ HelpTextUid = $resourceKeys -contains " $ ( $uid ) .HelpText" ? " std::optional<hstring>{ L`" $ ( $uid ) /HelpText`" }" : " std::nullopt"
369+ HelpTextLocalized = $resourceKeys -contains " $ ( $uid ) .HelpText" ? " std::optional<hstring>{ RS_(L`" $ ( $uid ) /HelpText`" ) }" : " std::nullopt"
370+ ParentPage = $pageClass
347371 NavigationParam = ' nullptr' # VM param at runtime
348372 SubPage = $navigationParam -eq ' NewTabMenu_Nav' ? ' BreadcrumbSubPage::NewTabMenu_Folder' : $subPage
349373 ElementName = " L`" $ ( $name ) `" "
@@ -362,7 +386,7 @@ $schemeEntries = @()
362386$ntmEntries = @ ()
363387foreach ($e in $entries )
364388{
365- $formattedEntry = " IndexEntry{ $ ( $e.DisplayTextLocalized ) , $ ( $e.HelpTextLocalized ) , $ ( $e.ParentPage ) , $ ( $e.NavigationParam ) , $ ( $e.SubPage ) , $ ( $e.ElementName ) }, // $ ( $e.File ) "
389+ $formattedEntry = " IndexEntry{ $ ( $e.DisplayTextUid ) , $ ( $e . DisplayTextLocalized) , $ ( $e.HelpTextUid ) , $ ( $e.HelpTextLocalized ) , $ ( $e.NavigationParam ) , $ ( $e.SubPage ) , $ ( $e.ElementName ) }, // $ ( $e.File ) "
366390
367391 if ($e.NavigationParam -eq ' nullptr' -and
368392 ($e.ParentPage -match ' Profiles_Base' -or
@@ -401,17 +425,20 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
401425{
402426 struct IndexEntry
403427 {
428+ // x:Uid of the SettingContainer's Header (i.e. "Globals_DefaultProfile/Header")
429+ hstring DisplayTextUid;
430+
404431 // Localized display text shown in the SettingContainer (i.e. RS_(L"Globals_DefaultProfile/Header"))
405432 hstring DisplayTextLocalized;
406433
434+ // x:Uid of the SettingContainer's HelpText (i.e. "Globals_DefaultProfile/HelpText")
435+ // May not exist for all entries
436+ std::optional<hstring> HelpTextUid;
437+
407438 // Localized help text shown in the SettingContainer (i.e. RS_(L"Globals_DefaultProfile/HelpText"))
408439 // May not exist for all entries
409440 std::optional<hstring> HelpTextLocalized;
410441
411- // TODO CARLOS: this might not be necessary; remove
412- // x:Class of the parent Page (i.e. winrt::xaml_typename<Microsoft::Terminal::Settings::Editor::Launch>())
413- winrt::Windows::UI::Xaml::Interop::TypeName ParentPage;
414-
415442 // Navigation argument (i.e. winrt::box_value(hstring) or nullptr)
416443 // Use nullptr as placeholder for runtime navigation with a view model object
417444 winrt::Windows::Foundation::IInspectable NavigationArg;
@@ -483,25 +510,25 @@ $( ($schemeEntries -join "`r`n") )
483510
484511 const IndexEntry& PartialProfileIndexEntry()
485512 {
486- static IndexEntry entry{ L"", std::nullopt, winrt::xaml_typename<Microsoft::Terminal::Settings::Editor::Profiles_Base>() , nullptr, BreadcrumbSubPage::None, L"" };
513+ static IndexEntry entry{ L"", L"", std::nullopt, std::nullopt , nullptr, BreadcrumbSubPage::None, L"" };
487514 return entry;
488515 }
489516
490517 const IndexEntry& PartialNTMFolderIndexEntry()
491518 {
492- static IndexEntry entry{ L"", std::nullopt, winrt::xaml_typename<Microsoft::Terminal::Settings::Editor::NewTabMenu>() , nullptr, BreadcrumbSubPage::NewTabMenu_Folder, L"" };
519+ static IndexEntry entry{ L"", L"", std::nullopt, std::nullopt , nullptr, BreadcrumbSubPage::NewTabMenu_Folder, L"" };
493520 return entry;
494521 }
495522
496523 const IndexEntry& PartialColorSchemeIndexEntry()
497524 {
498- static IndexEntry entry{ L"", std::nullopt, winrt::xaml_typename<Microsoft::Terminal::Settings::Editor::EditColorScheme>() , nullptr, BreadcrumbSubPage::ColorSchemes_Edit, L"" };
525+ static IndexEntry entry{ L"", L"", std::nullopt, std::nullopt , nullptr, BreadcrumbSubPage::ColorSchemes_Edit, L"" };
499526 return entry;
500527 }
501528
502529 const IndexEntry& PartialExtensionIndexEntry()
503530 {
504- static IndexEntry entry{ L"", std::nullopt, winrt::xaml_typename<Microsoft::Terminal::Settings::Editor::Extensions>() , nullptr, BreadcrumbSubPage::Extensions_Extension, L"" };
531+ static IndexEntry entry{ L"", L"", std::nullopt, std::nullopt , nullptr, BreadcrumbSubPage::Extensions_Extension, L"" };
505532 return entry;
506533 }
507534}
0 commit comments