-
Notifications
You must be signed in to change notification settings - Fork 22.5k
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 content and display bug on videoWidth page #4059
Conversation
Preview URLsFlawsURL:
External URLsURL: |
@@ -21,8 +21,7 @@ | |||
<p><span class="seoSummary">The {{domxref("HTMLVideoElement")}} interface's read-only | |||
<code><strong>videoWidth</strong></code> property indicates the <strong>intrinsic | |||
width</strong> of the video, expressed in CSS pixels. In simple terms, this is the | |||
width of the media in its natural size.</span> See {{anch("About intrinsic width and | |||
height")}} for more details.</p> | |||
width of the media in its natural size.</span> See {{Glossary("Intrinsic size")}} for more details.</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 broken on the Preview URL https://pr4059.content.dev.mdn.mozit.cloud/en-US/docs/Web/API/HTMLVideoElement/videoWidth, but exists https://developer.mozilla.org/en-US/docs/Glossary/Intrinsic_Size, what am I missing?
I changed the casing before from "Intrinsic size" to "Intrinsic Size" but didn't see an update on the Preview URL on the prior PR. Where to learn more about the macros?
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.
Sorry about the Preview URLs. This preview just landed the other week and there were problems with caching. Likely why you didn't see updates.
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.
So, this means to link to the section that the {{page}} macro below should render but doesn't. I see you fixed that {{page}} macro call, so I reckon we can have the anchor back. What do you think?
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.
@Elchi3 Thank you for your help!
Sounds good, made that change. I'm stumped why the link has an extra _
though?
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.
How strange?! Is it because there is a line break in line 24 and 25 in the middle of the {{anch}} macro call? Can you try making that one line and see if that fixes it?
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.
@Elchi3 Tried that and undid the commit. FWIW it's wrong on production https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement/videoWidth#about_intrinsic_width_and__height, seems like a legit bug with anch
.
I can change the heading to "About" (one word) or something, but wasn't sure how you want to proceed?
Also, I can file an issue / look into it if you can advise where it is? Took a quick look at mdn
on GitHub but didn't know.
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, that's so weird! We don't really like our macros and so we could also avoid the macro call altogether and use good old HTML (we plan to convert the HTML to markdown and so the less macros the better).
The anch code lives here: https://github.com/mdn/yari/blob/main/kumascript/macros/anch.ejs
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.
@Elchi3 aha, yes migrating to HTML sounds great. Thanks for sharing the macro anyways!
The fix looks good on the latest preview URL #4059 (comment), and I squashed my commits, take a look at your convenience.
Preview URLsFlawsURL:
External URLsURL: |
d713ffc
to
bc6d95f
Compare
Preview URLsFlawsURL:
External URLsURL: |
One last note, thanks for bearing with me: I can fix the broken link to |
Ping @Elchi3. |
hm interesting. Not sure if |
Preview URLsFlawsURL:
External URLsURL: |
Preview URLsFlawsURL:
External URLsURL: |
Preview URLsFlawsURL:
unable to find an HTML element with an "id" of "About_intrinsic_width_and__height" within /en-us/docs/web/api/htmlvideoelement/videoheight` External URLsURL: |
2270d01
to
02da037
Compare
Preview URLsFlawsURL:
External URLsURL: |
Preview URLsFlawsURL:
External URLsURL: |
Resolves: mdn#1657 Use HTML instead of anch macro
f433e2a
to
89ed713
Compare
Preview URLsFlawsURL:
External URLsURL: |
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.
Thanks for your patience with this one, @amyrlam! Congrats on landing your first PR to MDN! 🎉
Thank you @Elchi3 for all of your help! |
https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement/videoWidth
Resolves: #1657
I'm not sure how to run things locally (is that expected? didn't see it in the README or elsewhere) so am trying this since the Preview URL on #4058 doesn't seem to reflect changes made in later commits(?). Not sure what I'm missing yet.