• Sheetal Umesh Kumar's avatar
    Separate anchored and unanchored annotations into tabs. · 054cb186
    Sheetal Umesh Kumar authored
    Default to the annotations tab when user switches between groups, clears a selection or reloads a page.
    The ANNOTATIONS_SYNCED event is emitted when annotations for a document have finished anchoring. Because annotations are not marked as orphans until they fail to anchor, select the annotations tab after they have finished anchoring.
    
    Test cases:
    -------------
    1. On page load localhost:3000
       annotations tab is selected.
       clicking on new note switches to the notes tab with a new draft created.
       switching between tabs maintains tab selection, if notes or annotations.
       when tab selected is orphans, changing groups defaults to the annotations tab.
    2. On page load localhost:3000/#annotations:<id>
       clicking on new page note should select the notes tab.
       When an annotation/note is selected, the tab selection carries between group changes.
       all tests listed in #1 above should apply.
    3. On page load  localhost:3000/#annotations:<orphan_id>
       clicking on “show all annotations and notes” selects the annotations tab and displays all annotations.
       all tests listed in #1 and #2 above should apply.
       switching between groups selects the annotations tab by default
    
    https://trello.com/c/1NVK2jwv/400-add-a-tab-for-unanchored-annotations
    https://trello.com/c/OLdLTlLT/342-separate-annotations-and-notes
    
    Hide orphans tab behind orphans_tab flag.
    
    Fix bug where notes tab isn't selected when user attempts to create a new page note.
    054cb186
root-thread-test.js 10.2 KB