Skip to content
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

Refactor TextSemanticsNodeMapper to commonize the text wireframe logic #2401

Merged
merged 1 commit into from
Nov 20, 2024

Conversation

ambushwork
Copy link
Member

What does this PR do?

For the other semantics node mapper, we are probably going to reuse the part of the logic of resolving the text in current TextSemanticsNodeMapper, so in this PR, some functions are moved to AbstractSemanticsNodeMapper or SemanticUtils so it can be directly used by others.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

@ambushwork ambushwork force-pushed the yl/compose/refactor-text-mapper branch from aed9992 to 3a808a2 Compare November 19, 2024 13:15
@codecov-commenter
Copy link

codecov-commenter commented Nov 19, 2024

Codecov Report

Attention: Patch coverage is 49.33333% with 38 lines in your changes missing coverage. Please review.

Project coverage is 69.76%. Comparing base (352d252) to head (4748894).
Report is 6 commits behind head on develop.

Files with missing lines Patch % Lines
...ionreplay/compose/internal/utils/SemanticsUtils.kt 4.55% 21 Missing ⚠️
...l/mappers/semantics/AbstractSemanticsNodeMapper.kt 59.09% 2 Missing and 7 partials ⚠️
...ernal/mappers/semantics/TextSemanticsNodeMapper.kt 69.23% 1 Missing and 3 partials ⚠️
...essionreplay/compose/internal/utils/StringUtils.kt 66.67% 1 Missing and 3 partials ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2401      +/-   ##
===========================================
- Coverage    69.82%   69.76%   -0.06%     
===========================================
  Files          763      765       +2     
  Lines        28360    28363       +3     
  Branches      4763     4757       -6     
===========================================
- Hits         19801    19786      -15     
- Misses        7246     7266      +20     
+ Partials      1313     1311       -2     
Files with missing lines Coverage Δ
...mpose/internal/mappers/semantics/TextLayoutInfo.kt 100.00% <100.00%> (ø)
...ernal/mappers/semantics/TextSemanticsNodeMapper.kt 81.82% <69.23%> (+31.11%) ⬆️
...essionreplay/compose/internal/utils/StringUtils.kt 66.67% <66.67%> (ø)
...l/mappers/semantics/AbstractSemanticsNodeMapper.kt 74.51% <59.09%> (-11.70%) ⬇️
...ionreplay/compose/internal/utils/SemanticsUtils.kt 1.05% <4.55%> (-0.15%) ⬇️

... and 32 files with indirect coverage changes

---- 🚨 Try these New Features:

@ambushwork ambushwork marked this pull request as ready for review November 19, 2024 13:46
@ambushwork ambushwork requested review from a team as code owners November 19, 2024 13:46
@ambushwork ambushwork force-pushed the yl/compose/refactor-text-mapper branch from 3a808a2 to b369108 Compare November 19, 2024 15:49
class StringUtilsTest {
@Test
fun `M return null W resolveAnnotatedString with null value`() {
val result = resolveAnnotatedString(null)
Copy link
Member

@jonathanmos jonathanmos Nov 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

For tests in this class Given, When, Then comments seem to be missing

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

@ambushwork ambushwork force-pushed the yl/compose/refactor-text-mapper branch from b369108 to 53e02fb Compare November 20, 2024 08:16
@ambushwork ambushwork force-pushed the yl/compose/refactor-text-mapper branch from 53e02fb to 4748894 Compare November 20, 2024 09:54
@ambushwork ambushwork merged commit 6cde580 into develop Nov 20, 2024
24 checks passed
@ambushwork ambushwork deleted the yl/compose/refactor-text-mapper branch November 20, 2024 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants