Skip to content

Commit

Permalink
Merge pull request #7550 from Automattic/change/improve-lesson-tour-e…
Browse files Browse the repository at this point in the history
…xperience

Improve lesson tour experience
  • Loading branch information
renatho authored Mar 20, 2024
2 parents ea662f1 + 2acab6f commit 6de461d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
13 changes: 8 additions & 5 deletions assets/admin/tour/lesson-tour/steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -465,11 +465,14 @@ export default function getTourSteps() {
// Focus on answer feedback field and highlight answer feedback areas.
{
action: () => {
document
.querySelector(
'.sensei-lms-question__answer-feedback__content .block-editor-rich-text__editable'
)
.focus();
const correctAnswerField = document.querySelector(
'.sensei-lms-question__answer-feedback__content .block-editor-rich-text__editable'
);

correctAnswerField.focus();
correctAnswerField.scrollIntoView( {
block: 'center',
} );

highlightElementsWithBorders( [
'.sensei-lms-question__answer-feedback--correct',
Expand Down
4 changes: 4 additions & 0 deletions assets/admin/tour/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@

.wpcom-tour-kit .tour-kit-frame__container {
box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.25);

&:hover {
z-index: 9999999999;
}
}

.wpcom-tour-kit-step-card {
Expand Down

0 comments on commit 6de461d

Please sign in to comment.