Skip to content

Commit e631d40

Browse files
Merge branch 'main' into @ksienkiewicz/fix-mention-events
2 parents c285576 + 4eed699 commit e631d40

75 files changed

Lines changed: 2832 additions & 293 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
blank_issues_enabled: false
22
contact_links:
33
- name: Feature Request 💡
4-
url: https://github.com/software-mansion/react-native-enriched/discussions/new?category=ideas
4+
url: https://github.com/software-mansion/react-native-enriched-html/discussions/new?category=ideas
55
about: If you have a feature request, please create a new discussion on GitHub.
66
- name: Discussions on GitHub 💬
7-
url: https://github.com/software-mansion/react-native-enriched/discussions
7+
url: https://github.com/software-mansion/react-native-enriched-html/discussions
88
about: If this library works as promised but you need help, please ask questions there.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Include any visual proof that helps reviewers understand the change — UI updat
2929
| ------- | :---------: |
3030
| iOS | ✅❌ |
3131
| Android | ✅❌ |
32+
| Web | ✅❌ |
3233

3334
## Checklist
3435

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
if: ${{ github.event_name == 'workflow_dispatch' }}
4949
uses: software-mansion/npm-package-publish@1bb885ec49bed729c8c1ec95a11a285d89f1bf45
5050
with:
51-
package-name: 'react-native-enriched'
51+
package-name: 'react-native-enriched-html'
5252
package-json-path: 'package.json'
5353
install-dependencies-command: 'yarn install --immutable'
5454
release-type: ${{ inputs.release-type }}
@@ -59,7 +59,7 @@ jobs:
5959
if: ${{ github.event_name == 'schedule' }}
6060
uses: software-mansion/npm-package-publish@1bb885ec49bed729c8c1ec95a11a285d89f1bf45
6161
with:
62-
package-name: 'react-native-enriched'
62+
package-name: 'react-native-enriched-html'
6363
package-json-path: 'package.json'
6464
install-dependencies-command: 'yarn install --immutable'
6565
release-type: 'nightly'
-65 Bytes
Loading
-65 Bytes
Loading
-71 Bytes
Loading

.maestro/scripts/setup-android-emulator.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ until adb -s "$SERIAL" shell getprop sys.boot_completed 2>/dev/null | grep -q "^
7777
done
7878

7979
adb -s "$SERIAL" shell pm disable-user --user 0 com.google.android.inputmethod.latin
80+
adb -s "$SERIAL" shell settings put secure spell_checker_enabled 0
8081

8182
echo "Emulator ready: $AVD_NAME ($SERIAL)"
8283
echo "DEVICE_ID=$SERIAL"

.maestro/scripts/setup-ios-simulator.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,21 @@ if [ -z "$UDID" ]; then
2525
exit 1
2626
fi
2727

28+
# disable automatic text manipulation: auto-correction, spelling-check and auto-capitalization
29+
SIM_PREFS_DIR="$HOME/Library/Developer/CoreSimulator/Devices/$UDID/data/Library/Preferences"
30+
mkdir -p "$SIM_PREFS_DIR"
31+
32+
PLIST="$SIM_PREFS_DIR/com.apple.keyboard.preferences.plist"
33+
34+
/usr/libexec/PlistBuddy -c "Add :KeyboardAutocorrection bool false" "$PLIST" 2>/dev/null || \
35+
/usr/libexec/PlistBuddy -c "Set :KeyboardAutocorrection bool false" "$PLIST"
36+
37+
/usr/libexec/PlistBuddy -c "Add :KeyboardCheckSpelling bool false" "$PLIST" 2>/dev/null || \
38+
/usr/libexec/PlistBuddy -c "Set :KeyboardCheckSpelling bool false" "$PLIST"
39+
40+
/usr/libexec/PlistBuddy -c "Add :KeyboardAutocapitalization bool false" "$PLIST" 2>/dev/null || \
41+
/usr/libexec/PlistBuddy -c "Set :KeyboardAutocapitalization bool false" "$PLIST"
42+
2843
STATE=$(xcrun simctl list devices | grep "$UDID" | grep -oE '\(Booted\)|\(Shutdown\)' || true)
2944
if [ "$STATE" != "(Booted)" ]; then
3045
echo "Booting '$DEVICE_NAME' ($UDID)..."

.playwright/helpers/clipboard.ts

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,43 @@ export async function pasteInto(locator: Locator): Promise<void> {
1212
await locator.page().keyboard.press('ControlOrMeta+V');
1313
}
1414

15+
export async function copyWholeContent(locator: Locator): Promise<void> {
16+
await locator.click();
17+
await locator.page().waitForTimeout(100);
18+
await locator.page().keyboard.press('ControlOrMeta+A');
19+
await locator.page().keyboard.press('ControlOrMeta+C');
20+
}
21+
22+
export async function pasteIntoWholeContent(locator: Locator): Promise<void> {
23+
await locator.click();
24+
await locator.page().waitForTimeout(100);
25+
await locator.page().keyboard.press('ControlOrMeta+A');
26+
await locator.page().keyboard.press('ControlOrMeta+V');
27+
}
28+
1529
export async function copyAndPasteBetween(
1630
source: Locator,
1731
dest: Locator
1832
): Promise<void> {
1933
await copySelectionFrom(source);
2034
await pasteInto(dest);
2135
}
36+
37+
export async function pastePlainTextIntoEditor(
38+
editorInnerLocator: Locator,
39+
text: string
40+
): Promise<void> {
41+
const pm = editorInnerLocator.locator('.ProseMirror');
42+
await pm.click();
43+
await pm.evaluate((el, t) => {
44+
const dt = new DataTransfer();
45+
dt.setData('text/plain', t);
46+
el.dispatchEvent(
47+
new ClipboardEvent('paste', {
48+
clipboardData: dt,
49+
bubbles: true,
50+
cancelable: true,
51+
})
52+
);
53+
}, text);
54+
}

.playwright/playwright.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export default defineConfig({
2626
trace: 'on-first-retry',
2727
screenshot: 'only-on-failure',
2828
video: 'retain-on-failure',
29+
permissions: ['clipboard-read', 'clipboard-write'],
2930
},
3031

3132
webServer: {

0 commit comments

Comments
 (0)