Skip to content

Commit

Permalink
Move mobile ImageLinkDestinationsScreen from components package to bl…
Browse files Browse the repository at this point in the history
…ock-editor package (#56775)

* Move mobile ImageLinkDestinationsScreen from components package to block-editor package

* Update react-native-editor CHANGELOG

* Update ImageLinkDestinationsScreen imports
  • Loading branch information
derekblank authored Dec 6, 2023
1 parent 49ac9ca commit e41e973
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 27 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
/**
* WordPress dependencies
*/
import {
InspectorControls,
useMultipleOriginColorsAndGradients,
} from '@wordpress/block-editor';
import {
BottomSheet,
ColorSettings,
FocalPointSettingsPanel,
ImageLinkDestinationsScreen,
LinkPickerScreen,
} from '@wordpress/components';
import { useDispatch, useSelect } from '@wordpress/data';
Expand All @@ -18,6 +13,9 @@ import { useDispatch, useSelect } from '@wordpress/data';
* Internal dependencies
*/
import styles from './container.native.scss';
import InspectorControls from '../inspector-controls';
import ImageLinkDestinationsScreen from '../image-link-destinations';
import useMultipleOriginColorsAndGradients from '../colors-gradients/use-multiple-origin-colors-and-gradients';

export const blockSettingsScreens = {
settings: 'Settings',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,14 @@ import { StyleSheet } from 'react-native';
*/
import { __ } from '@wordpress/i18n';
import { Icon, check, chevronRight } from '@wordpress/icons';
import { blockSettingsScreens } from '@wordpress/block-editor';
import { usePreferredColorSchemeStyle } from '@wordpress/compose';
import { BottomSheet, PanelBody } from '@wordpress/components';

/**
* Internal dependencies
*/
import styles from './style.scss';
import PanelBody from '../../panel/body';
import BottomSheet from '../bottom-sheet';
import styles from './style.native.scss';
import { blockSettingsScreens } from '../block-settings';

const LINK_DESTINATION_NONE = 'none';
const LINK_DESTINATION_MEDIA = 'media';
Expand All @@ -36,6 +35,7 @@ function LinkDestination( {
styles.optionIcon,
styles.optionIconDark
);

return (
<BottomSheet.Cell
icon={ check }
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// used in both light and dark modes
.placeholderTextColor {
color: #87a6bc;
}

.optionIcon {
color: $blue-50;
}

.optionIconDark {
color: $blue-30;
}

.unselectedOptionIcon {
opacity: 0;
}
1 change: 0 additions & 1 deletion packages/components/src/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ export { default as LinkPickerScreen } from './mobile/link-picker/link-picker-sc
export { default as LinkSettings } from './mobile/link-settings';
export { default as LinkSettingsScreen } from './mobile/link-settings/link-settings-screen';
export { default as LinkSettingsNavigation } from './mobile/link-settings/link-settings-navigation';
export { default as ImageLinkDestinationsScreen } from './mobile/link-settings/image-link-destinations-screen';
export { default as SegmentedControl } from './mobile/segmented-control';
export { default as Image, IMAGE_DEFAULT_FOCAL_POINT } from './mobile/image';
export { default as ImageEditingButton } from './mobile/image/image-editing-button';
Expand Down
17 changes: 0 additions & 17 deletions packages/components/src/mobile/link-settings/style.native.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,3 @@
padding-left: 0;
padding-right: 0;
}

// used in both light and dark modes
.placeholderTextColor {
color: #87a6bc;
}

.optionIcon {
color: $blue-50;
}

.optionIconDark {
color: $blue-30;
}

.unselectedOptionIcon {
opacity: 0;
}
1 change: 1 addition & 0 deletions packages/react-native-editor/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ For each user feature we should also add a importance categorization label to i

## Unreleased
- [*] [internal] Move InserterButton from components package to block-editor package [#56494]
- [*] [internal] Move ImageLinkDestinationsScreen from components package to block-editor package [#56775]

## 1.109.2
- [**] Fix issue related to text color format and receiving in rare cases an undefined ref from `RichText` component [#56686]
Expand Down

1 comment on commit e41e973

@github-actions
Copy link

Choose a reason for hiding this comment

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

Flaky tests detected in e41e973.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/7120873958
📝 Reported issues:

Please sign in to comment.