Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
ac7c363
Resyncs RichText mobile components with web counterparts.
SergioEstevao Oct 11, 2019
679f006
Remove outdated test.
SergioEstevao Oct 11, 2019
f52937c
Remove unused references.
SergioEstevao Oct 11, 2019
fe59886
Merge branch 'master' into rnmobile/rich_text_sync
SergioEstevao Oct 11, 2019
289bdb8
Add platform component
SergioEstevao Oct 22, 2019
f269ea5
Add components depending of platform.
SergioEstevao Oct 22, 2019
1fda754
Abstract paste of files for RN and web
SergioEstevao Oct 22, 2019
2491bee
Compose extra attributes/props on select/dispatch only if mobile.
SergioEstevao Oct 22, 2019
14a37cf
Remove RN index file for RichText Wrapper.
SergioEstevao Oct 22, 2019
b2ec21f
Remove API index native file that is no longer needed.
SergioEstevao Oct 24, 2019
ca1d308
Clean up lint errors in file-paste-handler.
SergioEstevao Oct 24, 2019
cd86c9c
Fix lint errors.
SergioEstevao Oct 24, 2019
f3f71d4
Implement stub remove browser shortcuts for RN
SergioEstevao Oct 24, 2019
51dec2a
Implement autocomplete stub for RN.
SergioEstevao Oct 24, 2019
d8e7807
Refactor toolbar presentation to a method.
SergioEstevao Oct 24, 2019
c5167db
Merge remote-tracking branch 'origin/master' into rnmobile/rich_text_…
SergioEstevao Oct 24, 2019
53194ff
Remove no longer needed platform file.
SergioEstevao Oct 24, 2019
d03b619
Consolidate the file paste handler in a single implementation.
SergioEstevao Oct 25, 2019
8fd2d6c
Change the text for platform to make it explicit it's native only.
SergioEstevao Oct 25, 2019
118d228
Remove duplicate files
ellatrix Oct 25, 2019
540ccd7
Include type in file comparison
ellatrix Oct 25, 2019
fdaaff0
Forgot to rename for native file
ellatrix Oct 25, 2019
fa4c573
Fix filePasteHandler for native
ellatrix Oct 25, 2019
07747d6
Move logging back
ellatrix Oct 25, 2019
9692574
Restore comment on logging
ellatrix Oct 25, 2019
345e655
Add check for files existence.
SergioEstevao Oct 25, 2019
cc9dab1
Refactor format-toolbar code to use split web/native files
SergioEstevao Oct 25, 2019
1b72134
Remove prop duplication.
SergioEstevao Oct 25, 2019
28ef938
Fix getAnchorRect call
SergioEstevao Oct 25, 2019
ce481aa
Remove unnecessary const
SergioEstevao Oct 26, 2019
014c931
Merge branch 'master' into rnmobile/rich_text_sync
SergioEstevao Oct 26, 2019
2cc0087
Sync fix for list removal of first empty line
SergioEstevao Oct 26, 2019
cf5ee3a
Fix RN build after merge with master
SergioEstevao Oct 26, 2019
b31067c
Sync with web counterpart.
SergioEstevao Oct 26, 2019
b5b433c
Only change selection after new formats are set.
SergioEstevao Oct 29, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge remote-tracking branch 'origin/master' into rnmobile/rich_text_…
…sync

# Conflicts:
#	packages/element/src/index.js
#	packages/element/src/platform.js
  • Loading branch information
SergioEstevao committed Oct 24, 2019
commit c5167dbe3b7747b8afaeca222df2f608e3c6678b
2 changes: 1 addition & 1 deletion packages/element/src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export * from './react';
export * from './react-platform';
export * from './utils';
export { default as Platform } from './platform';
export { default as Platform } from './platform';
export { default as renderToString } from './serialize';
export { default as RawHTML } from './raw-html';
29 changes: 26 additions & 3 deletions packages/element/src/platform.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,32 @@
/**
* Parts of this source were derived and modified from react-native-web,
* released under the MIT license.
*
* Copyright (c) 2016-present, Nicolas Gallagher.
* Copyright (c) 2015-present, Facebook, Inc.
*
*/
const Platform = {
OS: 'web',
select: ( obj ) => ( 'web' in obj ? obj.web : obj.default ),
select: ( spec ) => ( 'web' in spec ? spec.web : spec.default ),
};
/**
* Component used to detect the current Platform being used. Use Platform.OS === 'web' to detect if running on web enviroment.
* This is the same concept as the React-Native implementation found here: https://facebook.github.io/react-native/docs/platform-specific-code#platform-module
* Component used to detect the current Platform being used.
* Use Platform.OS === 'web' to detect if running on web enviroment.
*
* This is the same concept as the React Native implementation.
*
* @see https://facebook.github.io/react-native/docs/platform-specific-code#platform-module
*
* Here is an example of how to use the select method:
* @example
* ```js
* import { Platform } from '@wordpress/element';
*
* const placeholderLabel = Platform.select( {
* native: __( 'Add media' ),
* web: __( 'Drag images, upload new ones or select files from your library.' ),
* } );
* ```
*/
export default Platform;
You are viewing a condensed version of this merge commit. You can view the full changes here.