-
-
Notifications
You must be signed in to change notification settings - Fork 4.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
Fix #5973: Fixed the changed space when the text is added just below the image #5996
Conversation
Kindly see the screenshots. @bansalnitish |
Codecov Report
@@ Coverage Diff @@
## develop #5996 +/- ##
=======================================
Coverage 45.3% 45.3%
=======================================
Files 520 520
Lines 30667 30667
Branches 4597 4597
=======================================
Hits 13893 13893
Misses 16774 16774
Continue to review full report at Codecov.
|
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.
Hi @rakshitkumarcse -- Thanks for the PR.
This is not working as expected, notice the difference between spacing here.
@bansalnitish Thanks for pointing out. I thought that this behavior is what you were expecting. Because according to the process of reproducing the error, if you edit the content again, you will notice that there is no space, unlike before. Would you want me to work on it such that on saving as well, no new line appears even then? Further, of you publish the exploration, you will notice there is no extra line, and the behavior is just as expected. So, the only question that stands is, do you want me to work further to see why the extra line is appearing on saving and fix it? |
Yes, exactly. |
@bansalnitish Sure. Working on it.😁 |
@bansalnitish Kindly test again. It's working exactly as expected now. |
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.
Hey @rakshitkumarcse, these changes look great, LGTM!
@@ -158,7 +158,7 @@ oppia.directive('ckEditorRte', [ | |||
} else { | |||
return '<div type="oppia-noninteractive-' + p3 + '"' + | |||
'class="oppia-rte-component-container">' + match + | |||
'<div class="oppia-rte-component-overlay"></div></div>'; |
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.
@rakshitkumarcse, can you please explain why do we have to remove 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.
Hey @DubeySandeep, this was a wrapping around the block components. If you use this, then after clicking the save button and entering in the editing mode again there will be empty line between the paragraph just below it and the block component (say image).
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.
@bansalnitish Thanks for answering.
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! :)
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.
Hey @rakshitkumarcse, My bad!
Could you also follow the comment - https://github.com/oppia/oppia/pull/5996/files#diff-a5de01b7be4948894c7b8f8782677062R1483?
These classes manage the content of the response. See the screenshot below the space is being introduced due to this.
@bansalnitish So should I revert the changes in oppia.css and let the changes in CkeditorRteDirective.js stay? |
@bansalnitish Changes in oppia.css reverted. I think we are ready for the merge. |
Why did you revert the changes at @rakshitkumarcse ? Did you test its working fine now (I'm quite sure, no!)? I just asked to perform the same changes in the file If you don't do the same changes in the mentioned file then the issue still persists (in response). You could reproduce as follows:
Let me know if its still unclear. Thanks! |
@bansalnitish Uh oh. Sorry. Was confused with your earlier reply. Will make the required changes. |
@bansalnitish Kindly merge. Thanks! |
Why kept the same css here - https://github.com/oppia/oppia/blob/develop/core/templates/dev/head/css/oppia.css#L1508? Any specific reason? (Also, please do check that it works fine for all interactions, where ever the RTE is being used and on mobile as well as desktop. Don't rush to get this in. I'll check on my part too but its good to be tested by two.) |
@bansalnitish As for the same css, I don't see the class concerned being used anywhere at all in any html file. So no idea why the same css is used there. Could it be possible that it is just incorporated in oppia.css for some new feature our fellow developers are working on? |
@bansalnitish I have tested all interactions that can contain images and the result looks pretty fine to me. |
Hey @rakshitkumarcse, This is looking really good and we are close. Nope, this is not added for some developer working on any future feature. I'd say remove the margins involved in the class The reason for this is we have a p tag in oppia.css and there we have specified the margin-bottom. Now, removing the margins here would mean it would inherit margins from this p tag, which would work fine (as its working in our current case, which just need margin-bottom). |
@bansalnitish Thanks for the clarification. It is clear to me now. |
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.
Thank you @rakshitkumarcse, LGTM!
@DubeySandeep @bansalnitish kindly merge. |
Explanation
Fixes #5973: The CkeditorRteDirective is changed to expected behavior.
Checklist
python scripts/pre_commit_linter.py
andbash scripts/run_frontend_tests.sh
.