• Robert Knight's avatar
    Extract `quote` function from annotation / view-filter · d4374884
    Robert Knight authored
    Both `components/annotation` and `view-filter` modules had logic and
    tests for extracting a quote from an annotation object. Extract these
    into a shared `quote` function in `util/annotation-metadata`.
    
    One small change is that `view-filter`'s implementation allowed
    annotation objects with _no_ `target` property. These should never
    occur. There is a known issue where creating a Page Note results in an
    annotation with an _empty_ `target` property until the annotation is
    saved (see [1]). That case, which is still handled, looks like a mistake,
    but resolving it is outside the scope of this change.
    
    [1] https://github.com/hypothesis/client/issues/1290
    d4374884
Name
Last commit
Last update
..
account-id-test.js Loading commit data...
annotation-metadata-test.js Loading commit data...
copy-to-clipboard-test.js Loading commit data...
disable-opener-for-external-links-test.js Loading commit data...
dom-test.js Loading commit data...
fake-window.js Loading commit data...
fetch-config-test.js Loading commit data...
group-list-item-common-test.js Loading commit data...
group-organizations-test.js Loading commit data...
groups-test.js Loading commit data...
is-sidebar-test.js Loading commit data...
is-third-party-service-test.js Loading commit data...
memoize-test.js Loading commit data...
oauth-client-test.js Loading commit data...
observe-element-size-test.js Loading commit data...
postmessage-json-rpc-test.js Loading commit data...
random-test.js Loading commit data...
retry-test.js Loading commit data...
scope-timeout-test.js Loading commit data...
sentry-test.js Loading commit data...
service-context-test.js Loading commit data...
session-util-test.js Loading commit data...
state-util-test.js Loading commit data...
tabs-test.js Loading commit data...
theme-test.js Loading commit data...
time-test.js Loading commit data...
url-util-test.js Loading commit data...
version-data-test.js Loading commit data...
wrap-react-component-test.js Loading commit data...