Fossil

Check-in [63c1be8c31]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Swap semantics of the "primary" and "secondary" highlighted entries to improve selection of the default focused entry. The "secondary" corresponds to the "To:" entry on /vdiff pages and hance is the last focused entry, so should also be the default when returning to /timeline both by keyboard shortcut or the browser "backwards" command. Thanks @rouilj for spotting this!
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | timeline-keyboard-navigation
Files: files | file ages | folders
SHA3-256: 63c1be8c316702c6e288962c173f7d47e50cdf4e65315273f55d36a57279dee0
User & Date: florian 2022-08-11 06:12:00.000
Context
2022-08-11
06:17
Mention in the help text that ticking the second entry node opens the diff page. Again, thanks @rouilj! ... (check-in: 13e0f32e3b user: florian tags: timeline-keyboard-navigation)
06:12
Swap semantics of the "primary" and "secondary" highlighted entries to improve selection of the default focused entry. The "secondary" corresponds to the "To:" entry on /vdiff pages and hance is the last focused entry, so should also be the default when returning to /timeline both by keyboard shortcut or the browser "backwards" command. Thanks @rouilj for spotting this! ... (check-in: 63c1be8c31 user: florian tags: timeline-keyboard-navigation)
05:57
Shortcut "." (period) to set focus to the entry closest to the center of the viewport. (The keys need to be reassigned later, since non-letter keys don't produce the same characters with or without SHIFT pressed on all keyboard layouts.) Thanks @rouilj for the suggestion and the hint! ... (check-in: e1796f2df2 user: florian tags: timeline-keyboard-navigation)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/graph.js.
839
840
841
842
843
844
845





846
847

848
849
850
851
852
853
854
855
856
857
858
859

860
861
862
863
864
865
866
**    in order to be able to construct /file URLs, the information provided by
**    the timeline-data-N blocks would have to be extended).
**  o kFRST, kLAST: check if the previous/next page should be opened if focus is
**    already at the top/bottom.
*/
(function(){
  window.addEventListener('load',function(){





    function focusDefaultId(){
      var tn = document.querySelector(

                '.timelineSelected:not(.timelineSecondary) .tl-nodemark')
                || document.querySelector('.timelineSelected .tl-nodemark')
                || document.querySelector('.timelineCurrent .tl-nodemark');
      return tn ? tn.id : 'm1';
    }
    function focusSelectedId(){
      var tn = document.querySelector(
                '.timelineSelected:not(.timelineSecondary) .tl-nodemark');
      return tn ? tn.id : null;
    }
    function focus2ndSelectedId(){
      var tn = document.querySelector('.timelineSecondary .tl-nodemark');

      return tn ? tn.id : null;
    }
    function focusCurrentId(){
      var tn = document.querySelector('.timelineCurrent .tl-nodemark');
      return tn ? tn.id : null;
    }
    function focusTickedId(){







>
>
>
>
>

|
>
|
<




|
<



|
>







839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854

855
856
857
858
859

860
861
862
863
864
865
866
867
868
869
870
871
**    in order to be able to construct /file URLs, the information provided by
**    the timeline-data-N blocks would have to be extended).
**  o kFRST, kLAST: check if the previous/next page should be opened if focus is
**    already at the top/bottom.
*/
(function(){
  window.addEventListener('load',function(){
// "Primary" (1) and "secondary" (2) selections swapped compared to CSS classes:
// (1)  .timelineSecondary →
//          /vdiff?to=, /timeline?sel2=
// (2)  .timelineSelected:not(.timelineSecondary) →
//          /vdiff?from=, /timeline?c=, /timeline?sel1=
    function focusDefaultId(){
      var tn = document.querySelector('.timelineSecondary .tl-nodemark')
                || document.querySelector(
                    '.timelineSelected:not(.timelineSecondary) .tl-nodemark')

                || document.querySelector('.timelineCurrent .tl-nodemark');
      return tn ? tn.id : 'm1';
    }
    function focusSelectedId(){
      var tn = document.querySelector('.timelineSecondary .tl-nodemark');

      return tn ? tn.id : null;
    }
    function focus2ndSelectedId(){
      var tn = document.querySelector(
                '.timelineSelected:not(.timelineSecondary) .tl-nodemark');
      return tn ? tn.id : null;
    }
    function focusCurrentId(){
      var tn = document.querySelector('.timelineCurrent .tl-nodemark');
      return tn ? tn.id : null;
    }
    function focusTickedId(){