Skip to content

Commit e9b1cae

Browse files
authored
Merge pull request #19596 from unoplatform/mergify/bp/release/stable/5.6/pr-19573
Ensuring items in the TOC are alphabetized for the reference section (backport #19573)
2 parents dfbdd7e + 7d5078d commit e9b1cae

File tree

2 files changed

+42
-35
lines changed

2 files changed

+42
-35
lines changed

doc/articles/toc.yml

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -482,12 +482,20 @@
482482
topicHref: implemented-views.md
483483
- name: Uno Specifics
484484
items:
485+
- name: AdaptiveTrigger
486+
href: xref:Uno.Features.AdaptiveTrigger
487+
- name: Activities in Android
488+
href: android-activities.md
485489
- name: ComboBox
486490
href: controls/ComboBox.md
487491
- name: CommandBar
488492
href: controls/CommandBar.md
489493
- name: DatePicker
490494
href: controls/DatePicker.md
495+
- name: ElevatedView
496+
href: features/ElevatedView.md
497+
- name: Fluent icon font
498+
href: uno-fluent-assets.md
491499
- name: Flyout
492500
href: controls/Flyout.md
493501
- name: Frame
@@ -498,6 +506,8 @@
498506
href: xref:Uno.Features.Image
499507
- name: ListView and GridView
500508
href: controls/ListViewBase.md
509+
- name: Lottie animations
510+
href: features/Lottie.md
501511
- name: MapControl
502512
href: controls/map-control-support.md
503513
- name: MediaPlayerElement
@@ -506,6 +516,10 @@
506516
href: controls/MenuFlyout.md
507517
- name: NavigationView
508518
href: controls/NavigationView.md
519+
- name: Native control styles
520+
href: native-styles.md
521+
- name: Other features
522+
href: xref:Uno.Development.AdditionalFeatures
509523
- name: Pivot
510524
href: controls/Pivot.md
511525
- name: Popup
@@ -524,30 +538,16 @@
524538
href: controls/TimePicker.md
525539
- name: ToggleSwitch
526540
href: controls/ToggleSwitch.md
527-
- name: WebView (WebView2)
528-
href: controls/WebView.md
529-
- name: Fluent icon font
530-
href: uno-fluent-assets.md
531-
- name: Lottie animations
532-
href: features/Lottie.md
533-
- name: Using SVG images
534-
href: features/svg.md
541+
- name: URI Protocol activation
542+
href: features/protocol-activation.md
535543
- name: Using pointer cursors
536544
href: features/cursors.md
537-
- name: ElevatedView
538-
href: features/ElevatedView.md
545+
- name: Using SVG images
546+
href: features/svg.md
539547
- name: VisibleBoundsPadding
540548
href: xref:Uno.Features.VisibleBoundsPadding
541-
- name: AdaptiveTrigger
542-
href: xref:Uno.Features.AdaptiveTrigger
543-
- name: Other features
544-
href: xref:Uno.Development.AdditionalFeatures
545-
- name: Native control styles
546-
href: native-styles.md
547-
- name: URI Protocol activation
548-
href: features/protocol-activation.md
549-
- name: Activities in Android
550-
href: android-activities.md
549+
- name: WebView (WebView2)
550+
href: controls/WebView.md
551551

552552
- name: Features
553553
items:
@@ -557,6 +557,8 @@
557557
href: features/working-with-animations.md
558558
- name: Assets and image display
559559
href: features/working-with-assets.md
560+
- name: Build telemetry
561+
href: uno-toolchain-telemetry.md
560562
- name: Composition API
561563
href: composition.md
562564
- name: Dialogs
@@ -567,6 +569,8 @@
567569
href: features/focus-management.md
568570
- name: Fonts
569571
href: features/custom-fonts.md
572+
- name: Markup Extensions
573+
href: features/windows-ui-markup-extensions.md
570574
- name: Native frame navigation
571575
href: features/native-frame-nav.md
572576
- name: Orientation
@@ -577,22 +581,18 @@
577581
href: features/shapes-and-brushes.md
578582
- name: String resources and localization
579583
href: features/working-with-strings.md
584+
- name: Succinct syntax
585+
href: features/windows-ui-succinct-syntax.md
580586
- name: Themes
581587
href: features/working-with-themes.md
582588
- name: User inputs - Keyboard, Pointers, Gestures, Manipulations, Drag and drop
583589
href: features/pointers-keyboard-and-other-user-inputs.md
584590
- name: Using Fluent styles in legacy apps
585591
href: features/using-winui2.md
586-
- name: x:Bind
587-
href: features/windows-ui-xaml-xbind.md
588-
- name: Succinct syntax
589-
href: features/windows-ui-succinct-syntax.md
590-
- name: Markup Extensions
591-
href: features/windows-ui-markup-extensions.md
592-
- name: Build telemetry
593-
href: uno-toolchain-telemetry.md
594592
- name: Windowing
595593
href: features/windows-ui-xaml-window.md
594+
- name: x:Bind
595+
href: features/windows-ui-xbind.md
596596

597597
- name: 3rd-party libraries
598598
href: supported-libraries.md
@@ -635,10 +635,10 @@
635635
href: features/windows-system-profile.md
636636
- name: E-mail
637637
href: features/windows-applicationmodel-email.md
638-
- name: File Management
639-
href: features/file-management.md
640638
- name: File and Folder Pickers
641639
href: features/windows-storage-pickers.md
640+
- name: File Management
641+
href: features/file-management.md
642642
- name: Flashlight
643643
href: features/flashlight.md
644644
- name: Gamepad
@@ -669,12 +669,12 @@
669669
href: features/windows-applicationmodel-calls.md
670670
- name: Proximity Sensor
671671
href: features/proximity-sensor.md
672+
- name: Settings
673+
href: features/settings.md
672674
- name: Sharing
673675
href: features/windows-applicationmodel-datatransfer.md
674676
- name: SMS
675677
href: features/windows-applicationmodel-chat.md
676-
- name: Settings
677-
href: features/settings.md
678678
- name: Speech Recognition
679679
href: features/SpeechRecognition.md
680680
- name: Step Counter

src/Uno.UWPSyncGenerator/DocGenerator.cs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ void BuildMemberLists()
102102
Directory.CreateDirectory(Path.Combine(DocPath, ImplementedPath));
103103

104104
var tocSB = new StringBuilder();
105+
var entries = new Dictionary<string, string>();
105106

106107
foreach (var group in _viewsGrouped)
107108
{
@@ -251,12 +252,18 @@ void AppendNotImplementedMembers<T>(string memberTypePlural, string memberTypeSi
251252
fileWriter.Write(_sb.ToString());
252253
}
253254

254-
// Build TOC in implemented folder
255-
tocSB.AppendLineInvariant($"- name: {viewName}");
256-
tocSB.AppendLineInvariant($" href: ../{GetImplementedMembersFilename(view.UAPSymbol)}");
255+
// Collect entries before sorting
256+
entries.Add(viewName, GetImplementedMembersFilename(view.UAPSymbol));
257257
}
258258
}
259259

260+
// Build TOC ordered by name in implemented folder
261+
foreach (var kvp in entries.OrderBy(x => x.Key))
262+
{
263+
tocSB.AppendLineInvariant($"- name: {kvp.Key}");
264+
tocSB.AppendLineInvariant($" href: ../{kvp.Value}");
265+
}
266+
260267
#if DEBUG
261268
if (_views.None())
262269
{

0 commit comments

Comments
 (0)