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
[BUG]: Unexpected error on using tab RTE component or collapsible RTE component empty #19792
Comments
hey there @HardikGoyal2003 I'd be interested in solving this issue, can you please direct me to the folder where I can find the code for this |
Hey @Happyashbunny , Please first can you confirm this is reproducible? |
@HardikGoyal2003 I tried doing that through the link you posted but it doesn't seem to work. |
@Happyashbunny I have updated the steps to reproduce, Kindly check. Thanks! |
@HardikGoyal2003 Thanks for updating the steps. The issue is reproducible. Moreover, the issue only persists if in the newly added tab if either the title or content is left empty. |
@Happyashbunny Thanks for the confirmation. If you'd like to claim this issue, then, per the guidance at https://github.com/oppia/oppia/wiki/Contributing-code-to-Oppia#choosing-a-good-first-issue, please provide an explanation of what your PR will do (with names of files you're changing, what you plan to change in each file, etc.). If it looks good, we can assign you to this issue. Please also follow the other instructions on that wiki page if you have not yet done so. Thanks! |
This error occurs on the 3.3.5 branch too. |
Hello @HardikGoyal2003 I'm interested in solving this issue and I can reproduce the bug. |
Hey @joanapeixinho Thanks for showing interest in solving this issue. |
Hi! @HardikGoyal2003 I would like to propose an approach to this issue. I would alter the files core/templates/services/rte-helper-modal.controller.ts and core/templates/services/rte-helper-modal.component.html. In the rte-helper-modal.controller.ts I would add a function called disableSaveButtonForTabContents that would basically check if the title or contents are empty and if so, would disable the save button. Then in the rte-helper-modal.component.html i would add that condition to the Done button much like what we already have for when Rte is a Math Expression Editor. Does this seem like a good approach? Thank you! 😊 |
@seanlip /cc, to me it seems fine as the link RTE component and math RTE component disable buttons from these files only. Thanks! |
@joanapeixinho Ah, I have a request: could you please work on #18211 first, if that's OK? It sets up a more general structure for RTE component validation, and then we can work this into that. I think that would be a better order of doing things. A lot of the work has been done already for that issue so it's just a question of finishing it up, and then I think that will lead to this being a simple addition to that. What do you think? |
@seanlip Yes, I would like to work on that issue! I will suggest a solution as soon as I can. Thank you for the help! |
Hello @seanlip! Screen.Recording.2024-03-25.at.10.13.15.mov |
@alice21mota Yup, something along those lines sounds good to me. Feel free to take this up once the other PR gets merged! |
Thank you @seanlip ! |
Only after the other PR gets merged. I suggest taking up something else for now, thanks! |
Hi @alice21mota, yup assigning you. Go for it, thanks! |
Hi @seanlip ! |
… saving (#20241) * Fix: Handle empty content error in tab interaction Prevents user from saving when a component of a tab is empty, displaying an error message * fix: linting errors and unnecessary code removed * fix: changes request by reviwer dquote> change comment related to Value[0] in line 257 to be more specific dquote> replace tab with tabIndex dquote> make error messages more explicit for users dquote> fix tests to accomodate changes * fix: changes request by reviwer dquote> change comment related to Value[0] in line 257 to be more specific dquote> replace tab with tabIndex dquote> make error messages more explicit for users dquote> fix tests to accomodate changes * fix: changes request by reviwer change comment related to Value[0] in line 257 to be more specific replace tab with tabIndex make error messages more explicit for users fix tests to accomodate changes * fix: displayed errors messages alter displayed messages when a tab component is not filled change corresponding tests accordingly fix comment typos --------- Co-authored-by: Sean Lip <sean@seanlip.org>
Describe the bug
When using tab interaction, if the new tab is added it can be saved empty but when we try to save the content it produces the unexpected error.
URL of the page where the issue is observed.
N/A
Steps To Reproduce
Expected Behavior
It should handle this error by putting a check for empty content in tab interaction
N/A
Steps To Reproduce
Expected Behavior
It should handle this error by putting a check for empty content in tab interaction
Screenshots/Videos
scrnli_21_02_2024_02-11-17.mp4
What device are you using?
Desktop
Operating System
Linux
What browsers are you seeing the problem on?
Chrome
Browser version
No response
Additional context
No response
Tips for developers
Before addressing the bug, please identify which PR caused the issue (you can follow the steps here). If you identify the PR, comment on the issue with a link to it. If not, mention the commit hash of the oldest commit you saw the bug on (and the month and year it was made in).
Also, if this is your first issue, please make sure to follow https://github.com/oppia/oppia/wiki/Contributing-code-to-Oppia#choosing-a-good-first-issue and https://github.com/oppia/oppia/wiki/Contributing-code-to-Oppia#setting-things-up before claiming it. Thanks!
The text was updated successfully, but these errors were encountered: