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

It's a bit strange that 'save and publish question' is enabled without an interaction #6482

Closed
BenHenning opened this issue Mar 20, 2019 · 28 comments

Comments

@BenHenning
Copy link
Member

Describe the bug
When creating a question for a skill, I noticed that I can try to go ahead and create the question without filling any details. I hit an error, but the fact that the button is green makes me think I can go ahead and create this question without doing anything. This is at odds with other publish/save buttons in Oppia editors which only turn green once all errors are resolved.

To Reproduce
Steps to reproduce the behavior:

  1. Open skill editor for a skill
  2. Create a question to open question editor

Observed behavior
The save and publish question button is green, despite the question not being valid (attempting to click this results in an error--see screenshot).

Expected behavior
The save/publish button should only be green once it's valid to save the question, per other editor behavior.

Screenshots
question_can_attempt_to_be_saved_in_invalid_state

Desktop (please complete the following information; delete this section if the issue does not arise on desktop):

  • OS: Chrome OS
  • Browser: Chrome
  • Version: 72

Additional context
This was reproed on the Oppia test server since topics/skills editors are currently in pre-release testing and are not yet released to the public.

@aks681
Copy link
Contributor

aks681 commented Mar 24, 2019

Yeah, the button is green so that error messages can be shown to the learner if the question is not complete when they try to save it.
We can change this to a warning icon on relevant headers in the interaction, or an error message as tooltip on the disabled 'Save and Publish' button in the future.

@anamika2004
Copy link

I would like to work on this.

@lkcbharath
Copy link

Is anyone working on this? If not, can this issue be assigned to me?

@DubeySandeep
Copy link
Member

Hi @Ikcbharath, I think you haven't signed the CLA yet, would you mind following the getting started wiki page first?
Thanks! :)

@discombobulateme
Copy link
Contributor

Hello :) is it anyone working on this? If not, may I? If so, could you help me understand the structure to find where to work on this issue?

@DubeySandeep
Copy link
Member

DubeySandeep commented Oct 20, 2019

Hi @discombobulateme, You can work on this issue I've assigned you! :)

I tried looking for the button UI using git grep "Save and Publish Question" and found a modal file (1). After that, I tried looking for the script file which uses this modal template using git grep "question-editor-modal.directive.html" and found the script file (2).

Files to check:

  1. core/templates/dev/head/components/question-directives/modal-templates/question-editor-modal.directive.html
  2. core/templates/dev/head/components/question-directives/questions-list/questions-list.directive.ts:

@discombobulateme
Copy link
Contributor

On it! Will have to study a bit about directives, but on it ;)

@discombobulateme
Copy link
Contributor

o/ here again! I can access the file, but cannot find page to open locally. How can I reach the skill editor to reproduce the issue?

@DubeySandeep
Copy link
Member

@aks681, Can you help @discombobulateme with steps to create a skill? (I'm not where these steps are documented.)

@aks681
Copy link
Contributor

aks681 commented Oct 21, 2019

You have to give yourself the admin role first. Go to the /admin page and in the Roles tab, assign your username the admin role.
Then, you can go to '/topics_and_skills_dashboard' to go to the dashboard from where you can create topics and skills. You can also click on the profile dropdown after giving yourself the admin role, and this option would be there now.
image

@discombobulateme
Copy link
Contributor

discombobulateme commented Oct 22, 2019

This option is not showed to me. Did I missed something on installation or maybe should fork some specific branch? Just checking... I'm forked from https://github.com/oppia/oppia
Screen Shot 2019-10-22 at 07 15 05

@Showtim3
Copy link
Contributor

@discombobulateme Go to the admin page then assign yourself the admin role from there.

@Showtim3 Showtim3 reopened this Oct 24, 2019
@discombobulateme
Copy link
Contributor

WOOOWWWW super! Back in the game ;) thank you @Showtim3 \o/

@discombobulateme
Copy link
Contributor

Reporting that I'm still on this issue, I'm just very new to Angular and studding before making the PR.
I followed Ben's tutorial and the "git grep" hint. Now I'm comparing files with other parts of the code with similar function needs, trying to follow a pattern and code style.
Problem is very easy to understand what's need to be done, I'm stuck on the syntax, on how to say that to Angular :/ hopefully until the end of the day I figure it out \o/
Will just register here, if someone got stuck too, that W3School have a pretty good tutorial https://www.w3schools.com/angular/ng_ng-click.asp

@Showtim3
Copy link
Contributor

@discombobulateme Sounds awesome, there's no hurry take ur time. However, if you hit a block and unable to find a complete solution, you can always post here or on our Gitter channel and ask for help. Also if u have made some progress and need some help, you can also open up a PR and we can take a look and solve that together.

@discombobulateme
Copy link
Contributor

Thank you soooo much @Showtim3 ! I've being learning sooo much in the past days! I'll keep in close touch here and at Gitter. Thank you!

@discombobulateme
Copy link
Contributor

discombobulateme commented Oct 30, 2019

