Skip to content
This repository has been archived by the owner on Dec 15, 2018. It is now read-only.

Add navigation confirmation/blocking API #258

Merged
merged 1 commit into from
Jan 30, 2018
Merged

Conversation

tptee
Copy link
Contributor

@tptee tptee commented Jan 30, 2018

Exposes history's navigation confirmation/blocking API.

@@ -150,6 +149,19 @@ goBack();

// Equivalent to the browser forward button
goForward();

// Creates a function that blocks navigation with window.confirm when returning a string.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only real update to the readme–the rest is just Prettier

@codecov
Copy link

codecov bot commented Jan 30, 2018

Codecov Report

Merging #258 into master will decrease coverage by 0.82%.
The diff coverage is 91.66%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #258      +/-   ##
=========================================
- Coverage   99.43%   98.6%   -0.83%     
=========================================
  Files          28      28              
  Lines         354     359       +5     
=========================================
+ Hits          352     354       +2     
- Misses          2       5       +3
Impacted Files Coverage Δ
src/environment/hapi-router.js 100% <100%> (ø) ⬆️
src/environment/browser-router.js 100% <100%> (ø) ⬆️
src/environment/hash-router.js 100% <100%> (ø) ⬆️
src/types.js 100% <100%> (ø) ⬆️
src/environment/express-router.js 100% <100%> (ø) ⬆️
src/actions.js 100% <100%> (ø) ⬆️
src/middleware.js 86.2% <72.72%> (-9.63%) ⬇️

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 e9c60dd...9b92c10. Read the comment docs.

@tptee
Copy link
Contributor Author

tptee commented Jan 30, 2018

There's not a great way to test the UNBLOCK branch in the middleware switch statement, and the logic is trivial, so I think it's safe to take the coverage hit here.

Copy link
Member

@ryan-roemer ryan-roemer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code style + conventions LGTM.

@tptee tptee merged commit 515ca12 into master Jan 30, 2018
@tptee tptee deleted the feature/confirmation branch January 30, 2018 19:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants