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

enhance(macros/SeeCompatTable): refer to BC table only if it exists #11291

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

caugner
Copy link
Contributor

@caugner caugner commented Jun 11, 2024

Summary

Fixes #11290.

Problem

The {{SeeCompatTable}} macro refers to the browser compatibility table, even if the page doesn't have one.

Solution

Only show it on pages that have a browser-compat frontmatter key.


Screenshots

Before

image

After

image

How did you test this change?

Ran yarn dev locally and checked the following pages:

@caugner caugner requested a review from a team as a code owner June 11, 2024 22:12
@github-actions github-actions bot added the macros tracking issues related to kumascript macros label Jun 11, 2024
@OnkarRuikar
Copy link
Contributor

Need to fix in Deprecated_Header.ejs, secureContext_header.ejs, and baseline-indicator.tsx as well.

@caugner caugner marked this pull request as draft June 14, 2024 09:44
@caugner
Copy link
Contributor Author

caugner commented Jun 14, 2024

Deprecated_Header.ejs, secureContext_header.ejs

These are not trivial fixes, because the reference is in the middle of the text, so I won't fix them here.

baseline-indicator.tsx

@OnkarRuikar This one would be easier to fix, but would you have an example for a page that has a baseline banner but no BCD table?

@OnkarRuikar
Copy link
Contributor

OnkarRuikar commented Jun 15, 2024

These are not trivial fixes, because the reference is in the middle of the text, so I won't fix them here.

Easiest way would be to maintain two versions of the whole strings.

@OnkarRuikar This one would be easier to fix, but would you have an example for a page that has a baseline banner but no BCD table?

Looks like as per the implementation it is not possible. We don't have to do anything in the PR for this.

@github-actions github-actions bot added the idle label Jul 17, 2024
@github-actions github-actions bot removed the idle label Aug 16, 2024
@github-actions github-actions bot added the idle label Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idle macros tracking issues related to kumascript macros
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Broken link to browser compatability section in API landing pages
2 participants