Dear all, need a helping "hand here" :)

This is my complete line of thought https://docs.google.com/document/d/1OS-WTYUPc-8zS3GdO6gu44bxPtpbkidmBBNB61VljFw/edit?usp=sharing that I'm doing also hoping to help other people contribute on Oppia (as it took me a looong time to understand a few thing, so hopefully this can be helpful for someone else)

I understand that what it needs to be done it's quite simple: Save button needs to be disable when there's no information input.

I'm now comparing another page where this is perfectly happening. But I'm not understanding how to connect things o_o. Left window is the button that needs to be fixed. Right window is the example button.

.html files
Screen Shot 2019-10-30 at 17 58 20

.ts files
Screen Shot 2019-10-30 at 18 11 45

Files to be corrected:
core/templates/dev/head/components/question-directives/modal-templates/question-editor-modal.directive.html

core/templates/dev/head/components/question-directives/questions-list/questions-list.directive.ts:

Files I'm comparing to, where disable is nicely working:
core/templates/dev/head/pages/skill-editor-page/modal-templates/add-worked-example-modal.directive.html

core/templates/dev/head/pages/skill-editor-page/editor-tab/skill-concept-card-editor/skill-concept-card-editor.directive.ts

Basically I think that a ng-disable is needed https://docs.angularjs.org/api/ng/directive/ngDisabled. But I don't know how to fit it in the function with warning.

Am I going in a good direction? Or am I totally wrong? Any helping word will be highly appreciated :)

discombobulateme added a commit to discombobulateme/oppia that referenced this issue Nov 3, 2019
…lish Question is disable untill all requirements are fulfilled
@discombobulateme
Copy link
Contributor

Dear @Showtim3 and @aks681 I just made a PR on this issue.
All the steps to debug are documented here https://docs.google.com/document/d/1OS-WTYUPc-8zS3GdO6gu44bxPtpbkidmBBNB61VljFw/edit?usp=sharing

I'm waiting for a code review, but while fixing it I understood what @aks681 said about the need for a tooltip. I think we may find better design options to solve this issue, thus I think we could open a new issue on this. Would you think this is appropriate?

@seanlip
Copy link
Member

seanlip commented Nov 3, 2019

I think you do need some sort of message to explain to users why the button is not clickable, and that that should be part of this PR (to keep the UI usable).

@discombobulateme
Copy link
Contributor

hi @seanlip I think is a totally different issue, that's why I suggest to open a new issue. I understand that's design issue on how to communicate to the user what they supposed to do. Warnings were very confuse as I felt "trapped" receiving constant warnings. For me, the usability is, at least, more fluid now.
But I agree it needs a solution, but it's more related to how Skill is presented to the user, not to the button itself.

@seanlip
Copy link
Member

seanlip commented Nov 3, 2019

Perhaps you could use a tooltip for now, and we could find a better design later. But I think there should be at least some indication to explain to users why the button isn't clickable. That said, if the appropriate warnings already exist in the creation flow, then there's no need to add more.

@discombobulateme
Copy link
Contributor

I can @seanlip :) working on it! I also think a tooltip may be better than warning for now. Never done it though lol... I'll try

@discombobulateme
Copy link
Contributor

Hi @seanlip ! I inserted a simple tooltip saying: "To Save please add: interaction, hint and solution". But I would recommend to open a design issue. I was working on it for days and the whole process is still a bit confused for me. I cannot differentiate between Skills and Topics and I still don't understand what are the "Questions" for and how does it relates to Skill nor Topics. Maybe a simple infographic at the beginning... maybe letting clear the steps for user... i don't know...

@seanlip
Copy link
Member

seanlip commented Nov 4, 2019

Hi @discombobulateme -- thanks! Yes, I completely agree that some redesign is needed. We are working on it! (Some of these issues will be fixed in a couple of the PRs that are open by @aks681 at the moment.)

kevinlee12 pushed a commit that referenced this issue Nov 7, 2019
…lled - fixed \o/ (#7908)

* issue #6482 fixed - Skill editor, Questions, button Save and Publish Question is disable untill all requirements are fulfilled

* 2 errors that appeared on push fixerd

* max lenght error fixed

* space error fixed

* function name corrected and tooltip added
@discombobulateme
Copy link
Contributor

Hey dears, should this issue be closed?

@seanlip
Copy link
Member

seanlip commented Nov 10, 2019

Hmm -- yes, I think so, but I'd like to clarify something first @discombobulateme. Your PR #7908 says "Fix part of #6482", so I just wanted to get some clarity on which part of this issue isn't fixed yet?

@discombobulateme
Copy link
Contributor

Hey @seanlip button is solved with a tooltip. I said "part" because I think it needs another ticket to improve design :) but this issue is fixed \o/

@seanlip
Copy link
Member

seanlip commented Nov 11, 2019

Ah ok, thanks @discombobulateme! I think that means we can close this. Thank you for fixing the issue!

@seanlip seanlip closed this as completed Nov 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants