|
27 | 27 | @ref="_displayRoot" |
28 | 28 | data-rsvp-layout-ready="@BuildLayoutReadyAttributeValue()" |
29 | 29 | data-test="@UiTestIds.Learn.Display"> |
30 | | - <div style="@BuildPendingLayoutHiddenStyle()"> |
| 30 | + <div class="rsvp-focus-stage" style="@BuildPendingLayoutHiddenStyle()"> |
31 | 31 | <div class="rsvp-crosshair"> |
32 | 32 | <UiCrosshairGuide TestId="@UiTestIds.Learn.Crosshair" /> |
33 | 33 | </div> |
|
80 | 80 | <div id="@UiDomIds.Learn.PauseFill" class="rsvp-pause-fill"></div> |
81 | 81 | </div> |
82 | 82 |
|
83 | | - <aside class="rsvp-notes" |
| 83 | + <aside class="@PrepNotesPanelCssClass" |
84 | 84 | data-test="@UiTestIds.Learn.NotesPanel" |
| 85 | + data-expanded="@_arePrepNotesExpanded.ToString().ToLowerInvariant()" |
85 | 86 | @onkeydown:stopPropagation="true"> |
86 | 87 | <div class="rsvp-notes-head"> |
87 | | - <span class="rsvp-notes-title">@Text(UiTextKey.LearnNotesTitle)</span> |
| 88 | + <button class="rsvp-notes-toggle" |
| 89 | + type="button" |
| 90 | + aria-label="@Text(UiTextKey.LearnNotesTitle)" |
| 91 | + aria-controls="@UiDomIds.Learn.NotesBody" |
| 92 | + aria-expanded="@_arePrepNotesExpanded.ToString().ToLowerInvariant()" |
| 93 | + @onclick="TogglePrepNotesExpanded" |
| 94 | + data-test="@UiTestIds.Learn.NotesToggle"> |
| 95 | + <span class="rsvp-notes-title">@Text(UiTextKey.LearnNotesTitle)</span> |
| 96 | + <UiIcon Kind="@PrepNotesToggleIcon" Size="16" StrokeWidth="2.4m" /> |
| 97 | + </button> |
88 | 98 | <span class="rsvp-notes-section" data-test="@UiTestIds.Learn.NotesSection">@CurrentPrepNotesSectionLabel</span> |
89 | 99 | </div> |
90 | | - <textarea class="rsvp-notes-input" |
91 | | - rows="3" |
92 | | - value="@_prepNoteDraft" |
93 | | - placeholder="@Text(UiTextKey.LearnNotesPlaceholder)" |
94 | | - aria-label="@Text(UiTextKey.LearnNotesTitle)" |
95 | | - @oninput="HandlePrepNoteDraftChanged" |
96 | | - data-test="@UiTestIds.Learn.NotesTextarea"></textarea> |
97 | | - <button class="rsvp-notes-save" |
98 | | - type="button" |
99 | | - disabled="@(!CanAddPrepNote)" |
100 | | - @onclick="AddPrepNoteAsync" |
101 | | - data-test="@UiTestIds.Learn.NotesSave">@Text(UiTextKey.LearnNotesSave)</button> |
102 | | - <div class="rsvp-notes-list" data-test="@UiTestIds.Learn.NotesList"> |
103 | | - @{ |
104 | | - var currentNotes = CurrentSectionPrepNotes; |
105 | | - } |
106 | | - @if (currentNotes.Count == 0) |
107 | | - { |
108 | | - <p class="rsvp-notes-empty" data-test="@UiTestIds.Learn.NotesEmpty">@Text(UiTextKey.LearnNotesEmpty)</p> |
109 | | - } |
110 | | - else |
111 | | - { |
112 | | - @foreach (var note in currentNotes) |
| 100 | + <div class="rsvp-notes-body" |
| 101 | + id="@UiDomIds.Learn.NotesBody" |
| 102 | + hidden="@(!_arePrepNotesExpanded)"> |
| 103 | + <textarea class="rsvp-notes-input" |
| 104 | + rows="3" |
| 105 | + value="@_prepNoteDraft" |
| 106 | + placeholder="@Text(UiTextKey.LearnNotesPlaceholder)" |
| 107 | + aria-label="@Text(UiTextKey.LearnNotesTitle)" |
| 108 | + @oninput="HandlePrepNoteDraftChanged" |
| 109 | + data-test="@UiTestIds.Learn.NotesTextarea"></textarea> |
| 110 | + <button class="rsvp-notes-save" |
| 111 | + type="button" |
| 112 | + disabled="@(!CanAddPrepNote)" |
| 113 | + @onclick="AddPrepNoteAsync" |
| 114 | + data-test="@UiTestIds.Learn.NotesSave">@Text(UiTextKey.LearnNotesSave)</button> |
| 115 | + <div class="rsvp-notes-list" data-test="@UiTestIds.Learn.NotesList"> |
| 116 | + @{ |
| 117 | + var currentNotes = CurrentSectionPrepNotes; |
| 118 | + } |
| 119 | + @if (currentNotes.Count == 0) |
113 | 120 | { |
114 | | - <article class="rsvp-note" data-test="@UiTestIds.Learn.NoteItem(note.Id)"> |
115 | | - <span class="rsvp-note-anchor">@note.AnchorWord</span> |
116 | | - <p>@note.Text</p> |
117 | | - </article> |
| 121 | + <p class="rsvp-notes-empty" data-test="@UiTestIds.Learn.NotesEmpty">@Text(UiTextKey.LearnNotesEmpty)</p> |
118 | 122 | } |
119 | | - } |
| 123 | + else |
| 124 | + { |
| 125 | + @foreach (var note in currentNotes) |
| 126 | + { |
| 127 | + <article class="rsvp-note" data-test="@UiTestIds.Learn.NoteItem(note.Id)"> |
| 128 | + <span class="rsvp-note-anchor">@note.AnchorWord</span> |
| 129 | + <p>@note.Text</p> |
| 130 | + </article> |
| 131 | + } |
| 132 | + } |
| 133 | + </div> |
120 | 134 | </div> |
121 | 135 | </aside> |
122 | 136 | </div> |
|
0 commit comments