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

Improve tooltips #2189

Merged
merged 2 commits into from
Oct 21, 2014
Merged

Improve tooltips #2189

merged 2 commits into from
Oct 21, 2014

Conversation

ainslec
Copy link
Contributor

@ainslec ainslec commented Oct 12, 2014

Allow tooltips in div element (currently tooltips only allow items in pre element which is tricky to format). Also fix wrapping, remove gradient fill, and introduce a maximum width of 500px by default.

Allow tooltips in div element (currently tooltips only allow items in pre element which is tricky to format). Also fix wrapping, remove gradient fill, and introduce a maximum width of 500px by default.
@ainslec
Copy link
Contributor Author

ainslec commented Oct 12, 2014

Preview of the tooltip, some parts of the screenshot have been obfuscated.

Preview of the tooltip

Capping the tooltip size at 500px is somewhat arbitary, and perhaps there is a better solution, but, subjectively speaking I think it is a good value, and without it, larger blocks of context sensitive help is simply unreadable on very wide monitors.

Any constructive criticism welcome.

@@ -352,12 +352,13 @@ var Autocomplete = function() {

this.showDocTooltip = function(item) {
if (!this.tooltipNode) {
this.tooltipNode = dom.createElement("pre");
this.tooltipNode = item.docHTML ? dom.createElement("div") : dom.createElement("pre");
Copy link
Member

Choose a reason for hiding this comment

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

I think it would be ok to always use div

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Always use div is fine by me :-)

Removed style changes (no style changes are part of the PR).

Only change now should be that we create a <div/> element instead of a <pre/> element.
nightwing added a commit that referenced this pull request Oct 21, 2014
@nightwing nightwing merged commit af859e2 into ajaxorg:master Oct 21, 2014
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.

2 participants