Skip to content

Navigation update + preferences storage (and some minor fixes)

HJ requested to merge navigation-update into develop
  • Navigation menu is now collapsible, you can pin items to it from within it (except lists)
  • Lists now are always expandable, removed unnecessary setting.
  • Lists menu items works the same as timelines - clicking link expands it, added wrench icon to direct to page of lists.
  • pinned items and collapsed state is saved in server-side preferences store
    • server-side preferences store only supports two types of storages - "simple" for storing simple numeric/boolean/string values, and "collections" for storing ordered sets of strings (or numbers). Storing more complex data (i.e. objects) is not supported. Storing duplicates is also not supported.
    • server-side preferences also stores a journal of changes used did and when synchronizing it merges and replays the journal.
      • currently journal trimming is limited, and it can get out of hand easily, maybe later i will implement proper trimming
      • synchronization is currently performed this way:
        • when performing any modification in server-side preferences storages it is uploaded to server, overwriting existing one, and also saved locally in "cache" property which is saved using persisted-storage.
        • getting settings from server is only done at login (or on page refresh) when doing the /verify_credentials endpoint, or when anything updates current user I guess.
  • Navigation menu is now declarative - all items are generated from an array of objects depicting the route, label, icon and criteria of showing.

TODO

  • sync and clear local cache on logout, keep track what user cache belongs to, refuse to merge with other users's cache
  • badges support for chats/friend requests
  • refactor timeline_menu_contents into a more generic component, unifying it, lists_menu_content and root entires in nav menu
  • refactor navbar's header into separate component and use it also in mobile navbar
  • add ability to pin stuff from mobile (how??)
  • make lists pinnanble
  • actually trim the journal properly
  • overhaul list edit UI - use buttons instead of weird background color change, use two columns for searching people, rearrange buttons and limit vertical height
  • add remove/add to list controls to user menu
  • lists are not fetched automatically on mobile
  • implement edit mode to nav panel to hide ugly tacks everywhere all the time
  • overhaul list creation UI just reuse edit one with some conditionals
  • add some padding to the chevron in Lists > menu of user menu
  • maybe add mode where pins are shown in desktop navbar?
Edited by HJ

Merge request reports

Loading