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

Fix part of #2116: revert "#4874 Move PromotedStoryListAdapter to BindableAdapter" #4951

Conversation

adhiamboperes
Copy link
Collaborator

@adhiamboperes adhiamboperes commented Apr 19, 2023

This reverts commit 7fd290d68f0440d926f2d443dbd7bfb28ab20547, fixing part of #2116.

While testing #2116, we found that the UI for default profile view does not display correctly, and traced the change to #4874 in this discusson.

#4874 introduces a change to MarginBindingAdapters which utilizes MarginLayoutParamsCompat to compute the margins of a layout before drawing it. I suspect that this works for the Promoted Story and Topic Summary because we compute the start and end margins of each item relative to grid columns laid out on the HomeActivity, but no such implementation exists for the Profile Chooser view. We need to do some further investigation into this, hence the decision to revert.

We will need to test all the associated screens to make sure they still look as expected:

Screenshot 2023-04-19 at 18 01 28

Essential Checklist

  • 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: ...".)
  • Any changes to scripts/assets files have their rationale included in the PR explanation.
  • The PR follows the style guide.
  • The PR does not contain any unnecessary code changes from Android Studio (reference).
  • The PR is made from a branch that's not called "develop" and is up-to-date with "develop".
  • The PR is assigned to the appropriate reviewers (reference).

For UI-specific PRs only

This was mainly a re-implimentation per #632, and the UI did not change. Please refer to #4874 for screenshots.

The Affected screen displays okay with this revert:

Screenshot_1681916915

Other screens:

Screenshot_1681917117 Screenshot_1681917190

@adhiamboperes adhiamboperes marked this pull request as ready for review April 19, 2023 15:43
Copy link
Sponsor Member

@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

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

Thanks for tracking down the regression & creating this, @adhiamboperes! The reversion seems to be clean, so going ahead and approving & merging this.

@BenHenning BenHenning changed the title Revert "#4874 Move PromotedStoryListAdapter to BindableAdapter" Fix part of #2116: revert "#4874 Move PromotedStoryListAdapter to BindableAdapter" Apr 21, 2023
@BenHenning
Copy link
Sponsor Member

Considering this to be fixing part of #2116 since that's blocked on the regression introduced by the PR being reverted.

@BenHenning BenHenning merged commit 80d2cd0 into develop Apr 21, 2023
42 checks passed
@BenHenning BenHenning deleted the revert-4874-move-promotedStoryListAdapter-to-bindableAdater branch April 21, 2023 02:39
adhiamboperes added a commit that referenced this pull request Jul 11, 2023
Fix #632: Move PromotedStoryListAdapter to BindableAdater

This change reverts partially #4951, which in turn reverted #4874 due to
a bug.
It is a partial revert because the bug was fixed independently in the
previous PR #4965.

I added RecentlyPlayedViewModel.kt to the list of classes not needing
tests, as is usual for ViewModels. This was also part of the original
PR.

| current | new |
|- | - |

|![recently_played_ltr_current](https://github.com/oppia/oppia-android/assets/103062089/179e56c1-6548-4be0-ac03-a0b7252c3a4a)|
![recently_played_ltr_new](https://github.com/oppia/oppia-android/assets/103062089/468d13e2-f6c8-48f0-a36c-2483f6dbe728)|

|![recently_played_rtl_current](https://github.com/oppia/oppia-android/assets/103062089/cf78dd4b-4fef-4311-accb-bd03d28345d6)|
![recently_played_rtl_new](https://github.com/oppia/oppia-android/assets/103062089/90a489b4-7e2a-49b3-9cbc-1eebd6dfe491)
|

|![recently_played_ltr_landscape_current](https://github.com/oppia/oppia-android/assets/103062089/92b12fa4-54c4-4be5-8c4f-1c73e90e9cb1)|![recently_played_ltr_landscape_new](https://github.com/oppia/oppia-android/assets/103062089/39833703-9cbd-4b63-b882-5950d3154316)|

|![recently_played_rtl_landscape_current](https://github.com/oppia/oppia-android/assets/103062089/46545cf6-40aa-4f24-a977-a0a586b46445)|![recently_played_rtl_landscape_new](https://github.com/oppia/oppia-android/assets/103062089/89c6a842-e876-4dc3-8861-c2c47a938183)|

## 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)).

## For UI-specific PRs only
<!-- Delete these section if this PR does not include UI-related
changes. -->
If your PR includes UI-related changes, then:
- Add screenshots for portrait/landscape for both a tablet & phone of
the before & after UI changes
- For the screenshots above, include both English and pseudo-localized
(RTL) screenshots (see [RTL
guide](https://github.com/oppia/oppia-android/wiki/RTL-Guidelines))
- Add a video showing the full UX flow with a screen reader enabled (see
[accessibility guide](https://github.com/op
pia/oppia-android/wiki/Accessibility-A11y-Guide))
- Add a screenshot demonstrating that you ran affected Espresso tests
locally & that they're passing

---------

Co-authored-by: Adhiambo Peres <59600948+adhiamboperes@users.noreply.github.com>
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.

None yet

2 participants