Commit 5f3e75a
authored
<!-- READ ME FIRST: Please fill in the explanation section below and
check off every point from the Essential Checklist! -->
## Explanation
Fix #5736: The last character in the list is truncated because
https://github.com/oppia/oppia-android/blob/cda4f44e36222fae5fc8672c774cc8c281f97156/utility/src/main/java/org/oppia/android/util/parser/html/HtmlParser.kt#L179
deletes 2 characters from the end if the text ends with a single `\n`,
which is too aggressive. This means it deletes the last character (4)
and the \n, when it should only delete the \n.
The safest solution is to trim all leading and trailing `\n` characters,
not just one. That way, whether there’s 1, 2, or 10 newlines at the
edges, they’ll be removed without touching non-\n characters.
|Before|After|
|--|--|
|||
Fix #5721:
Per @subhajitxyz's proposed solution in
#5721 (comment),
We need to calculate the width of the text outside of
`drawLeadingMargin()`, so that `getLeadingMargin()` can return the
correct computedLeadingMargin independently. We do this by passing a
reference of the TextView to the tag handler so that we can use it to
construct a matching `TextPaint` object and dynamically calculate the
prefix width (e.g., "1.", "10.") using its font, text size, and other
styling. This will allow us to decouple `getLeadingMargin()` from
`drawLeadingMargin()` and compute the margin correctly during layout.
|||
|--|--|
||
|
|||
Fix #5636
The developer options and admin controls menu item faailed to reopen
because of respective variables in `NavigationDrawerFragmentPresenter`
being set to true to indicate that they are already open, as well as
forcing the drawer to close.
Unfortunately, tests for repeated opening are blocked by known issue:
#2535.
Fix #5954
This bug is caused by the survey being shown AFTER the exploration has
been stopped, so attempting to play the exploration results into the
frozen state. The user is still able to exit the exploration normally by
clicking the close or return to topic buttons again, but this creates an
inconsistent UX.
The bug is fixed by navigating the user away from the
ExplorationActivity if they decline the survey.
Some minor chnages have been made to the survey code to remove some
redundancies.
|Before|After|
|--|--|
|https://github.com/user-attachments/assets/5bed7d7b-6d78-427a-a105-86fc0f15fd08|https://github.com/user-attachments/assets/cb6f042f-3e2c-4ae7-b972-75cf08a2f137|
Fix part of #5800
The survey gets dismissed due to the gating provider updating as a
result of the combined profile DataProvider updates. Immediately the
survey popup is show, the `surveyLastShownTimestampMs` field of a
profile gets update, and this updates downstream providers that are
subscribed to the profile provider. This has been fixed by removing the
observer to the gating provider once it has returned the first
time.vThis happened only on clicking "return to question".
This was not possible to test in `StateFragmentTest` because of issues
with dragAndDrop on robolectric, preventing playing through and
exploration. I spent a considerable amount of time trying to set up the
tst using the Ratios exploration, but experienced difficulty with item
selection in state 19 -- the images are large and scrolling is needed to
see and click all the options, but I was not able to make this work at
this time. So keeping the issue open to track adding tests either buy
fixing the ratios playthrough, or the drag and drop issue.
|Before|After|
|--|--|
|.
|https://github.com/user-attachments/assets/cb6f042f-3e2c-4ae7-b972-75cf08a2f137|
The PR also bumps versions for the release.
## Essential Checklist
<!-- Please tick the relevant boxes by putting an "x" in them. -->
- [x] The PR title and explanation each start with "Fix #bugnum: " (If
this PR fixes part of an issue, prefix the title with "Fix part of
#bugnum: ...".)
- [x] Any changes to
[scripts/assets](https://github.com/oppia/oppia-android/tree/develop/scripts/assets)
files have their rationale included in the PR explanation.
- [x] The PR follows the [style
guide](https://github.com/oppia/oppia-android/wiki/Coding-style-guide).
- [x] The PR does not contain any unnecessary code changes from Android
Studio
([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#undo-unnecessary-changes)).
- [x] The PR is made from a branch that's **not** called "develop" and
is up-to-date with "develop".
- [x] The PR is **assigned** to the appropriate reviewers
([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#clarification-regarding-assignees-and-reviewers-section)).
1 parent d4d99d4 commit 5f3e75a
File tree
17 files changed
+344
-93
lines changed- app
- src
- main/java/org/oppia/android/app
- drawer
- player
- exploration
- state
- survey
- test/java/org/oppia/android/app/player/exploration
- scripts/assets
- utility/src
- main/java/org/oppia/android/util/parser/html
- test/java/org/oppia/android/util/parser/html
17 files changed
+344
-93
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| 148 | + | |
148 | 149 | | |
149 | 150 | | |
150 | 151 | | |
| |||
Lines changed: 0 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
110 | | - | |
111 | 109 | | |
112 | 110 | | |
113 | 111 | | |
| |||
141 | 139 | | |
142 | 140 | | |
143 | 141 | | |
144 | | - | |
145 | | - | |
146 | 142 | | |
147 | 143 | | |
148 | 144 | | |
| |||
Lines changed: 14 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
52 | | - | |
| 54 | + | |
| 55 | + | |
53 | 56 | | |
54 | 57 | | |
55 | 58 | | |
| |||
220 | 223 | | |
221 | 224 | | |
222 | 225 | | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
223 | 236 | | |
Lines changed: 10 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
393 | 393 | | |
394 | 394 | | |
395 | 395 | | |
396 | | - | |
| 396 | + | |
| 397 | + | |
397 | 398 | | |
398 | 399 | | |
399 | 400 | | |
| |||
576 | 577 | | |
577 | 578 | | |
578 | 579 | | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
579 | 583 | | |
580 | 584 | | |
581 | 585 | | |
582 | 586 | | |
583 | 587 | | |
584 | 588 | | |
585 | 589 | | |
586 | | - | |
587 | | - | |
| 590 | + | |
| 591 | + | |
588 | 592 | | |
589 | | - | |
590 | | - | |
| 593 | + | |
591 | 594 | | |
592 | | - | |
| 595 | + | |
| 596 | + | |
593 | 597 | | |
594 | 598 | | |
595 | 599 | | |
| |||
Lines changed: 39 additions & 29 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
576 | 576 | | |
577 | 577 | | |
578 | 578 | | |
579 | | - | |
| 579 | + | |
| 580 | + | |
580 | 581 | | |
581 | | - | |
582 | | - | |
583 | | - | |
584 | | - | |
585 | | - | |
586 | | - | |
587 | | - | |
588 | | - | |
589 | | - | |
590 | | - | |
591 | | - | |
592 | | - | |
593 | | - | |
594 | | - | |
595 | | - | |
596 | | - | |
597 | | - | |
598 | | - | |
599 | | - | |
600 | | - | |
601 | | - | |
602 | | - | |
603 | | - | |
604 | | - | |
605 | | - | |
606 | | - | |
607 | | - | |
608 | | - | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
609 | 595 | | |
610 | 596 | | |
611 | 597 | | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
612 | 622 | | |
613 | 623 | | |
614 | 624 | | |
| |||
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
Lines changed: 0 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | 58 | | |
Lines changed: 3 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
91 | 94 | | |
92 | 95 | | |
93 | 96 | | |
| |||
101 | 104 | | |
102 | 105 | | |
103 | 106 | | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | 107 | | |
Lines changed: 3 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
54 | | - | |
55 | | - | |
56 | | - | |
| 55 | + | |
57 | 56 | | |
58 | 57 | | |
59 | 58 | | |
| |||
90 | 89 | | |
91 | 90 | | |
92 | 91 | | |
93 | | - | |
| 92 | + | |
94 | 93 | | |
95 | 94 | | |
96 | 95 | | |
| |||
0 commit comments