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

Empty „see also” section #181

Closed
Ryuno-Ki opened this issue Dec 11, 2020 · 5 comments
Closed

Empty „see also” section #181

Ryuno-Ki opened this issue Dec 11, 2020 · 5 comments
Labels
Content:CSS Cascading Style Sheets docs effort: small This task is a small effort.

Comments

@Ryuno-Ki
Copy link
Collaborator

A few moments back, I noticed, that https://developer.mozilla.org/en-US/docs/Web/CSS/@media/forced-colors#See_also does not contain any values.

Looking into the repo, QuickLinks ought to be rendered there:

<h2 id="See_also">See also</h2>
<p>{{QuickLinksWithSubpages("/en-US/docs/Web/CSS/@media/")}}</p>

Could it show a „nothing found” instead? (or hide the section altogether)

@vkWeb
Copy link
Member

vkWeb commented Dec 12, 2020

@Ryuno-Ki Interesting ticket!

I think we should hide the see also section if results are not found to {{QuickLinksWithSubpages("/en-US/docs/Web/CSS/@media/")}}.

@peterbe what do you say on this?

@Ryuno-Ki
Copy link
Collaborator Author

I agree.
However, from a templating perspective, that would require, that the macro would likely to be adjusted (e.g. return a list), so to run a check to decide, whether to include the headline or not.

If that's not possible (e.g. the macro returns HTML), it is in the responsibility to return something, that nothing was found (instead of an empty string).

@peterbe
Copy link
Contributor

peterbe commented Jan 12, 2021

I think it's "foolish" to use a KS macro like that. Perhaps better to call it "overly complicated".
If the .../CSS/@media/forced-colors doesn't have a set of its own "See also" links, it shouldn't need to piggyback off another page. It leads to bugs/challenges like the one mentioned here in this issue where you can't programmatically know if it's going to yield anything. It also overly interconnects the documents. Now, this page has to assume that that other page has some juicy and good "See also" links. If it's really necessary, you can make it:

<h2>See also</h2>
<p>
  <a href="/en-US/docs/Web/CSS/@media#see_also">See the links for <code>@media</code></a>
</p>

or something like that.

@Rumyra Rumyra added needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. Content:CSS Cascading Style Sheets docs labels Jun 7, 2021
@rachelandrew rachelandrew added effort: small This task is a small effort. and removed needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Jun 9, 2021
@rachelandrew
Copy link
Collaborator

This doesn't appear to be the case anymore, the page in question has links in the See also section. So I'm going to close the issue, please re-open if you think I'm wrong.

If any of the other things about still require discussion, perhaps raise them in the Discussions section?

@Ryuno-Ki
Copy link
Collaborator Author

Fixed with #763 and #2819

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Content:CSS Cascading Style Sheets docs effort: small This task is a small effort.
Projects
None yet
Development

No branches or pull requests

5 participants