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 #5150: set layout params correctly #5160

Closed
wants to merge 1 commit into from

Conversation

nikitaevg
Copy link

@nikitaevg nikitaevg commented Sep 26, 2023

fix #5150. Previously layout params were not set after being updated. Also, the requestLayout call on the view is not needed, because the view layout is not changing. Video which shows that it works.

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

@nikitaevg nikitaevg requested a review from a team as a code owner September 26, 2023 21:17
@nikitaevg
Copy link
Author

Hey @adhiamboperes!

Could you please check this PR? I also have a problem adding an assignee. See the screenshot, I simply can't do it.
image

I guess I don't have permissions for that. Is that intended?

Thanks!

@adhiamboperes adhiamboperes self-assigned this Sep 27, 2023
Copy link
Collaborator

@adhiamboperes adhiamboperes left a comment

Choose a reason for hiding this comment

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

Thanks @nikitaevg!

I noticed that your PR changes are different from the ones proposed in the issue thread. Could you explain why?

Additionally, we have previously had some issues with changes in the MarginBindingadapters, and it would be great to verify that your changes so not break the UI elswhere. Please refer to #4951.

@adhiamboperes
Copy link
Collaborator

Hey @adhiamboperes!

Could you please check this PR? I also have a problem adding an assignee. See the screenshot, I simply can't do it. !
I guess I don't have permissions for that. Is that intended?

Thanks!

You can assign a reviewer by mentioning them with @xxx, PTAL.

@adhiamboperes
Copy link
Collaborator

@nikitaevg, PTAL.

@oppiabot
Copy link

oppiabot bot commented Sep 27, 2023

Unassigning @adhiamboperes since the review is done.

@oppiabot
Copy link

oppiabot bot commented Sep 27, 2023

Hi @nikitaevg, it looks like some changes were requested on this pull request by @adhiamboperes. PTAL. Thanks!

@nikitaevg
Copy link
Author

nikitaevg commented Sep 27, 2023

Thanks for the review!

I noticed that your PR changes are different from the ones proposed in the issue thread. Could you explain why?

My explanation in the discussion wouldn't fix the whole problem. It would fix the issue only when the home activity is restarted. I was able to reproduce the original issue without restarting the home activity: first open some lesson, go back to the home screen, and then scroll down, the lessons might become unaligned.

I guessed it wasn't a fix for the root cause, more of a workaround. I googled and found, that if we want to set margins programmatically, we need to set layout params (link).

Additionally, we have previously had some issues with changes in the MarginBindingadapters, and it would be great to verify that your changes so not break the UI elswhere. Please refer to #4951.

Thanks for highlighting that! See the screenshots, there's no such problem. I think it shouldn't break anything, because I'm not adding anything strange, just setting the layout params.
Tablet
Phone

@nikitaevg nikitaevg removed their assignment Sep 27, 2023
@nikitaevg
Copy link
Author

@adhiamboperes, PTAL.

Copy link
Collaborator

@adhiamboperes adhiamboperes left a comment

Choose a reason for hiding this comment

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

Thanks @nikitaevg, I tested these changes with the production assests and they issue is resolved. But @BenHenning, is there some way that we can improve the tests for this class? I'm not sure that there's a specific way to check that the layout params have been set beyond what we have currently.

Phone: device-2023-09-28-201012.webm

Tablet: device-2023-09-28-201315.webm

@oppiabot
Copy link

oppiabot bot commented Oct 5, 2023

Hi @nikitaevg, I'm going to mark this PR as stale because it hasn't had any updates for 7 days. If no further activity occurs within 7 days, it will be automatically closed so that others can take up the issue.
If you are still working on this PR, please make a follow-up commit within 3 days (and submit it for review, if applicable). Please also let us know if you are stuck so we can help you!

@oppiabot oppiabot bot added the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label Oct 5, 2023
@adhiamboperes adhiamboperes removed the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label Oct 5, 2023
@oppiabot
Copy link

oppiabot bot commented Oct 12, 2023

Hi @nikitaevg, I'm going to mark this PR as stale because it hasn't had any updates for 7 days. If no further activity occurs within 7 days, it will be automatically closed so that others can take up the issue.
If you are still working on this PR, please make a follow-up commit within 3 days (and submit it for review, if applicable). Please also let us know if you are stuck so we can help you!

@oppiabot oppiabot bot added the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label Oct 12, 2023
@Vishwajith-Shettigar Vishwajith-Shettigar removed the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label Oct 13, 2023
@BenHenning
Copy link
Member

@adhiamboperes and I discussed some strategies on how to investigate why this solution works (which is a good way to figure out what to test to verify that these changes correctly fix what needs to be fixed, and stay fixed).

Please assign back to me if follow-up thoughts are needed, or when this is ready for review again.

@BenHenning BenHenning removed their assignment Oct 13, 2023
@oppiabot
Copy link

oppiabot bot commented Oct 20, 2023

Hi @nikitaevg, I'm going to mark this PR as stale because it hasn't had any updates for 7 days. If no further activity occurs within 7 days, it will be automatically closed so that others can take up the issue.
If you are still working on this PR, please make a follow-up commit within 3 days (and submit it for review, if applicable). Please also let us know if you are stuck so we can help you!

@oppiabot oppiabot bot added the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label Oct 20, 2023
@adhiamboperes adhiamboperes removed the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label Oct 24, 2023
@oppiabot
Copy link

oppiabot bot commented Oct 31, 2023

Hi @nikitaevg, I'm going to mark this PR as stale because it hasn't had any updates for 7 days. If no further activity occurs within 7 days, it will be automatically closed so that others can take up the issue.
If you are still working on this PR, please make a follow-up commit within 3 days (and submit it for review, if applicable). Please also let us know if you are stuck so we can help you!

@oppiabot oppiabot bot added the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label Oct 31, 2023
@adhiamboperes adhiamboperes removed the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label Nov 1, 2023
@adhiamboperes
Copy link
Collaborator

Added a follow up comment on the issue #5150 (comment)

@adhiamboperes adhiamboperes removed their assignment Nov 6, 2023
Copy link

oppiabot bot commented Nov 13, 2023

Hi @nikitaevg, I'm going to mark this PR as stale because it hasn't had any updates for 7 days. If no further activity occurs within 7 days, it will be automatically closed so that others can take up the issue.
If you are still working on this PR, please make a follow-up commit within 3 days (and submit it for review, if applicable). Please also let us know if you are stuck so we can help you!

@oppiabot oppiabot bot added the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label Nov 13, 2023
@oppiabot oppiabot bot closed this Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Corresponds to items that haven't seen a recent update and may be automatically closed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG]: Home screen topics Grid view unaligned after coming back from Lesson
4 participants