Skip to content
  • Andrew Danger Lyon's avatar
    rewrite begins. · 3a2076df
    Andrew Danger Lyon authored
    yes, it's almost always stupid to do a rewrite, but the app has changed
    so much over the years (web app -> FF ext -> FF & chrome ext -> desktop
    app -> mobile) that it has acquired enough debt and bad decisions and
    cemented data models and terrible UI choices that a fresh start (using
    as much as the old code as possible) is starting to make more sense.
    
    i'm finding it's taking more time to update the old code than just
    rewrite massive parts of it.
    
    here's a list of things that a rewrite will provide:
    
    - turtl will be available offline and only syncs data if a server
      connection exists
    - each client will have a unique ID, and this ID will be included in
      each ID of each piece of data this client creates. this allows us to
      create unique IDs locally without the need for server approval, which
      simplifies a lot of syncing logic
    - all crypto is async and run in web worker pool
    - all crypto happens using explicit (de)serialize functions instead of
      composer's toJSON, which will save a lot of pain
    - notes can exist in 0 or more boards (and there will be an "All notes"
      hardcoded board in the interface)
    - adding concept of organizations (ie superboards)
    - make use of composer's newest features (ListController and with_bind,
      mainly)
    - new sync system, relies on eventing instead of IDB queries (which was
      required for Firefox ext back in the long-long ago), and also supports
      posting bulk changes to API (greatly simplifies syncing code)
    - all templating will be handlebars (although starting to hate hbs...)
    - all CSS will be LESS
    
    also, cleaning up ol libraries that are unused. mathjax was working
    fine, but not sure if anyone besides the one person who requested it
    uses it, and the entire library is so burly it hardly seems worth it (at
    least for now, it can always be added in later).
    
    updating to latest Moo core/more, but taking a hatchet to it (not a
    sclpell LOLOLpolitics). replacing Request with new lib, Sexhr, that
    supports Xhr2 (hand-rolled, but might open-source).
    
    also included in this commit are some other changes:
    
    - wrapping layout in container, makes doing modal/sidebar stuff a lot
      easier
    - fixing display bugs with modal (sidebar untested so far)
    - lots of updates to (now bare, with a few exceptions) models to just
      get things running
    - lots of changes to syncing system to get it partially to where it
      needs to be (sans cruft from the past)
    - updated scripts for index generation
    3a2076df