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

No way (flaws or build log) to detect errors in {{CSSInfo}} #161

Open
3 tasks done
teoli2003 opened this issue Mar 17, 2023 · 3 comments
Open
3 tasks done

No way (flaws or build log) to detect errors in {{CSSInfo}} #161

teoli2003 opened this issue Mar 17, 2023 · 3 comments
Labels
enhancement Improves an existing feature. idle Issues and pull requests with no activity for three months.

Comments

@teoli2003
Copy link

Summary

The macro {{CSSInfo}} uses mdn/data to display its content.

When there is no matching entre in mdn/data, the macro generate a text in red as error:
Capture d’écran 2023-03-17 à 07 52 20

This is good, but not enough: we detect such error only by visiting the page.

We need a way to detect all pages in error. For similar problems, errors are displayed in one of the two following ways:

  • As a flaw (this is the case when the {{Compat}} macro doesn't find the info)
  • In the build error log (this is the case when a Prism language tag is not supported).

Both cases allow us to find, track and fix these problems (I have no strong feelings)

URL

http://developer.mozilla.org/en-US/docs/Web/CSS/font-palette

Reproduction steps

  1. Go to http://developer.mozilla.org/en-US/docs/Web/CSS/font-palette
  2. There is the red message but nothing in the build log or in the flaws

Expected behavior

An error in the flaw list OR in the build log (no strong feeling about which one is the best!)

Actual behavior

No error outside the page itself

Device

Desktop

Browser

Chrome

Browser version

Stable

Operating system

Android

Screenshot

No response

Anything else?

No response

Validations

@github-actions github-actions bot added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Mar 17, 2023
@teoli2003
Copy link
Author

Note that I know how to fix mdn/data; what I need is a way to detect these without visiting the output of the 11000 pages 😉

@caugner
Copy link
Contributor

caugner commented Mar 20, 2023

what I need is a way to detect these without visiting the output of the 11000 pages 😉

As a workaround, you could run:

yarn build --nohtml --locale en-us
rg -l 'Value not found in DB!' client/build

It currently gives:

client/build/en-us/docs/web/css/view-transition-name/index.json
client/build/en-us/docs/web/css/font-palette/index.json
client/build/en-us/docs/web/css/-webkit-text-security/index.json
client/build/en-us/docs/web/css/@page/page-orientation/index.json
client/build/en-us/docs/web/css/font-variant-emoji/index.json
client/build/en-us/docs/web/css/@font-palette-values/override-colors/index.json
client/build/en-us/docs/web/css/@font-palette-values/font-family/index.json
client/build/en-us/docs/web/css/@font-palette-values/base-palette/index.json
client/build/en-us/docs/web/css/@font-palette-values/index.json
client/build/en-us/docs/web/css/user-modify/index.json
client/build/en-us/docs/web/css/page/index.json
client/build/en-us/docs/web/css/-webkit-mask-box-image/index.json

@caugner caugner added enhancement Improves an existing feature. and removed needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Mar 20, 2023
@github-actions github-actions bot added the idle Issues and pull requests with no activity for three months. label Jan 24, 2024
@caugner caugner transferred this issue from mdn/yari Mar 14, 2025
@caugner
Copy link
Contributor

caugner commented Mar 14, 2025

It looks like rari does not emit an issue (flaw) either when the CSSInfo doesn't find an entry:

pub fn write_missing(out: &mut String, locale: Locale) -> Result<(), DocError> {
let missing = l10n_json_data("CSS", "missing", locale)?;
Ok(write!(out, "<span style=\"color:red;\">{missing}</span>")?)
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improves an existing feature. idle Issues and pull requests with no activity for three months.
Projects
None yet
Development

No branches or pull requests

2 participants