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

Validate frontmatter (and tags in particular) #7456

Open
jpmedley opened this issue Dec 16, 2020 · 7 comments
Open

Validate frontmatter (and tags in particular) #7456

jpmedley opened this issue Dec 16, 2020 · 7 comments
Labels
flaw-system issues and feature requests related to the flaws system idle on hold Waiting on something else before this can be moved forward. p3 We don't have visibility when this will be addressed. wx writer experience

Comments

@jpmedley
Copy link
Contributor

On the wiki adding standardized tags such as 'Interface', 'Method', 'Property' etc. was pretty foolproof. If a contributor typed even a part of a standard tag, a prompt would ensure that correct spelling and punctuation is used. This is not longer true, which opens the possibility of creating duplicate tags such as 'Property' and 'property'. Reviewers would reasonably think a single instance of one or the other were correct. Other variations 'PRoperty' could creep in through human error. I opened this issue because I corrected what I believe to be the first instance off this in mdn/content#31

Another solution would be to make grouping of pages under a tag case-insensitive. Given the nature of computer work, I can't prove that won't create an overloaded tag somewhere.

@jpmedley jpmedley added the enhancement Improves an existing feature. label Dec 16, 2020
@jpmedley jpmedley changed the title A build process should validate known tags A build process should validate against known tags Dec 16, 2020
@peterbe
Copy link
Contributor

peterbe commented Dec 16, 2020

pages under a tag case-insensitive.

Yes please! But it won't stop someone from typing proprety.

I went through the same problem with my Firebase app I'm hacking on. It's a document store so I basically rely on typing the same string exactly identical in multiple locations of the database. Sucks but everything as its trade-offs.

But how do you know what the valid tags are? Do you need to intimately know exactly what the relevant KS macro expects?
I.e. it's "attribute" not "member".
Does there exist a list somewhere?

We might want to transfer this issue to mdn/yari.

@peterbe
Copy link
Contributor

peterbe commented Dec 16, 2020

By the way, we could easily validate slugs and use the Flaw system to highlight the ones we don't like. But I still don't understand how you're supposed to know which ones are valid in the first place?

We can also break this down and switch to case insensitivity first if you think that's smart.

@jpmedley
Copy link
Contributor Author

I only intended to imply that we do it for certain known and previously standardized tags. Doing more than that is a longer discussion.

@peterbe
Copy link
Contributor

peterbe commented Dec 22, 2020

Even that isn't trivial. E.g. you can only become a member being by being one of the other members :)
Because that would require first traversing all existing documents to build up the set of allowed tag strings.

But there are other tricks we could consider such as a dedicated CLI tool that you manually execute once.
It could produce a little report that lists each tags and how often they appear. If a tag is the same as most others but in an unusual case, it could be highlighted.

@jpmedley
Copy link
Contributor Author

jpmedley commented Jan 5, 2021

We already have a list of standard tags. All I'm advocating here duplicating functionality that we had when this was a wiki. It's worth duplicating because that functionality prevented a lot of pain and an enormous amount of technical debt.

@himanshugarg
Copy link

From #7456

We might want to transfer this issue to mdn/yari.

@github-actions github-actions bot added the idle label Nov 24, 2021
@github-actions github-actions bot added the 🐌 idle Issues and PRs without recent activity. Flagged for maintainer follow-up. label Apr 17, 2022
@teoli2003 teoli2003 reopened this May 29, 2022
@github-actions github-actions bot added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label May 29, 2022
@sideshowbarker sideshowbarker removed the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label May 30, 2022
@Rumyra
Copy link
Contributor

Rumyra commented Oct 31, 2022

I'm going to move this issue to yari (as that's where it should live) but I'm going to add the on-hold label. From what i understand we are only using tags for experimental, deprecated et al and if we're able to power that a different way (say from bcd) we should be able to remove them.

Having said that this issue reminds us to validate front matter as a whole.

@Rumyra Rumyra transferred this issue from mdn/content Oct 31, 2022
@github-actions github-actions bot added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Oct 31, 2022
@Rumyra Rumyra added on hold Waiting on something else before this can be moved forward. and removed enhancement Improves an existing feature. 🐌 idle Issues and PRs without recent activity. Flagged for maintainer follow-up. needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. idle labels Oct 31, 2022
@caugner caugner added the p3 We don't have visibility when this will be addressed. label Nov 30, 2022
@caugner caugner changed the title A build process should validate against known tags Validate frontmatter (and tags in particular) Nov 30, 2022
@caugner caugner added flaw-system issues and feature requests related to the flaws system wx writer experience labels Nov 30, 2022
@github-actions github-actions bot added the idle label Dec 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flaw-system issues and feature requests related to the flaws system idle on hold Waiting on something else before this can be moved forward. p3 We don't have visibility when this will be addressed. wx writer experience
Projects
None yet
Development

No branches or pull requests

7 participants