Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue URL: internal
What is the current behavior?
Commented-out code scattered across
src/andscripts/, none of it reachable.The largest is 111 lines in
scripts/cli.mjs: six commented-outrender*functions. They render Stencil component tables (properties withattranddefault, events, slots), but that script generates CLI command pages, whose data hasinputsandoptionsinstead. Working versions of all six already live inplugins/docusaurus-plugin-ionic-component-api. The script was started from that generator as a template and the inapplicable parts were commented rather than deleted.What is the new behavior?
141 lines removed, and one comment turned into the fix it was pointing at.
Removed:
scripts/cli.mjs— the six render functions and a debugconsole.log_code.scss— a 15-line block labelled "alternative solution ... with it's own drawbacks", and a leftoverpaddingdemo.css— a disabled@media (max-width: 1160px)ruleCodepen— a debugconsole.log. Itsstatusvariable existed only to feed it, so theuseScriptcall is now assignment-free._markdown.scss— a leftoverletter-spacingDocsButtonhad// const isInternal = /^\/docs/.test(href);, an unfinished attempt at whatDocsCardalready does. Rather than delete the idea, the component now uses Docusaurus'sLink, which routes internal hrefs client-side and addstarget="_blank"plusrel="noopener noreferrer"to external ones. That's less code than the check would have been. It also fixes the href:href="theming"was resolving against the browser URL, and now resolves to/docs/developer-resources/guides/first-app-v4/theming.Also fixes the developer-resources redirect, which was scoped to v5 and current only. It now covers every version, which is what "developer resources live at ionic.io now" implies.
Does this introduce a breaking change?
Other information
The
DocsButtonchange can only be verified locally, sincevercel.jsondoesn't apply tonpm start:/docs/developer-resources/guides/first-app-v4/creating-photo-gallery-device-storageThe Continue button at the bottom should navigate without a full page reload. Every
hrefusage ofDocsButtonsits on a developer-resources page, and the redirect fix in this PR sends all of those off-site, so there's no preview URL that exercises it. Its only other usages are ~180 archived v5 native pages that pass nohrefand take the<button>branch.That's worth knowing beyond this PR: if developer-resources is gone for good,
DocsButton's linking path is effectively dead and the component deserves the same audit treatment asion-icon.