Skip to content

Commit

Permalink
Fix long-press gestures not working in RichText component [Android] (
Browse files Browse the repository at this point in the history
…#54213)

* Use different touchable components in RichText based on platform

* Update mobile test snapshots
  • Loading branch information
fluiddot authored Sep 6, 2023
1 parent e7d3ff6 commit a428580
Show file tree
Hide file tree
Showing 4 changed files with 517 additions and 689 deletions.
184 changes: 78 additions & 106 deletions packages/block-library/src/audio/test/__snapshots__/edit.native.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ exports[`Audio block renders audio block error state without crashing 1`] = `
]
}
>
<View
<RCTAztecView
accessibilityState={
{
"busy": undefined,
Expand All @@ -143,73 +143,59 @@ exports[`Audio block renders audio block error state without crashing 1`] = `
"selected": undefined,
}
}
accessibilityValue={
accessible={true}
activeFormats={[]}
blockType={
{
"max": undefined,
"min": undefined,
"now": undefined,
"text": undefined,
"tag": "p",
}
}
accessible={false}
collapsable={false}
deleteEnter={true}
disableEditingMenu={false}
focusable={true}
fontFamily="serif"
fontSize={14}
isMultiline={false}
maxImagesWidth={200}
onBackspace={[Function]}
onBlur={[Function]}
onChange={[Function]}
onClick={[Function]}
onContentSizeChange={[Function]}
onEnter={[Function]}
onFocus={[Function]}
onHTMLContentWithCursor={[Function]}
onKeyDown={[Function]}
onPaste={[Function]}
onResponderGrant={[Function]}
onResponderMove={[Function]}
onResponderRelease={[Function]}
onResponderTerminate={[Function]}
onResponderTerminationRequest={[Function]}
onSelectionChange={[Function]}
onStartShouldSetResponder={[Function]}
>
<RCTAztecView
activeFormats={[]}
blockType={
{
"tag": "p",
}
}
deleteEnter={true}
disableEditingMenu={false}
fontFamily="serif"
fontSize={14}
isMultiline={false}
maxImagesWidth={200}
onBackspace={[Function]}
onBlur={[Function]}
onChange={[Function]}
onContentSizeChange={[Function]}
onEnter={[Function]}
onFocus={[Function]}
onHTMLContentWithCursor={[Function]}
onKeyDown={[Function]}
onPaste={[Function]}
onSelectionChange={[Function]}
placeholder="Add caption"
placeholderTextColor="gray"
selectionColor="black"
style={
{
"backgroundColor": undefined,
"maxWidth": undefined,
"minHeight": 0,
}
placeholder="Add caption"
placeholderTextColor="gray"
selectionColor="black"
style={
{
"backgroundColor": undefined,
"maxWidth": undefined,
"minHeight": 0,
}
text={
{
"eventCount": undefined,
"linkTextColor": undefined,
"selection": null,
"tag": "p",
"text": "",
}
}
text={
{
"eventCount": undefined,
"linkTextColor": undefined,
"selection": null,
"tag": "p",
"text": "",
}
textAlign="center"
triggerKeyCodes={[]}
/>
</View>
}
textAlign="center"
triggerKeyCodes={[]}
/>
</View>
</View>
</View>
Expand Down Expand Up @@ -373,7 +359,7 @@ exports[`Audio block renders audio file without crashing 1`] = `
]
}
>
<View
<RCTAztecView
accessibilityState={
{
"busy": undefined,
Expand All @@ -383,73 +369,59 @@ exports[`Audio block renders audio file without crashing 1`] = `
"selected": undefined,
}
}
accessibilityValue={
accessible={true}
activeFormats={[]}
blockType={
{
"max": undefined,
"min": undefined,
"now": undefined,
"text": undefined,
"tag": "p",
}
}
accessible={false}
collapsable={false}
deleteEnter={true}
disableEditingMenu={false}
focusable={true}
fontFamily="serif"
fontSize={14}
isMultiline={false}
maxImagesWidth={200}
onBackspace={[Function]}
onBlur={[Function]}
onChange={[Function]}
onClick={[Function]}
onContentSizeChange={[Function]}
onEnter={[Function]}
onFocus={[Function]}
onHTMLContentWithCursor={[Function]}
onKeyDown={[Function]}
onPaste={[Function]}
onResponderGrant={[Function]}
onResponderMove={[Function]}
onResponderRelease={[Function]}
onResponderTerminate={[Function]}
onResponderTerminationRequest={[Function]}
onSelectionChange={[Function]}
onStartShouldSetResponder={[Function]}
>
<RCTAztecView
activeFormats={[]}
blockType={
{
"tag": "p",
}
}
deleteEnter={true}
disableEditingMenu={false}
fontFamily="serif"
fontSize={14}
isMultiline={false}
maxImagesWidth={200}
onBackspace={[Function]}
onBlur={[Function]}
onChange={[Function]}
onContentSizeChange={[Function]}
onEnter={[Function]}
onFocus={[Function]}
onHTMLContentWithCursor={[Function]}
onKeyDown={[Function]}
onPaste={[Function]}
onSelectionChange={[Function]}
placeholder="Add caption"
placeholderTextColor="gray"
selectionColor="black"
style={
{
"backgroundColor": undefined,
"maxWidth": undefined,
"minHeight": 0,
}
placeholder="Add caption"
placeholderTextColor="gray"
selectionColor="black"
style={
{
"backgroundColor": undefined,
"maxWidth": undefined,
"minHeight": 0,
}
text={
{
"eventCount": undefined,
"linkTextColor": undefined,
"selection": null,
"tag": "p",
"text": "",
}
}
text={
{
"eventCount": undefined,
"linkTextColor": undefined,
"selection": null,
"tag": "p",
"text": "",
}
textAlign="center"
triggerKeyCodes={[]}
/>
</View>
}
textAlign="center"
triggerKeyCodes={[]}
/>
</View>
</View>
</View>
Expand Down
Loading

0 comments on commit a428580

Please sign in to comment.