mdn / translated-content

The source repository of all translated content for MDN Web Docs
https://developer.mozilla.org/en-US/docs/MDN/Community/Contributing/Translated_content
Other
1.65k stars 8k forks source link

wrong layout in link #20809

Open uiolee opened 1 month ago

uiolee commented 1 month ago

MDN URL

https://developer.mozilla.org/zh-CN/docs/Mozilla/Add-ons/WebExtensions/Your_first_WebExtension

与此议题相关的小节或标题?

https://developer.mozilla.org/zh-CN/docs/Mozilla/Add-ons/WebExtensions/Your_first_WebExtension#%E6%89%93%E5%8C%85%E5%92%8C%E5%8F%91%E5%B8%83

哪些信息是错误、无用或不完善的?

wrong layout. extra white space.

layout

你期望看到什么?

Generally speaking, you don't need that much white space between lines

你有什么支持的链接、参考或引用?

No response

你还想补充什么内容?

No response

MDN metadata

Page report details * Folder: `zh-cn/mozilla/add-ons/webextensions/your_first_webextension` * MDN URL: https://developer.mozilla.org/zh-CN/docs/Mozilla/Add-ons/WebExtensions/Your_first_WebExtension * GitHub URL: https://github.com/mdn/translated-content/blob/main/files/zh-cn/mozilla/add-ons/webextensions/your_first_webextension/index.md * Last commit: https://github.com/mdn/translated-content/commit/3f4a97f9f50d4acf0c84558ac9d02469d3589e2c * Document last modified: 2023-08-31T02:30:56.000Z
jasonren0403 commented 1 month ago

This may be related to display: inline-block; on external links

image image image

I think it's a platform issue.

jasonren0403 commented 1 month ago

/cc @mdn/core-dev

T34-active commented 1 month ago

/cc @caugner, Please help move this issue to yari.

yin1999 commented 2 weeks ago

I found the problem that caused this:

The link /zh-CN/docs/Mozilla/Add-ons/WebExtensions/Publishing_your_WebExtension has been redirected to https://extensionworkshop.com/documentation/publish/package-your-extension/, and the redirect rule only exists in the default locale. So the mutateLink() function will be called with the enUSFallback parameter been set, which result in the addition of only-in-en-us class. However, since the fallback link is an external link, the external class will also be added, and these two classes are conflicting.

I think it would be better to check the fallback link within the mutateLink() function.


I've created a PR (#21711) to fix this, but it still worth to resolve the conflicting in yari :)

jasonren0403 commented 3 days ago

keep reopen unless fixed by yari side

uiolee commented 2 days ago

Maybe it should be moved to yari