File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11.activity-page {
22 display : grid;
3- grid-template-rows : auto auto minmax (260px , 1fr );
3+ grid-template-rows : auto minmax (260px , 1fr );
44 align-content : start;
55 gap : 16px ;
66 min-height : min (680px , calc (100vh - 180px ));
77}
88
9- .activity-page__header {
10- display : flex;
11- align-items : flex-start;
12- justify-content : space-between;
13- gap : 16px ;
14- }
15-
16- .activity-page__title {
17- color : var (--text-strong );
18- font-size : var (--control-ui-text-lg );
19- font-weight : 650 ;
20- }
21-
22- .activity-page__subtitle ,
23- .activity-page__count {
24- color : var (--muted );
25- font-size : var (--control-ui-text-sm );
26- }
27-
28- .activity-page__count {
29- white-space : nowrap;
30- }
31-
329.activity-toolbar {
3310 display : flex;
3411 align-items : end;
3714 padding-bottom : 2px ;
3815}
3916
17+ .activity-toolbar__count {
18+ flex : 0 0 auto;
19+ align-self : center;
20+ margin-left : auto;
21+ color : var (--muted );
22+ font-size : var (--control-ui-text-sm );
23+ white-space : nowrap;
24+ }
25+
4026.activity-field {
4127 display : grid;
4228 gap : 5px ;
277263 min-height : calc (100vh - 150px );
278264 }
279265
280- .activity-page__header {
281- display : grid;
282- }
283-
284- .activity-page__count ,
266+ .activity-toolbar__count ,
285267 .activity-entry__meta {
286268 white-space : normal;
287269 }
288270
271+ .activity-toolbar__count {
272+ flex-basis : 100% ;
273+ margin-left : 0 ;
274+ }
275+
289276 .activity-entry__summary {
290277 grid-template-columns : 18px minmax (0 , 1fr );
291278 gap : 8px ;
Original file line number Diff line number Diff line change @@ -81,6 +81,18 @@ describe("renderActivity", () => {
8181 expect ( container . querySelector ( ".activity-entry" ) ?. getAttribute ( "role" ) ) . toBe ( "listitem" ) ;
8282 } ) ;
8383
84+ it ( "lets the route shell own the page heading" , async ( ) => {
85+ await i18n . setLocale ( "en" ) ;
86+ const container = document . createElement ( "div" ) ;
87+ document . body . append ( container ) ;
88+
89+ render ( renderActivity ( createProps ( ) ) , container ) ;
90+
91+ expect ( container . querySelector ( ".activity-page__title" ) ) . toBeNull ( ) ;
92+ expect ( container . querySelector ( ".activity-page__subtitle" ) ) . toBeNull ( ) ;
93+ expect ( container . querySelector ( ".activity-toolbar__count" ) ?. textContent ?. trim ( ) ) . toBe ( "1 of 1" ) ;
94+ } ) ;
95+
8496 it ( "normalizes rounded minute durations that would otherwise show 60 seconds" , async ( ) => {
8597 await i18n . setLocale ( "en" ) ;
8698 const container = document . createElement ( "div" ) ;
Original file line number Diff line number Diff line change @@ -185,20 +185,7 @@ export function renderActivity(props: ActivityProps) {
185185 STATUS_ORDER . some ( ( status ) => ! props . statusFilters [ status ] ) ;
186186
187187 return html `
188- < section class ="activity-page " aria-labelledby ="activity-title ">
189- < div class ="activity-page__header ">
190- < div >
191- < div id ="activity-title " class ="activity-page__title "> ${ t ( "activity.title" ) } </ div >
192- < div class ="activity-page__subtitle "> ${ t ( "activity.subtitle" ) } </ div >
193- </ div >
194- < div class ="activity-page__count ">
195- ${ t ( "activity.visibleCount" , {
196- visible : String ( filtered . length ) ,
197- total : String ( props . entries . length ) ,
198- } ) }
199- </ div >
200- </ div >
201-
188+ < section class ="activity-page " aria-label =${ t ( "activity.title" ) } >
202189 < div class ="activity-toolbar " aria-label =${ t ( "activity.filtersLabel" ) } >
203190 < label class ="activity-field activity-field--search ">
204191 < span > ${ t ( "activity.search" ) } </ span >
@@ -259,6 +246,12 @@ export function renderActivity(props: ActivityProps) {
259246 ${ t ( "activity.clear" ) }
260247 </ button >
261248 </ div >
249+ < div class ="activity-toolbar__count " aria-live ="polite ">
250+ ${ t ( "activity.visibleCount" , {
251+ visible : String ( filtered . length ) ,
252+ total : String ( props . entries . length ) ,
253+ } ) }
254+ </ div >
262255 </ div >
263256
264257 < div
You can’t perform that action at this time.
0 commit comments