Skip to content

Commit 46818b0

Browse files
committed
Merge branch 'main' into @BartoszGrajdek/web-parser-refactor-code-blocks
2 parents e2c2993 + d7548cd commit 46818b0

12 files changed

+410
-405
lines changed

README.md

+12-11
Original file line numberDiff line numberDiff line change
@@ -179,17 +179,18 @@ Currently, `react-native-live-markdown` supports only [ExpensiMark](https://gith
179179

180180
## Compatibility
181181

182-
`react-native-live-markdown` supports two latest React Native minor releases with the New Architecture enabled.
183-
184-
| react-native | @expensify/react-native-live-markdown |
185-
| :----------: | :-----------------------------------: |
186-
| 0.79 | 0.1.260+ |
187-
| 0.78 | 0.1.260+ |
188-
| 0.77 | 0.1.235+ |
189-
| 0.76 | 0.1.141+ |
190-
| 0.75 | 0.1.129+ |
191-
| 0.74 | 0.1.122 – 0.1.128 |
192-
| 0.73 | 0.1.15 – 0.1.121 |
182+
`react-native-live-markdown` supports only latest React Native minor releases with the New Architecture enabled.
183+
184+
| @expensify/react-native-live-markdown | 0.73 | 0.74 | 0.75 | 0.76 | 0.77 | 0.78 | 0.79 |
185+
| :-----------------------------------: | :--: | :--: | :--: | :--: | :--: | :--: | :--: |
186+
| 0.1.260+ ||||||||
187+
| 0.1.256 – 0.1.259 ||||||||
188+
| 0.1.248 – 0.1.255 ||||||||
189+
| 0.1.235 – 0.1.247 ||||||||
190+
| 0.1.141 – 0.1.234 ||||||||
191+
| 0.1.129 – 0.1.140 ||||||||
192+
| 0.1.122 – 0.1.128 ||||||||
193+
| 0.1.15 – 0.1.121 ||||||||
193194

194195
## License
195196

WebExample/__tests__/input.spec.ts

+2-4
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,17 @@ test.describe('typing', () => {
1212
const inputLocator = await setupInput(page, 'clear');
1313

1414
await inputLocator.focus();
15-
await inputLocator.pressSequentially(TEST_CONST.EXAMPLE_CONTENT, {delay: TEST_CONST.USER_TYPING_DELAY});
15+
await inputLocator.pressSequentially(TEST_CONST.EXAMPLE_CONTENT);
1616

1717
expect(await getElementValue(inputLocator)).toEqual(TEST_CONST.EXAMPLE_CONTENT);
1818
});
1919

2020
test('fast type cursor position', async ({page}) => {
21-
test.setTimeout(60000);
22-
2321
const EXAMPLE_LONG_CONTENT = TEST_CONST.EXAMPLE_CONTENT.repeat(3);
2422

2523
const inputLocator = await setupInput(page, 'clear');
2624

27-
await inputLocator.pressSequentially(EXAMPLE_LONG_CONTENT, {delay: TEST_CONST.USER_TYPING_DELAY});
25+
await inputLocator.pressSequentially(EXAMPLE_LONG_CONTENT);
2826

2927
expect(await getElementValue(inputLocator)).toBe(EXAMPLE_LONG_CONTENT);
3028

WebExample/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"expo-status-bar": "2.2.0",
1717
"react": "^19.0.0",
1818
"react-dom": "^19.0.0",
19-
"react-native": "0.79.0",
19+
"react-native": "0.79.1",
2020
"react-native-web": "~0.20.0"
2121
},
2222
"devDependencies": {

apple/MarkdownBackedTextInputDelegate.mm

+10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#import "MarkdownBackedTextInputDelegate.h"
22

3+
#import <objc/message.h>
4+
35
@implementation MarkdownBackedTextInputDelegate {
46
__weak RCTUITextView *_textView;
57
id<RCTBackedTextInputDelegate> _originalTextInputDelegate;
@@ -89,4 +91,12 @@ - (BOOL)textInputShouldSubmitOnReturn
8991
return [_originalTextInputDelegate textInputShouldSubmitOnReturn];
9092
}
9193

94+
// This method is added as a patch in the New Expensify app.
95+
// See https://github.com/Expensify/App/blob/fd4b9adc22144cb99db1a5634f8828a13fa8c374/patches/react-native%2B0.77.1%2B011%2BAdd-onPaste-to-TextInput.patch#L239
96+
- (void)textInputDidPaste:(NSString *)type withData:(NSString *)data
97+
{
98+
void (*func)(id, SEL, NSString*, NSString*) = (void (*)(id, SEL, NSString*, NSString*))objc_msgSend;
99+
func(_originalTextInputDelegate, @selector(textInputDidPaste:withData:), type, data);
100+
}
101+
92102
@end

apple/MarkdownTextInputDecoratorShadowNode.mm

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#include "MarkdownTextInputDecoratorShadowNode.h"
22

3-
#include <react/renderer/components/iostextinput/TextInputState.h>
4-
53
#include <React/RCTUtils.h>
64
#include <react/renderer/components/view/conversions.h>
75
#include <react/renderer/core/ComponentDescriptor.h>

0 commit comments

Comments
 (0)