-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fixed Read More Button Display Logic to Avoid Unnecessary Display #9627
Conversation
@CodeMaverick2 it looks like there is a test that broke because of this change. You'll need to investigate if the test should be changed or if something is actually broken. @cdrini I am not so familiar with this part of the code and can't really dig into this issue anytime soon. Could we get someone else to review this? |
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 @CodeMaverick2 . Please revert the unnecessary changes. And please add testing instruction on how you tested to confirm this change worked. If you cannot test this PR, we will be unable to review your changes.
this.fullHeight = this.$content.scrollHeight; | ||
// Fudge factor to account for non-significant read/more | ||
// (e.g missing a bit of padding) | ||
if (this.$content.scrollHeight <= (this.collapsedHeight + 1)) { | ||
if (this.$content.scrollHeight <= (this.collapsedHeight + this.$readMoreButton.offsetHeight + 1)) { |
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.
This should be the only change that is necessary here. Please revert the other changes since they are unnecessary.
@CodeMaverick2 do you think you'll be able to implement Drini's feedback? |
@RayBB Sure i will do that |
Closes #9329
Description
This PR addresses an issue where the "Read more" button was displayed even when it made the section longer than the fully expanded content. This led to a confusing user experience, as the "Read more" button was not serving its intended purpose. The following changes have been made to resolve this issue:
Changes
Capture "Read More" Button Height:
Update Condition in
reset
Method:Impact
Screenshots