1. 23 Mar, 2016 1 commit
    • Robert Knight's avatar
      Add Visual Studio Code project config file for JS · 444f35c8
      Robert Knight authored
      In combination with JSDoc annotations, this enables IntelliSense,
      project navigation, inline documentation, refactoring and other goodies
      using Visual Studio Code and other IDEs that integrate with TypeScript's
      Language Service for JavaScript (aka.  'Salsa').
      
      See https://code.visualstudio.com/docs/languages/javascript
      
      The project file can be named either `jsconfig.json` without 'allowJs'
      or `tsconfig.json` with the 'allowJs' config option enabled. I've opted
      for `tsconfig.json` because that turns up better documentation on the
      web and is recognized by more tools.
      
      The project config file lives in h/static/scripts so that Visual Studio
      only tries to parse and process .js files under that directory.  The
      config file does support specifying the set of files to include, but
      each file currently has to be listed individually. Glob support is
      planned for the future. See
      https://github.com/Microsoft/TypeScript/issues/1927
      444f35c8
  2. 22 Mar, 2016 6 commits
  3. 21 Mar, 2016 15 commits
  4. 19 Mar, 2016 2 commits
    • Robert Knight's avatar
      Ensure cursor is positioned after block prefix when creating lists · 1f8ac8a9
      Robert Knight authored
      Improve behavior when the user clicks the toolbar buttons to create a
      list or quote and the cursor is positioned at the start of the line with
      no selection. In this case, after the command is applied, the cursor
      should be positioned ready for the user to start typing the quote or
      list.
      
      When the selection is empty and text is inserted at the cursor position,
      it is ambiguous whether the selection is 'before' or 'after' the
      replaced text. The fix here is to treat the selection as being 'before'
      the replaced text.
      
      Fixes #3091
      1f8ac8a9
    • Robert Knight's avatar
      c293c687
  5. 18 Mar, 2016 4 commits
  6. 16 Mar, 2016 6 commits
    • Nick Stenning's avatar
      Merge pull request #3085 from hypothesis/open-sidebar-when-annot-fragment-present · e32aa63c
      Nick Stenning authored
      (1/3) Open sidebar and set selection when '#annotations' URL fragment is present
      e32aa63c
    • Robert Knight's avatar
      Initialize the selected annotations from app settings · 7f69532e
      Robert Knight authored
      When the sidebar loads in a page with a '#annotations'
      URL fragment, the 'annotations' setting will be
      passed through to the client as `settings.annotations`.
      
      Use this to initialize the selection so that
      the annotation specified by '#annotations:<ID>' is
      selected when the client loads.
      7f69532e
    • Robert Knight's avatar
      Open the sidebar on load in response to annotations fragment · 11eb5fa2
      Robert Knight authored
      If the host page's URL contains a '#annotations:' fragment,
      open the sidebar automatically when the client loads.
      
       * Move code for reading Hypothesis configuration from
         the environment into config.js and add tests
      
       * Read the '#annotations' fragment from the URL and
         pass it to app.html along with any other options
         as query string parameters.
      11eb5fa2
    • Nick Stenning's avatar
      Merge pull request #3094 from hypothesis/postgres-storage-expand_uri · 76478213
      Nick Stenning authored
      Postgres read support for storage.expand_uri
      76478213
    • Nick Stenning's avatar
      Merge pull request #3097 from hypothesis/291-detect-existing-h-client · d7063ecb
      Nick Stenning authored
      Enable Chrome extension to detect when H is already present on page
      d7063ecb
    • Robert Knight's avatar
      Enable Chrome extension to detect when H is already present on page · 1bfb930a
      Robert Knight authored
      This reworks the way that Hypothesis detects whether it is
      already present on the page in embed.js, in a way that
      enables it to report back the app.html URL for the
      existing instance to the Chrome extension.
      
      The Chrome extension can then update its state for that
      tab to reflect the fact that it is not injected.
      
      In this PR, that is done by simply setting the tab state
      to inactive. We could in future add an indicator that
      the user tried to activate H but that another instance
      is already active, or have the extension override the
      instance of H on the page.
      
       * Detect the <link> element added to the page by embed.js,
         rather than window.annotator. This enables detection to work
         when embed.js is run in an isolated world that shares the DOM
         but not the JS environment, as is the case for content scripts
         in Chrome and Firefox.
      
       * Change unloading to operate by firing an event at the <link>
         element. This enables a content script to trigger unloading
         of H from an isolated JS environment.
      
       * Change injection of embed.js in the Chrome extension to
         execute embed.js as a content script, rather than by
         adding it as a `<script>` tag. This enables embed.js to
         access extension APIs and also report its result back
         to the extension via the return value of the script.
      
         A side benefit is that it also avoids a bug in Firefox
         current WebExtensions implementation where `<script>` tags
         added to the page by a content script are not executed.
      1bfb930a
  7. 15 Mar, 2016 3 commits
    • Nick Stenning's avatar
      Merge pull request #3084 from hypothesis/simplify-client-auth · 229616ce
      Nick Stenning authored
      Simplify API authentication in the client and fix #3083, #2924
      229616ce
    • Nick Stenning's avatar
      Merge pull request #3078 from... · 9f1eb5ef
      Nick Stenning authored
      Merge pull request #3078 from hypothesis/sheetaluk/281-update-the-toolbar-s-note-icon-tooltip-and-update-the-adder-design
      
      changing adder icons and note icon in toolbar.
      9f1eb5ef
    • Sheetal Umesh Kumar's avatar
      changing adder icons and note icon in toolbar. · 0717221f
      Sheetal Umesh Kumar authored
      Addressing some PR comments.
      
      Changed styling of the adder a bit.
      Changed annotatoin icon click on the toolbar to create a new annotation instead of a new page note, when text has been selected.
      Added a for attr for icon labels in the adder.
      
      getting scripts/update-icon-font from branch: annotation-card-design-refresh
      
      comitting new woff and icomoon css
      
      showing adder in the middle top of selection rather than mousePosition.
      
      Revert "showing adder in the middle top of selection rather than mousePosition."
      
      This reverts commit 99491e42eb4103953f0cfa87afdd37e5ac8ece4d.
      
      showing adder a little above the mouse position
      
      check for end of text selection after current event loop tick
      
      only show tooltip for toolbar and not adder
      
      cursor pointer for adder labels
      
      some styling
      
      cleaning up css nesting.
      
      more styling :/
      
      Eliminate deadzone in adder buttons
      
       * Remove the margin between the adder buttons and the
         edge of the toolbar, and apply padding to the buttons instead.
         This removes the deadzone between the edge of the visible toolbar
         and the clickable area.
      
       * Add pointer cursor for the buttons
      
       * Use flexbox for laying out the toolbar for consistency
         with how the Adder is laid out
      
       * Use a transparent background for the individual buttons, so
         that their background does not obscure the rounded borders
         of the toolbar.
      
      removing console.log
      0717221f
  8. 14 Mar, 2016 2 commits
  9. 11 Mar, 2016 1 commit