-
Notifications
You must be signed in to change notification settings - Fork 264
Update error.xml #630
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
Update error.xml #630
Conversation
Fix issue jquery#143.
@@ -52,6 +52,15 @@ $( "img" ) | |||
}) | |||
.attr( "src", "missing.png" ); | |||
]]></code> | |||
<p>In the example, missing.png is an hypotetical missing image that is used to trigger the <code>error</code> event, not an image to replace those giving an error. To do that, you have to modify the body of the anonymous function passed to <code>.error()</code> as shown below:</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.
hypothetical
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.
Typo corrected. Sorry about that.
Fixed typo
Added semicolon after the word "exists" as per request.
This PR looks good to me. Shall I merge? |
}) | ||
.attr( "src", "missing.png" ); | ||
]]></code> | ||
<p><b>Note:</b> Be sure that the replacement image exists; otherwise the <code>error</code> event will be triggered indefinitely.</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.
the indentation for this line seems wrong.
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.
Also, I don't think <p>
tags are allowed in <example>
s. This just results into this: http://gyazo.com/f7795ca0fd998b6701b68bbb322fed0d (notice your extra info inside the <p>
isn't rendered).
@AurelioDeRosa Do you have a working local docs setup? Normally you should be able to repro that there. If you don't, ping me on IRC and I'll be happy to help you out.
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.
ping @AurelioDeRosa
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.
@arthurvr I'm going to take care of this issue right now. Sorry for the delay.
As @arthurvr noted, the current version of the XSL file doesn't allow to have a paragraph in an |
I think that notes were intended for small notes and not big clips with paragraphs and examples. If we allow big clips and block elements like code, it may affect layout in a drastic way so that's something to take into consideration. |
Well you for sure can't just throw arbitrary markup into |
What's your suggestion to rearrange the code to have a description? |
That's hard to say because I can't tell what you're trying to do. Are you trying to create an inline runnable example that is accompanied by a code block explaining how to do something? This is very different from the way any other page is designed. |
In this case I'd opt to move some stuff in the
This is kinda off-topic for this PR, and should be discussed in |
The
We certainly shouldn't open an issue for grunt-jquery-content until we know what we're actually discussing. I'd like to hear from @AurelioDeRosa since he sent the PR which contains two |
@scottgonzalez The PR addresses #413. The idea is to have a description of what's going on in the example for the benefit of some users. |
Sounds like what you really want is a new, useful example. |
I'd not say that a new example will solve the problem. The problem was the user didn't get what the example really did. Perhaps @arthurvr's suggestion of having a few comments in the code can fix this. |
@arthurvr @scottgonzalez Should I try to submit a PR which has JavaScript comment so that we can review it? |
sure |
I'd love to move forward on this PR. ping @AurelioDeRosa |
Removed all the paragraphs inside the examples.
PR updated @arthurvr. |
@@ -20,7 +20,7 @@ | |||
</argument> | |||
</signature> | |||
<longdesc> | |||
<p>This method is a shortcut for <code>.on( "error", handler )</code>.</p> | |||
<p><b>As of jQuery 1.8</b>, the <code>.error()</code> method is deprecated. Use <code>.on( "error", handler )</code> to attach event handlers to the <code>error</code> event instead.</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.
This is a totally unrelated change. Mind extracting this to its own commit?
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.
ping @AurelioDeRosa ;)
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.
hey-hey @AurelioDeRosa still interested in picking this up?
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.
ping @AurelioDeRosa
PR updated @arthurvr. Sorry for the late change. |
@AurelioDeRosa I liked the change, it was just unrelated to the thing you're trying to fix, so it should have been in a separated commit. I didn't mean you should remove the change 😉 |
@arthurvr I was thinking about opening a different PR for it, that's why I removed it. |
Makes sense. Thanks. |
@@ -20,7 +20,6 @@ | |||
</argument> | |||
</signature> | |||
<longdesc> | |||
<p>This method is a shortcut for <code>.on( "error", handler )</code>.</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.
This paragraph shouldn't be removed (or at least not in this commit).
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.
Oh... 🐑, you're right!
Can someone check the updated PR so that we can merge it? |
</longdesc> | ||
<example> | ||
<desc>To hide the "broken image" icons for IE users, you can try:</desc> | ||
<desc>To hide the "broken image" icons for users of older versions of IE, you can write:</desc> |
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.
of older versions of IE
Which versions does that affect?
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.
I remember is IE <= 10 but I can't find any reference. Someone with a hint on this?
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.
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.
ping @AurelioDeRosa @dmethvin @timmywil is there anyone who knows this? If not I'll quickly test this out.
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.
Yeah, I mentioned elsewhere that I'm not sure when the "broken image" thing went away. Probably before IE9?
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.
Should we specify IE9 for now and update in case of mistake?
This PR is standing from a few months. Is anyone happy to specify IE9 and merge it? |
Looks like this has been settable from at least IE and Firefox for years: http://stackoverflow.com/questions/1694937/firefox-show-broken-images However, I couldn't find out when the default was changed. How about if we just delete the example? There is still a good one there. |
@dmethvin Thank you for the feedback. I've updated the PR based on your comment. |
lgtm 👍 |
Fixes jquerygh-143 Closes jquerygh-630
Fix issue #413.