-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
[RNMobile] Add autosave to mobile apps #17329
Merged
daniloercoli
merged 18 commits into
rnmobile/master
from
rnmobile/add-autosave-to-mobile
Sep 19, 2019
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
8546c4a
[RNMobile] Fix crash when adding separator
mchowning 1ca5e2b
Build: remove global install of latest npm since we want to use the p…
gwwar ef3f290
[RNMobile] Try dark mode (iOS) (#17067)
etoledom 32e80ea
RNMobile: Fix crash when viewing HTML on iOS
mchowning 316396c
[RNMobile] Remove toolbar from html view
mchowning a7bb5b3
[RNMobile] Fix MaxListenersExceededWarning caused by dark-mode event …
etoledom fe4c02f
Fix focus title on new posts regression (#17180)
etoledom bf84833
BottomSheet: Setting DashIcon color directly when theme is default (l…
etoledom f210ff5
Add a preliminary version of the AutosaveMonitor for mobile that call…
daniloercoli c6dd15c
Add autosave mock function for tests
daniloercoli 5e0bc0c
Merge branch 'rnmobile/master' of https://github.com/WordPress/gutenb…
daniloercoli d68a430
Fix merge conflicts
daniloercoli e2e8a0c
Fix lint
daniloercoli 9c82ea0
Re-add autosave on mobile that was removed erroneously during import-…
daniloercoli 27f6f80
Remove native variant of AutosaveMonitor and introduces changes at e…
daniloercoli 09f1907
Default to false for `isEditedPostAutosaveable` on mobile. There was …
daniloercoli 62e106e
Make sure to consider edits to the Title when checking if auto-save i…
daniloercoli 5e763e9
Fix lint
daniloercoli File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
/** | ||
* External dependencies | ||
*/ | ||
import RNReactNativeGutenbergBridge from 'react-native-gutenberg-bridge'; | ||
|
||
export * from './actions.js'; | ||
|
||
|
@@ -14,3 +18,12 @@ export function togglePostTitleSelection( isSelected = true ) { | |
isSelected, | ||
}; | ||
} | ||
|
||
/** | ||
* Action generator used in signalling that the post should autosave. | ||
* | ||
* @param {Object?} options Extra flags to identify the autosave. | ||
*/ | ||
export function* autosave( ) { | ||
RNReactNativeGutenbergBridge.editorDidAutosave(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that's better indeed 👍 |
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,10 @@ import { | |
editorSettings, | ||
} from './reducer.js'; | ||
|
||
import { EDITOR_SETTINGS_DEFAULTS } from './defaults.js'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should probably make our own |
||
|
||
EDITOR_SETTINGS_DEFAULTS.autosaveInterval = 2; // This is a way to override default on mobile | ||
|
||
export * from './reducer.js'; | ||
|
||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
super minor, but there's an extra space here