Skip to content

Commit

Permalink
Remove native block inserter tooltip (#35150)
Browse files Browse the repository at this point in the history
We deemed the tooltip an ineffective solution to the block inserter
discovery problem. We removed it to reduce unnecessary complexity in the
code.
  • Loading branch information
dcalhoun authored Oct 5, 2021
1 parent 2d2e51e commit 6a912c5
Showing 1 changed file with 2 additions and 19 deletions.
21 changes: 2 additions & 19 deletions packages/block-editor/src/components/inserter/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,28 +32,16 @@ import { store as blockEditorStore } from '../../store';

const VOICE_OVER_ANNOUNCEMENT_DELAY = 1000;

const defaultRenderToggle = ( {
displayEditorOnboardingTooltip,
onToggle,
disabled,
style,
onLongPress,
} ) => (
const defaultRenderToggle = ( { onToggle, disabled, style, onLongPress } ) => (
<ToolbarButton
title={
displayEditorOnboardingTooltip
? __( 'Tap to add content' )
: __( 'Add block' )
}
title={ __( 'Add block' ) }
icon={
<Icon
icon={ plusCircleFilled }
style={ style }
color={ style.color }
/>
}
showTooltip={ displayEditorOnboardingTooltip }
tooltipPosition="top right"
onClick={ onToggle }
extraProps={ {
hint: __( 'Double tap to add a block' ),
Expand Down Expand Up @@ -227,7 +215,6 @@ export class Inserter extends Component {
*/
renderInserterToggle( { onToggle, isOpen } ) {
const {
displayEditorOnboardingTooltip,
disabled,
renderToggle = defaultRenderToggle,
getStylesFromColorScheme,
Expand Down Expand Up @@ -274,7 +261,6 @@ export class Inserter extends Component {
return (
<>
{ renderToggle( {
displayEditorOnboardingTooltip,
onToggle: onPress,
isOpen,
disabled,
Expand Down Expand Up @@ -410,9 +396,6 @@ export default compose( [

return {
blockTypeImpressions: getBlockEditorSettings().impressions,
displayEditorOnboardingTooltip:
getBlockEditorSettings().editorOnboarding &&
getBlockEditorSettings().firstGutenbergEditorSession,
destinationRootClientId,
insertionIndexDefault: getDefaultInsertionIndex(),
insertionIndexBefore,
Expand Down

0 comments on commit 6a912c5

Please sign in to comment.