-
Notifications
You must be signed in to change notification settings - Fork 527
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
Conversation
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! |
There was a problem hiding this 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.
You can assign a reviewer by mentioning them with |
@nikitaevg, PTAL. |
Unassigning @adhiamboperes since the review is done. |
Hi @nikitaevg, it looks like some changes were requested on this pull request by @adhiamboperes. PTAL. Thanks! |
Thanks for the review!
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).
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. |
@adhiamboperes, PTAL. |
There was a problem hiding this 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
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. |
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. |
@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. |
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. |
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. |
Added a follow up comment on the issue #5150 (comment) |
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. |
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