Skip to content

Commit 014680e

Browse files
committed
perf(kanvas): lazy-load non-critical sections
Signed-off-by: Azizah2023 <[email protected]>
1 parent 84a664c commit 014680e

File tree

108 files changed

+777
-484
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+777
-484
lines changed

package-lock.json

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/Learn-Components/Pagination/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ const Pagination = ({ TOCData, chapterData, location }) => {
4747
<Button $secondary title="Next Chapter"
4848
className="next-chapter-btn"
4949
$url={`/learn/learning-paths/${chapterData.fields.learnpath}/${chapterData.fields.course}/${getActiveServiceMesh(chapterData)}/${nextChapter}/`}
50-
$external={false} />
50+
$external={false}
51+
/>
5152
</div>
5253
</div>
5354
</PaginationWrapper>)

src/components/Learn-Components/QuizModal/quiz-component.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ const ResultBox = ({ score, resetQuiz,correct, incorrect,total }) => (
3333
<div onClick={resetQuiz}>
3434
<Button $secondary title="Go to Learning Paths"
3535
$url={"/learn/learning-paths"}
36-
$external={false} />
36+
$external={false}
37+
/>
3738
</div>
3839
</div>
3940
</div>
@@ -118,7 +119,8 @@ const QuestionBox = (props) => {
118119
<div className="quizbox__progress--score quizbox__progress--control" onClick={() => {
119120
props.prevQuestion();
120121
setSelectedAnswer(null);
121-
}}>
122+
}}
123+
>
122124
<BsArrowLeft className="quizbox__progress-control__icon"/>
123125
<label>Previous</label>
124126
</div>
@@ -127,7 +129,8 @@ const QuestionBox = (props) => {
127129
<div className="quizbox__progress--score quizbox__progress--control" onClick={() => {
128130
props.nextQuestion();
129131
setSelectedAnswer(null);
130-
}}>
132+
}}
133+
>
131134
<label>{props.answers.length === props.questionIndex ? "Finish" : "Next"} </label>
132135
<BsArrowRight className="quizbox__progress-control__icon"/>
133136
</div>

src/components/Pricing/PricingAddons/index.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,8 @@ export const PricingAddons = ({ isYearly = false, setIsYearly, currency, enterpr
279279
control={<Switch disabled
280280
checked={selectedSubAddOns["academy-theory"] || false}
281281
onChange={(e) => handleSubAddOnToggle("academy-theory", e.target.checked)}
282-
color="primary" />}
282+
color="primary"
283+
/>}
283284
sx={formControlStyles.base}
284285
/>
285286
<FeatureDetails
@@ -306,7 +307,8 @@ export const PricingAddons = ({ isYearly = false, setIsYearly, currency, enterpr
306307
control={<Switch sx={formControlStyles.switch}
307308
checked={selectedSubAddOns["academy-practical"] || false}
308309
onChange={(e) => handleSubAddOnToggle("academy-practical", e.target.checked)}
309-
color="primary" />}
310+
color="primary"
311+
/>}
310312
sx={formControlStyles.base}
311313
/>
312314
<FeatureDetails
@@ -395,7 +397,7 @@ export const PricingAddons = ({ isYearly = false, setIsYearly, currency, enterpr
395397
),
396398
})) || [];
397399
})()}
398-
/>
400+
/>
399401
<Box sx={boxStyles.disclaimerSection}>
400402
<Typography variant="body2" sx={typographyStyles.italic}>
401403
Looking for a plan larger than 2,500 learners? Great! <a href="/company/contact">Let us know</a>.

src/components/SMI-Table/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ const Table = ({ columns, data, spec }) => {
5656
<React.Fragment key={`row${i}`}>
5757
<tr key={`row${i}`} id={`row${i}`} className="primaryRow" {...row.getRowProps()} onClick={() => {
5858
let e = isCollapsed; e[i] = !isCollapsed[i]; setCollapse([...e]);
59-
}}>
59+
}}
60+
>
6061
<td>
6162
{
6263
(non_functional.find(ele => ele.name.includes(row.original.mesh_name))) ?

src/components/TopPromotionalBanner/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ const TopPromotionalBanner = () => {
77
<>
88
<TopBannercontainer>
99
<a href="https://meshery.io/blog/meshery-v07-release-announcement" rel="noreferrer" target="_blank"><p className="content"><img src={Rocket} alt="Five on rocket" /><span>Soar to New Heights with Meshery v0.7.0 &rarr;</span>{/* <span>Try it now &rarr;</span> */}
10-
</p></a>
10+
</p>
11+
</a>
1112
</TopBannercontainer>
1213
</>
1314
);

src/components/UpcomingEventCard/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ const UpcomingEvents = ({ data }) => {
1515
<div className="blog-slider swiper">
1616
<div style={{
1717
display: "block"
18-
}} className="blog-slider__wrp swiper-wrapper">
18+
}} className="blog-slider__wrp swiper-wrapper"
19+
>
1920

2021
<Swiper
2122
spaceBetween={50}

src/components/service-mesh-patterns-Table/Table.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ const Table = () => {
3434
<tr {...headerGroup.getHeaderGroupProps()}>
3535
{headerGroup.headers.map((column, index) => (
3636
<th key={index} {...column.getHeaderProps()}
37-
className={(column.Header == "Service Mesh Pattern" || column.Header == "Category") ? "table-header" : ""}>
37+
className={(column.Header == "Service Mesh Pattern" || column.Header == "Category") ? "table-header" : ""}
38+
>
3839
<div >
3940
{column.render("Header")}
4041
{(column.Header == "Service Mesh Pattern") ?

src/pages/cloud-native-management/catalog.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@ export default Catalog;
1414
export const Head = () => {
1515
return <SEO title="Cloud Native Catalog"
1616
description="The Kubernetes and Cloud Native Catalog. Build, share, innovate with CNCF project-curated best practices."
17-
image="/images/meshery-logo-dark-text.webp" />;
17+
image="/images/meshery-logo-dark-text.webp"
18+
/>;
1819
};

src/pages/cloud-native-management/generate-aws-architecture-diagram.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@ export default Aws;
1414
export const Head = () => {
1515
return <SEO title="AWS Architecture Diagram"
1616
description="Create your own AWS architecture diagrams with Kanvas."
17-
image="/images/meshery-logo-dark-text.webp" />;
17+
image="/images/meshery-logo-dark-text.webp"
18+
/>;
1819
};

0 commit comments

Comments
 (0)