Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also orlearn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also.Learn more about diff comparisons here.
base repository:github/quote-selection
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base:0e96937
Choose a base ref
Loading
...
head repository:github/quote-selection
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare:e2dba07
Choose a head ref
Loading
  • 18commits
  • 3files changed
  • 2contributors

Commits on Nov 2, 2021

  1. introducegetSelection(): SelectionContext

    This DRYs up functionality, pulling some of the complexity out of othermethods.Co-authored-by: Kate Higa <khiga8@github.com>
    @keithamus@khiga8
    keithamus andkhiga8 committedNov 2, 2021
    Configuration menu
    Copy the full SHA
    25c32feView commit details
    Browse the repository at this point in the history
  2. Got rid of quoteShortcut and replaced with quote

    This simplifies tests: testing less for side-effects.Co-authored-by: Kate Higa <khiga8@github.com>
    @keithamus@khiga8
    keithamus andkhiga8 committedNov 2, 2021
    Configuration menu
    Copy the full SHA
    6c38592View commit details
    Browse the repository at this point in the history
  3. Remove keyboard event listener,quoteSelection method.

    BREAKING CHANGEThe code for handling eventlistening is very trivial, and might vary perconsumer of this library. It is not core functionality, and should beleft to upstream to setup.Removing this reduces the API surface area and complexity from this libraryas it doesn't need to concern itself with event management and keyboardshortcuts.Co-authored-by: Keith Cirkel <keithamus@users.noreply.github.com>
    @khiga8@keithamus
    khiga8 andkeithamus committedNov 2, 2021
    Configuration menu
    Copy the full SHA
    ed4f54dView commit details
    Browse the repository at this point in the history
  4. RemoveonCopy functionality.

    BREAKING CHANGEThis was never used upstream, so we want to remove this in the interestof simplicity.Co-authored-by: Kate Higa <khiga8@github.com>
    @keithamus@khiga8
    keithamus andkhiga8 committedNov 2, 2021
    Configuration menu
    Copy the full SHA
    efc4c14View commit details
    Browse the repository at this point in the history
  5. Removed signal and AbortController

    Without any event listeners (onCopy and keydown have been removedprior) AbortController is effectively dead code and can be removed.Co-authored-by: Keith Cirkel <keithamus@users.noreply.github.com>
    @khiga8@keithamus
    khiga8 andkeithamus committedNov 2, 2021
    Configuration menu
    Copy the full SHA
    db6447dView commit details
    Browse the repository at this point in the history
  6. Replace WeakMap with WeakSet

    Now that all functions can be used independently of `install()`, andoptions can be passed into those methods, it makes little sense to havethem in `install()`, and so it can be simplified to just providing thefunctionality of collecting containers.Co-authored-by: Keith Cirkel <keithamus@users.noreply.github.com>
    @khiga8@keithamus
    khiga8 andkeithamus committedNov 2, 2021
    Configuration menu
    Copy the full SHA
    d5b674aView commit details
    Browse the repository at this point in the history
  7. Removeinstall(), convertcontainer tocontainerSelector

    BREAKING CHANGE`install(container)` was side-effectful behavior which determined wherequote containers would be. A better design for this is to have functionsrequire a `containerSelector` to query against. This does the same thingbut is slightly more idiomatic.Co-authored-by: Keith Cirkel <keithamus@users.noreply.github.com>
    @keithamus
    keithamus committedNov 2, 2021
    Configuration menu
    Copy the full SHA
    765864dView commit details
    Browse the repository at this point in the history
  8. Remove uselessunwrap boolean

    This boolean was useful for onCopy but is no longer useful.Co-authored-by: Keith Cirkel <keithamus@users.noreply.github.com>
    @khiga8@keithamus
    khiga8 andkeithamus committedNov 2, 2021
    Configuration menu
    Copy the full SHA
    ab12699View commit details
    Browse the repository at this point in the history
  9. Remove quote-selection event

    This was only used to intercept quote behaviour, and doesn't really addany value as whatever used to listen to this can simply do the samebehaviour after `quote()` has been called.Co-authored-by: Keith Cirkel <keithamus@users.noreply.github.com>
    @khiga8@keithamus
    khiga8 andkeithamus committedNov 2, 2021
    Configuration menu
    Copy the full SHA
    c8eaba8View commit details
    Browse the repository at this point in the history
  10. Remove quote method, export extractQuote/insertQuote

    `quote` really does very little, it effectively calls `extractQuote()`followed by `insertQuote()`. Both can be exported functions and couldbe used instead, providing more flexibility.Co-authored-by: Keith Cirkel <keithamus@users.noreply.github.com>
    @keithamus
    keithamus committedNov 2, 2021
    Configuration menu
    Copy the full SHA
    5e36fa5View commit details
    Browse the repository at this point in the history
  11. RemovegetSelectionContext() argument, addquoteElement.

    We can remove `getSelectionContext` entirely, by inlining it into the`extractQuote` body, however it was useful to pass in a custom selectioncontext for the use case of selecting the contents of an element.By introducing `quoteElement` as an option we can supply the single usecase for creating custom `SelectionContext`s, which also can replacesome code we have upstream.
    @keithamus
    keithamus committedNov 2, 2021
    Configuration menu
    Copy the full SHA
    a1e818fView commit details
    Browse the repository at this point in the history
  12. Changed extractQuote to requirecontainerSelector.

    BREAKING CHANGE`extractQuote` would be guaranteed to return `undefined` if`containerSelector` was not provided as an option, which means it is notoptional, and so should be an argument proper, as opposed to somethingin an options bag. This changes extractQuote to do just that.Co-authored-by: Kate Higa <khiga8@github.com>
    @keithamus@khiga8
    keithamus andkhiga8 committedNov 2, 2021
    Configuration menu
    Copy the full SHA
    70ae939View commit details
    Browse the repository at this point in the history
  13. RenamefocusNode tostartContainer

    The initial code created the `focusNode` const which was a differentname to the property it was retrieving: `startContainer`. Thissimplifies the code by making it more readable: less inventive namesprovides clearer intent as to the data manipulation that is happening.Co-authored-by: Kate Higa <khiga8@github.com>
    @keithamus@khiga8
    keithamus andkhiga8 committedNov 2, 2021
    Configuration menu
    Copy the full SHA
    af48805View commit details
    Browse the repository at this point in the history
  14. SplitextractQuote intoextractQuote andasMarkdown.

    The `quoteMarkdown` option of `extractQuote` was a "mode" -significantly changing the behaviour of the `extractQuote` function. Assuch it is better to split it out into a separate function which can beinvoked by client code - more explicit than setting an option.Co-authored-by: Keith Cirkel <keithamus@users.noreply.github.com>
    @khiga8@keithamus
    khiga8 andkeithamus committedNov 2, 2021
    Configuration menu
    Copy the full SHA
    759f3efView commit details
    Browse the repository at this point in the history
  15. Drop event dispatch for callback inasMarkdown

    This drastically simplifies the `asMarkdown` function, avoiding theawkward try/catch and throwing on a setTimeout. The callback is also afar more idiomatic pattern for intercepting objects for mutation.Co-authored-by: Keith Cirkel <keithamus@users.noreply.github.com>
    @khiga8@keithamus
    khiga8 andkeithamus committedNov 2, 2021
    Configuration menu
    Copy the full SHA
    42a3444View commit details
    Browse the repository at this point in the history
  16. SimplifyextractQuote options.

    BREAKING CHANGEThis function only ever used the `quoteElement` option, so it issimpler to have this as an optional argument as opposed to having anoptions object passed in.Co-authored-by: Kate Higa <khiga8@github.com>
    @keithamus@khiga8
    keithamus andkhiga8 committedNov 2, 2021
    Configuration menu
    Copy the full SHA
    ad0e6d0View commit details
    Browse the repository at this point in the history

Commits on Nov 3, 2021

  1. RefactoredinsertQuote to take aQuote.

    Introduce `quotedText` to `Quote`.
    @khiga8
    khiga8 committedNov 3, 2021
    Configuration menu
    Copy the full SHA
    41a365bView commit details
    Browse the repository at this point in the history

Commits on Nov 4, 2021

  1. ExportQuote.

    Update `asMarkdown` type to always return `Quote`.
    @khiga8
    khiga8 committedNov 4, 2021
    Configuration menu
    Copy the full SHA
    e2dba07View commit details
    Browse the repository at this point in the history
Loading

[8]ページ先頭

©2009-2025 Movatter.jp