feat(homepage): redraw the architecture diagram and keep its source - #2094
Open
shreemaan-abhishek wants to merge 3 commits into
Open
feat(homepage): redraw the architecture diagram and keep its source#2094shreemaan-abhishek wants to merge 3 commits into
shreemaan-abhishek wants to merge 3 commits into
Conversation
The old architecture.svg was an exported drawing with no source, so it could only be replaced wholesale. Redraw it as HTML/CSS and commit the generator alongside the output. - scripts/architecture/arch.html is the drawing: a 1200x738 canvas of absolutely-positioned boxes plus one SVG layer for the connectors, so boxes and the wires that land on them share a coordinate space. - scripts/architecture/render.sh shoots it in headless Chrome at 2x and palette-reduces to public/img/architecture.png (2400x1476, ~73 KB). Chrome writes the screenshot and can then sit there instead of exiting, so render.sh waits on the output file and kills the process.
The Astro homepage replaces index.html, so this section no longer reaches users, but it still compiled and pulled in a 35 KB SVG. Removes the component, its scss, the two SVGs it exclusively imported, and the now-dead architecture.component.* zh translations. The scss also declared .testimonials-head, .docs-promo-head, .add-left-margin and .arch-scale-svg. customTheme.scss already declares all of them, and .add-left-margin (Benefits.tsx) is the only one that appears in any markup, so nothing loses styling.
…diagram # Conflicts: # website/src/pages/index.tsx
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.
Follow-up to #2073.
Architecture diagram
The homepage architecture diagram was an exported
architecture.svgwith no source, so any change meant redrawing it from scratch. This replaces it with a generated PNG plus the generator that produces it:next/scripts/architecture/arch.htmlis the drawing: a 1200x738 canvas of absolutely-positioned boxes plus one SVG layer for the connectors, so boxes and the wires that land on them share a coordinate space.next/scripts/architecture/render.shshoots it in headless Chrome at 2x and palette-reduces the result tonext/public/img/architecture.png(2400x1476, ~73 KB).Edit the HTML and re-render; the PNG is generated output. Documented in
next/README.md.Two notes on the script:
render.shwaits on the output file and kills the process rather than waiting on it.HomePage.astro, the mobile pan rule inglobal.css, and the asset assertion indeploy.ymlall move from the SVG to the PNG.Dead Docusaurus section
website/src/components/sections/Architecture.tsxstill imported the oldArchitecture-min.svg. Since the Astro build replacesindex.html, that section no longer reaches users, but it still compiled and pulled in a 35 KB SVG. Removed, along with its scss, the two SVGs it exclusively imported, and the now-deadarchitecture.component.*zh translations.The scss also declared
.testimonials-head,.docs-promo-head,.oss-promo-head,.add-left-marginand.arch-scale-svg.customTheme.scssalready declares all of them, and.add-left-margin(used byBenefits.tsx) is the only one that appears in any markup, so nothing loses styling.Verification
npx astro buildpasses, 36 pages.dist/img/architecture.pngis present, with noarchitecture.svgor stray variants left behind.website/src/pages/index.tsxparses clean under esbuild after the import removal.i18n/zh/code.jsonis still valid JSON.The full Docusaurus build was not run locally, so CI is what will confirm that half. The change there is a deletion of an unreferenced component.