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

Fix quiz button styling to match other buttons #217

Closed
varlese opened this issue Jun 1, 2021 · 7 comments
Closed

Fix quiz button styling to match other buttons #217

varlese opened this issue Jun 1, 2021 · 7 comments
Labels
[Component] Learn Theme Website development issues related to the Learn theme. [Component] Sensei Website development issues related to the Sensei plugin installed on Learn. Priority - Low Low priority issue. [Type] Bug Something isn't working on the Learn website. [Type] Good First Issue Good website development issue for new contributors.

Comments

@varlese
Copy link
Collaborator

varlese commented Jun 1, 2021

For the Polyglots Training course, we're planning to add content to the course in Sensei using the Lesson post type, rather than as a Workshop.

On the Polyglots Contributor Training course page, everything appears as expected. However, once I open an individual lesson, the buttons to navigate from one lesson to the next appear larger than expected. It's also not possible to move those buttons/the Lesson Actions block to a different part of the page, i.e. below the quiz questions.

Screen Shot 2021-06-01 at 15 10 43

Likewise, on the same page, the description for the quiz question appears twice. Once below the quiz question, which is expected, and a second time, just above the navigation buttons.

Screen Shot 2021-06-01 at 15 15 50

It would be helpful if we could remove that repeated question description, make it possible to move the Lesson Actions block to a different part of the page, and align the buttons onto a single line, like they appear in the block editor.

Screen Shot 2021-06-01 at 15 23 04

@varlese varlese added the [Type] Bug Something isn't working on the Learn website. label Jun 1, 2021
@coreymckrill coreymckrill added the [Component] Learn Theme Website development issues related to the Learn theme. label Jun 1, 2021
@hlashbrooke
Copy link
Collaborator

Agree that this needs to be updated.

In a previous update (that I requested) we added the lesson content to the top of the quiz page and auto-redirected lessons to quizzes. That made sense for the flow we have been using, but now that we're going all-in on courses for Learn, we will need to revert that change. The commit that handled it was in #141. We can keep the auto-enrolment there, but could you please roll back the other two changes in that commit, with my apologies for asking you to revert your previous work.

We'll also need to look into the layout of those buttons, although those buttons don't look like the standard Sensei buttons (blue/green/red) so not sure where those button style are coming from exactly.

@coreymckrill coreymckrill self-assigned this Jun 11, 2021
@varlese
Copy link
Collaborator Author

varlese commented Jun 14, 2021

If I can tack on one more quiz-related button that seems like a stylistic change! At the bottom of a quiz, it looks like the Save Quiz and Reset Quiz buttons are missing some styles to match the Complete Quiz button.

quiz buttons

From what I see, it looks like both of those buttons have the is-style-outline class added and that's causing the difference in appearance.

@coreymckrill coreymckrill added the [Component] Sensei Website development issues related to the Sensei plugin installed on Learn. label Jun 23, 2021
coreymckrill added a commit that referenced this issue Jun 23, 2021
In #141 we made some customizations to Sensei to have it play nicer with our Workshops CPT. Now we need to undo some of those changes, specifically:

* Prepend lesson content to the single quiz page
* Auto-redirect lessons to quizzes

Refs #217
@coreymckrill
Copy link
Contributor

@hlashbrooke @varlese Ok the lesson changes (redirect to quizzes, prepending content) have been reverted. Probably won't have a chance to look at the button issues until later this week or next.

@hlashbrooke
Copy link
Collaborator

Thanks - this looks like it's working correctly to me.

@hlashbrooke hlashbrooke added the [Type] Good First Issue Good website development issue for new contributors. label Sep 9, 2021
@hlashbrooke hlashbrooke changed the title Adjust buttons and quiz question descriptions on lessons in a course Sep 9, 2021
@hlashbrooke
Copy link
Collaborator

I've renamed this to be more accurate for what needs to be done now.

Other work has been one and the only outstanding task is to fix the quiz button styling.

The quiz buttons look like this:
Screenshot 2021-09-09 16 17 39

But they should look like the ones in the lessons like this:
Screenshot 2021-09-09 16 17 53

@hlashbrooke hlashbrooke added the Priority - High High priority issue. label Sep 9, 2021
@coreymckrill coreymckrill removed their assignment Sep 22, 2021
@hlashbrooke
Copy link
Collaborator

I did some digging in the code here and it looks like we need to remove the button class from the quiz buttons and the styling will match up. These buttons are created by Sensei in includes/class-sensei-quiz.php from line 1353 and include the full markup. I'm not sure what the best way would be to remove that class, but it feels like a JS call to do it would be the simplest.

@hlashbrooke hlashbrooke added Priority - Low Low priority issue. and removed Priority - High High priority issue. labels Jan 6, 2022
@hlashbrooke hlashbrooke added this to Issues in Website Development Mar 2, 2022
@hlashbrooke
Copy link
Collaborator

This is resolved now that we are using Sensei's Learning Mode, so I'm closing this issue.

Website Development automation moved this from Issues to Done Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Component] Learn Theme Website development issues related to the Learn theme. [Component] Sensei Website development issues related to the Sensei plugin installed on Learn. Priority - Low Low priority issue. [Type] Bug Something isn't working on the Learn website. [Type] Good First Issue Good website development issue for new contributors.
3 participants