1. 09 Mar, 2016 1 commit
    • Robert Knight's avatar
      Add a utility script to assist with CoffeeScript -> JS conversion · c0a2709b
      Robert Knight authored
      It accepts a list of CoffeeScript file paths on stdin
      and for each <path>.coffee file in the input, it writes
      a <path>.js output file containing the converted,
      reformatted source.
      
      The result is ES2015 source so will require some
      fixups as long as we're using ES5 in the main app
      codebase.
      
      The current transformation process involves:
      
       1. Performing an initial CoffeeScript -> JS
          conversion with 'decaffeinate'
      
       2. Applying some fixups for common issues, currently
          done with dumb string modifications.
      
          In future I might look at writing a Babel transformer.
      
       3. Parsing the source with Babylon to check that it is valid ES2015
          If not, the user is prompted to go and simplify the CoffeeScript
          so that decaffeinate can process it correctly.
      
       4. Reformatting the source with typescript-formatter, which
          takes care of indentation and high-level formatting.
      
       5. Running the source through JSCS' fix mode which deals
          with smaller details.
      c0a2709b
  2. 08 Mar, 2016 2 commits
  3. 07 Mar, 2016 5 commits
  4. 05 Mar, 2016 2 commits
  5. 04 Mar, 2016 8 commits
  6. 03 Mar, 2016 2 commits
  7. 02 Mar, 2016 2 commits
    • Robert Knight's avatar
      Use Element.scrollIntoView() to scroll new annotations into view · dbbeadf8
      Robert Knight authored
      The previous method of scrolling a newly created annotation
      into view in the sidebar resulted in the input field for
      the new annotation losing focus.
      
      Note that only top level annotations have an 'id'
      attribute set on the corresponding HTML element.
      It might make sense to change this in future although
      it would add an extra binding. For now I've just noted this.
      dbbeadf8
    • Robert Knight's avatar
      Focus annotation editor when a new annotation is created · ec0e0f9f
      Robert Knight authored
      When a new annotation card was added, the sidebar tried
      to focus it but this failed because the sidebar iframe
      itself did not have focus.
      
      When a new annotation is created, first focus the sidebar
      in the Annotator host and then let the sidebar focus the
      input field.
      
       * Remove unnecessary use of the $timeout service which
         triggers a root scope digest.
      ec0e0f9f
  8. 01 Mar, 2016 8 commits
  9. 29 Feb, 2016 6 commits
  10. 26 Feb, 2016 4 commits