-
Notifications
You must be signed in to change notification settings - Fork 39
feat(android): EnrichedText #400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
exploIF
wants to merge
27
commits into
main
Choose a base branch
from
@exploif/android-enriched-text
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
1cc0801
chore: create input specific spans
exploIF b483fc1
fix: updating ordered list indexes
exploIF 26647cd
chore: generic parser
exploIF ec8eaff
Merge remote-tracking branch 'origin/main' into @exploif/common-parse…
exploIF 0704001
Merge remote-tracking branch 'origin/main' into @exploif/common-parse…
exploIF 0931803
Merge branch 'main' into @exploif/common-parser-android
exploIF 2b9fbfa
chore: refactor js structure
exploIF 873b8ad
chore: refactor js structure
exploIF 62ac41b
feat: wip EnrichedText
exploIF 1d664d0
Merge remote-tracking branch 'origin/main' into @exploif/android-enri…
exploIF f2b75ca
feat: improve example app
exploIF 4b867cb
feat: allow customizing press styles
exploIF 5a14138
feat: tiny example improvement
exploIF e0b11a1
Merge remote-tracking branch 'origin/main' into @exploif/android-enri…
exploIF 4c1ccb1
chore: resolve conflicts
exploIF 28d4999
Merge branch 'main' into @exploif/android-enriched-text
kacperzolkiewski 2ede83a
Merge branch 'main' into @exploif/android-enriched-text
kacperzolkiewski d28ae30
Merge branch 'main' into @exploif/android-enriched-text
kacperzolkiewski b758125
fix: refacto e2e structure
kacperzolkiewski e8d9a4c
test: add e2e tests for enriched text
kacperzolkiewski ec23efd
fix: displaying async images
kacperzolkiewski 320c8f2
Update .maestro/enrichedText/flows/mention_press.yaml
kacperzolkiewski b7bf958
fix: e2e tests
kacperzolkiewski 44359f7
fix: move enriched text styles to defaultHtmlStyle file
kacperzolkiewski 8c1cd9b
fix: make link/mention clickable when selectable is true
kacperzolkiewski fe00d71
fix: revert changes from EnrichedTextMovementMethod
kacperzolkiewski b575499
Update android/src/main/java/com/swmansion/enriched/text/EnrichedText…
kacperzolkiewski File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
10 changes: 10 additions & 0 deletions
10
.maestro/enrichedInput/subflows/capture_or_assert_screenshot.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| appId: swmansion.enriched.example | ||
| --- | ||
| - tapOn: | ||
| id: 'blur-button' | ||
|
|
||
| - runFlow: | ||
| file: '../../subflows/capture_or_assert_screenshot.yaml' | ||
| env: | ||
| ELEMENT_ID: 'editor-input' | ||
| SCREENSHOT_PREFIX: 'enrichedInput' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| appId: swmansion.enriched.example | ||
| --- | ||
| # Validates that custom styles are displayed correctly | ||
| - launchApp | ||
|
|
||
| - tapOn: | ||
| id: 'toggle-screen-button' | ||
|
|
||
| - tapOn: | ||
| id: 'toggle-enriched-text-screen-button' | ||
|
|
||
| - runFlow: | ||
| file: '../subflows/set_enriched_text_value.yaml' | ||
| env: | ||
| VALUE: > | ||
| <html> | ||
| <p><a href="https://www.google.com">Link</a></p> | ||
| <p><mention text="@John Doe" indicator="@" id="1" type="user">@John Doe</mention> </p> | ||
| <p><img src="https://picsum.photos/id/1/200/200" width="80" height="80"/></p> | ||
| </html> | ||
|
|
||
| - runFlow: | ||
| file: '../subflows/capture_or_assert_screenshot.yaml' | ||
| env: | ||
| SCREENSHOT_NAME: 'custom_styles_display' | ||
39 changes: 39 additions & 0 deletions
39
.maestro/enrichedText/flows/empty_list_elements_display.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| appId: swmansion.enriched.example | ||
| tags: | ||
| - android-only | ||
| --- | ||
| # Validates that lists with empty items are parsed and displayed correctly | ||
| - launchApp | ||
|
|
||
| - tapOn: | ||
| id: 'toggle-screen-button' | ||
|
|
||
| - tapOn: | ||
| id: 'toggle-enriched-text-screen-button' | ||
|
|
||
| - runFlow: | ||
| file: '../subflows/set_enriched_text_value.yaml' | ||
| env: | ||
| VALUE: > | ||
| <html> | ||
| <ol> | ||
| <li>First</li> | ||
| <li></li> | ||
| <li>Third</li> | ||
| </ol> | ||
| <ul> | ||
| <li>First</li> | ||
| <li></li> | ||
| <li>Third</li> | ||
| </ul> | ||
| <ul data-type="checkbox"> | ||
| <li>First</li> | ||
| <li></li> | ||
| <li>Third</li> | ||
| </ul> | ||
| </html> | ||
|
|
||
| - runFlow: | ||
| file: '../subflows/capture_or_assert_screenshot.yaml' | ||
| env: | ||
| SCREENSHOT_NAME: 'empty_list_elements_display' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| appId: swmansion.enriched.example | ||
| tags: | ||
| - android-only | ||
| --- | ||
| # Validates that inline styles are displayed correctly | ||
| - launchApp | ||
|
|
||
| - tapOn: | ||
| id: 'toggle-screen-button' | ||
|
|
||
| - tapOn: | ||
| id: 'toggle-enriched-text-screen-button' | ||
|
|
||
| - runFlow: | ||
| file: '../subflows/set_enriched_text_value.yaml' | ||
| env: | ||
| VALUE: > | ||
| <html> | ||
| <p>Plain text</p> | ||
| <p><b>Bold</b> <i>Italic</i> <u>Underline</u> <s>Strike</s> <code>Code</code> </p> | ||
| <p><b><i><u><s>Combined</s></u></i></b></p> | ||
| </html> | ||
|
|
||
| - runFlow: | ||
| file: '../subflows/capture_or_assert_screenshot.yaml' | ||
| env: | ||
| SCREENSHOT_NAME: 'inline_styles_display' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| appId: swmansion.enriched.example | ||
| tags: | ||
| - android-only | ||
| --- | ||
| # Validates that link press events are triggered correctly | ||
| - launchApp | ||
|
|
||
| - tapOn: | ||
| id: 'toggle-screen-button' | ||
|
|
||
| - tapOn: | ||
| id: 'toggle-enriched-text-screen-button' | ||
|
|
||
| - runFlow: | ||
| file: '../subflows/set_enriched_text_value.yaml' | ||
| env: | ||
| VALUE: '<html><p><a href="https://www.google.com">Link</a></p></html>' | ||
|
|
||
| - tapOn: | ||
| text: 'Link' | ||
|
|
||
| - runFlow: | ||
| file: '../subflows/capture_or_assert_screenshot.yaml' | ||
| env: | ||
| SCREENSHOT_NAME: 'link_press' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| appId: swmansion.enriched.example | ||
| tags: | ||
| - android-only | ||
| --- | ||
| # Validates that mention press events are triggered correctly | ||
| - launchApp | ||
|
|
||
| - tapOn: | ||
| id: 'toggle-screen-button' | ||
|
|
||
| - tapOn: | ||
| id: 'toggle-enriched-text-screen-button' | ||
|
|
||
| - runFlow: | ||
| file: '../subflows/set_enriched_text_value.yaml' | ||
| env: | ||
| VALUE: '<html><p><mention text="@John Doe" indicator="@" id="1" type="user">@John Doe</mention></p></html>' | ||
|
|
||
| - tapOn: | ||
| text: '@John Doe' | ||
|
|
||
| - runFlow: | ||
| file: '../subflows/capture_or_assert_screenshot.yaml' | ||
| env: | ||
| SCREENSHOT_NAME: 'mention_press' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| appId: swmansion.enriched.example | ||
| tags: | ||
| - android-only | ||
| --- | ||
| # Validates that paragraph styles are displayed correctly | ||
| - launchApp | ||
|
|
||
| - tapOn: | ||
| id: 'toggle-screen-button' | ||
|
|
||
| - tapOn: | ||
| id: 'toggle-enriched-text-screen-button' | ||
|
|
||
| - runFlow: | ||
| file: '../subflows/set_enriched_text_value.yaml' | ||
| env: | ||
| VALUE: > | ||
| <html> | ||
| <h1>Heading 1</h1> | ||
| <h2>Heading 2</h2> | ||
| <h3>Heading 3</h3> | ||
| <h4>Heading 4</h4> | ||
| <h5>Heading 5</h5> | ||
| <h6>Heading 6</h6> | ||
| <codeblock> | ||
| <p>Code block</p> | ||
| </codeblock> | ||
| <blockquote> | ||
| <p>Blockquote</p> | ||
| </blockquote> | ||
| <ul> | ||
| <li>Unordered list</li> | ||
| </ul> | ||
| <ol> | ||
| <li>Ordered list</li> | ||
| </ol> | ||
| <ul data-type="checkbox"> | ||
| <li>Checkbox list</li> | ||
| </ul> | ||
| </html> | ||
|
|
||
| - runFlow: | ||
| file: '../subflows/capture_or_assert_screenshot.yaml' | ||
| env: | ||
| SCREENSHOT_NAME: 'paragraph_styles_display' |
Oops, something went wrong.
Binary file added
BIN
+20.5 KB
.maestro/enrichedText/screenshots/android/empty_list_elements_display.png
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+102 KB
.maestro/enrichedText/screenshots/android/paragraph_styles_display.png
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
.maestro/enrichedText/subflows/capture_or_assert_screenshot.yaml
|
kacperzolkiewski marked this conversation as resolved.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| appId: swmansion.enriched.example | ||
| --- | ||
| - runFlow: | ||
| file: '../../subflows/capture_or_assert_screenshot.yaml' | ||
| env: | ||
| ELEMENT_ID: 'enriched-text' | ||
| SCREENSHOT_PREFIX: 'enrichedText' |
19 changes: 19 additions & 0 deletions
19
.maestro/enrichedText/subflows/set_enriched_text_value.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| appId: swmansion.enriched.example | ||
| --- | ||
|
|
||
| - tapOn: | ||
| id: "set-enriched-text-button" | ||
|
|
||
| - waitForAnimationToEnd | ||
| - extendedWaitUntil: | ||
| visible: | ||
| id: "value-modal-input" | ||
| timeout: 10000 | ||
|
|
||
| - tapOn: | ||
| id: "value-modal-input" | ||
|
|
||
| - inputText: ${VALUE} | ||
|
|
||
| - tapOn: | ||
| id: "value-modal-submit-button" |
|
kacperzolkiewski marked this conversation as resolved.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,23 +1,20 @@ | ||
| appId: swmansion.enriched.example | ||
| --- | ||
| - tapOn: | ||
| id: "blur-button" | ||
|
|
||
| - runFlow: | ||
| when: | ||
| true: ${UPDATE_SCREENSHOTS === "true"} | ||
| commands: | ||
| - takeScreenshot: | ||
| path: "${SCREENSHOT_ROOT}/${maestro.platform}/${SCREENSHOT_NAME}" | ||
| path: "${SCREENSHOT_ROOT}/${SCREENSHOT_PREFIX}/screenshots/${maestro.platform}/${SCREENSHOT_NAME}" | ||
| cropOn: | ||
| id: "editor-input" | ||
| id: "${ELEMENT_ID}" | ||
|
|
||
| - runFlow: | ||
| when: | ||
| true: ${UPDATE_SCREENSHOTS !== "true"} | ||
| commands: | ||
| - assertScreenshot: | ||
| path: "${SCREENSHOT_ROOT}/${maestro.platform}/${SCREENSHOT_NAME}" | ||
| path: "${SCREENSHOT_ROOT}/${SCREENSHOT_PREFIX}/screenshots/${maestro.platform}/${SCREENSHOT_NAME}" | ||
| thresholdPercentage: 100 | ||
| cropOn: | ||
| id: "editor-input" | ||
| id: "${ELEMENT_ID}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.