-
Notifications
You must be signed in to change notification settings - Fork 289
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
[UI] add teacher preview mode #4822
Conversation
templates/layout.html
Outdated
{% if session.preview_class %} | ||
<div class="bg-red-100 border-l-4 border-red-500 text-red-700 p-4" role="alert"> | ||
<p class="font-bold">Preview mode</p> | ||
<p>You are previewing a class as a teacher. <a href="/for-teachers/clear-preview-class">Exit preview mode</a></p> |
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.
can we add the class name here? Just to know which class you're viewing without having to go to the customization and figure out which one!
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.
Yes!
8fb82f1
to
f53a367
Compare
Thanks @jtwaleson and sorry for being a bit late with the feedback, I was traveling last 2 weeks. I love that we are making this work!! I think the preview looks great, the banner is clear and it is awesome that it is really working where you can see and try examples! I was wondering though about the placement of the button to reach this feature. The overview page is fine, we can totally leave it there, but... I think the most natural workflow for teachers would be to want to review the class when they are customizing, and not when they are in the overview. Now if I want to preview after customization I have to click back twice, and if I ant to make a change based on the preview, I have to click again twice to reach the customization again. |
Ow and I think #4870 might cause some conflicts but I can deal with these for you |
Great, will do! I'll wrap up the new button and the tests this week. |
9b0bb31
to
ef6a424
Compare
Hi @hasan-sh! Can you review this in terms of the code? I am totally happy with the way it works, if you are ok too, we can ship this! @jtwaleson the test that you added now break, can you take a look at this? |
If we were already on level 1, clicking doesnt work.
Fixed! Note that I updated the design of the header in the code a couple weeks back, the screenshot above was not the latest version. I've now updated it in the description above. If you much prefer the old version let me know! |
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.
Everything works great and as expected!
Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to allow changes to be pushed to your fork). |
Description
Adds a preview mode for teachers, so when they create a class they can view Hedy as if they were a student in this class.
Fixes #3374
This is a draft PR, please let me know if this is roughly the right direction. Once we confirm that I'll add:
How to test
Step 1 - Go to For Teacher page. Make sure you have a class with some customizations, like less programs for level 1. Press the "Preview" button.
Step 2 - You should go to /hedy and see the loaded class including a banner "Preview mode".
The previous version of this design is here.
Step 3 - You can complete the programs and puzzles as if you were a student
Step 4 - When you exit preview mode the banner should disappear and you should go back to the /for-teachers page.
Checklist
Done? Check if you have it all in place using this list: (mark with x if done)