Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor slate-hotkeys, fix deleting at start of block #2048

Merged
merged 1 commit into from Aug 7, 2018

Conversation

ianstormtaylor
Copy link
Owner

Is this adding or improving a feature or fixing a bug?

Bug & debt.

What's the new behavior?

Refactor's the slate-hotkeys package to make it easier to reason about, and fix an issue that was present in the delete hotkeys on macs.

How does this change work?

Use a simpler map of hotkeys instead of writing functions inline. This is possible thanks to the new version of is-hotkey with optional hotkeys and multiple hotkeys features.

Have you checked that...?

  • The new code matches the existing patterns and styles.
  • The tests pass with yarn test.
  • The linter passes with yarn lint. (Fix errors with yarn prettier.)
  • The relevant examples still work. (Run examples with yarn watch.)

Does this fix any issues or need any specific reviewers?

Fixes: #1887
Fixes: #1888
Fixes: #1983

@codecov
Copy link

codecov bot commented Aug 7, 2018

Codecov Report

Merging #2048 into master will decrease coverage by 0.12%.
The diff coverage is 54.83%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2048      +/-   ##
==========================================
- Coverage   67.06%   66.94%   -0.13%     
==========================================
  Files          68       68              
  Lines        5660     5624      -36     
==========================================
- Hits         3796     3765      -31     
+ Misses       1864     1859       -5
Impacted Files Coverage Δ
packages/slate-react/src/plugins/after.js 5.98% <0%> (ø) ⬆️
packages/slate-react/src/plugins/before.js 11.7% <0%> (ø) ⬆️
packages/slate-hotkeys/src/index.js 80.95% <80.95%> (-3.26%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3eabdea...8abdd6c. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Select All, Backspace doesn't work ctrl+backspace throws an error at line start
1 participant