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

776 add question help #890

Merged
merged 11 commits into from
Jan 16, 2022
Merged

776 add question help #890

merged 11 commits into from
Jan 16, 2022

Conversation

Ancentury
Copy link
Contributor

No description provided.

@Ancentury Ancentury requested a review from MrDeshaies January 10, 2022 02:05
@Ancentury Ancentury self-assigned this Jan 10, 2022
@Ancentury Ancentury linked an issue Jan 10, 2022 that may be closed by this pull request
@MrDeshaies
Copy link
Contributor

The current button to show help is too prominent, it is too big and loud. Instead, it should be a small neutral icon so as to not attract undue attention.

image

An "i" in a circle is a popular tooltip/help icon. Could something like this be used instead?
image

@Ancentury
Copy link
Contributor Author

Changed to "i" icon. Please check again.

@MrDeshaies
Copy link
Contributor

Changed to "i" icon. Please check again.

The icon looks good :)

@MrDeshaies
Copy link
Contributor

There's a bug. When there are more than two questions in the same section with help text, all questions display the help for the last question. I think Home.vue, line 161, is the problem.

document.getElementById("helpText")!.innerHTML = helpTxt;

This should be done in the handler showHelp() defined in index.html, not as part of rendering the questions for the section in Home.vue.

@Ancentury
Copy link
Contributor Author

Nice catch. Fixed. Please check again.

helpTxt = helpTxt
.replace(/&/g, '&')
.replace(/"/g, '"')
.replace(/'/g, 'ooooo')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure this escape makes sense. I think this replace section should just be using something like https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good eye. This escape is similar to encodeURIComponent, but add some more escape, and work around.

@MrDeshaies MrDeshaies merged commit c52b009 into master Jan 16, 2022
@MrDeshaies MrDeshaies deleted the 776-add-question-help branch January 16, 2022 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add question contextual help
3 participants