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

refactor(5448): changes related to SEO #5580

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import mergeDesign from "../images/merge-design.gif";
import connectComponents from "../images/connect-components.gif";
import shareDesign from "../images/share-design.gif";


const CONTENT = [
{
title: "Confidently make changes to your infrastructure",
Expand Down Expand Up @@ -88,4 +87,3 @@ export const MeshmapMobileSwiper = () => {
</SwiperContainer>
);
};

4 changes: 2 additions & 2 deletions src/sections/Meshmap/Meshmap-design/meshmap-design-banner.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ const MeshmapDesignBanner = () => {
<Button secondary title="Experience context-aware design" url="https://meshery.layer5.io" external={ true } />
<h5>Upload your Helm Chart or Kubernetes manifest to have your infra diagrammed</h5>
</div>
<img className="dots-upper" src={BackgroundDotsPattern} />
<img className="dots-lower" src={BackgroundDotsPattern} />
<img className="dots-upper" src={BackgroundDotsPattern} alt="dots"/>
<img className="dots-lower" src={BackgroundDotsPattern} alt="dots"/>
</DesignBannerWrapper>

);
Expand Down
10 changes: 2 additions & 8 deletions src/sections/Meshmap/Meshmap-design/meshmap-design-hero.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import MeshmapLocatorDark from "./images/meshmap-locator-dark.svg";
import MeshmapImageBottomLight from "./images/meshmap-bottom-image-light.svg";
import MeshmapImageBottomDark from "./images/meshmap-bottom-image-dark.svg";
import { useInView } from "react-intersection-observer";
import { useState } from "react";
import { useStyledDarkMode } from "../../../theme/app/useStyledDarkMode";

const HeroSectionWrapper = styled.div`
Expand Down Expand Up @@ -77,11 +76,6 @@ const HeroSectionWrapper = styled.div`

const MeshmapHeroSection = () => {
const [locatorRef, inView] = useInView({ threshold: 0.8 });
const [imageInView, setimageInView] = useState(false);
if (inView && !imageInView)
setimageInView(true);
else if (imageInView && !inView)
setimageInView(false);

const { isDark } = useStyledDarkMode();

Expand All @@ -92,8 +86,8 @@ const MeshmapHeroSection = () => {
<p>MeshMap is the world’s only visual designer for Kubernetes and cloud native applications. Design, deploy, and manage your Kubernetes-based, cloud native deployments allowing you to speed up infrastructure configuration.</p>
</div>
<div className="hero-image">
<img className={imageInView ? "locator-moving" : "locator"} src={isDark ? MeshmapLocatorDark : MeshmapLocatorLight} alt="locator" />
<img className={imageInView ? "map map-visible" : "map"} src={isDark ? MeshmapImageBottomDark : MeshmapImageBottomLight} alt="integrations" ref={locatorRef} />
<img className={inView ? "locator-moving" : "locator"} src={isDark ? MeshmapLocatorDark : MeshmapLocatorLight} alt="locator" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you explain this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is small refactoring related to state management, based on this observation I have created another ticket refactor other pages: #5589

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This factor is also impacting performance as state gets changed it will re render page and current implementation can lead to infinite loop in some of the edge cases

<img className={inView ? "map map-visible" : "map"} src={isDark ? MeshmapImageBottomDark : MeshmapImageBottomLight} alt="integrations" ref={locatorRef} />
</div>
</HeroSectionWrapper>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import styled from "styled-components";
import { ReactComponent as IntegrationsImage } from "./images/integration-image-colorMode.svg";
import UnderlineImg from "./images/underline.svg";
import { useInView } from "react-intersection-observer";
import { useState } from "react";
import { useStaticQuery, graphql } from "gatsby";
import Button from "../../../reusecore/Button";
// import { useStyledDarkMode } from "../../../theme/app/useStyledDarkMode";
Expand Down Expand Up @@ -92,7 +91,6 @@ const IntegrationsSectionWrapper = styled.div`

const MeshmapIntegrationsSection = () => {
const [diagramRef, inView] = useInView({ threshold: 0.6 });
const [imageInView, setimageInView] = useState(false);

const integrations = useStaticQuery(graphql`
query {
Expand All @@ -106,8 +104,6 @@ const MeshmapIntegrationsSection = () => {
}
}
`);
if (inView && !imageInView) setimageInView(true);
else if (imageInView && !inView) setimageInView(false);

// const { isDark } = useStyledDarkMode();

Expand All @@ -120,7 +116,7 @@ const MeshmapIntegrationsSection = () => {
>
<IntegrationsImage
alt="integrations-img"
className={imageInView ? "diagram-visible" : "diagram-hidden"}
className={inView ? "diagram-visible" : "diagram-hidden"}
/>
</div>
<div className="hero-text">
Expand All @@ -131,7 +127,7 @@ const MeshmapIntegrationsSection = () => {
</h1>
</div>
<div>
<img className="underline-img" src={UnderlineImg} />
<img className="underline-img" src={UnderlineImg} alt="underline"/>
</div>
<div>
<h4>
Expand Down
1 change: 1 addition & 0 deletions src/sections/Meshmap/signup-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ const SignupForm = ({ targetRef }) => {
<img src={MeshMapDrafts} alt="MeshMap Draft" /></a><br />
<p><a target="_blank" href="https://twitter.com/layer5/status/1536832439833743363?s=20&t=oEDasGEBl8cvsA64P7NNTA" rel="noreferrer">Vote for your favorite design</a></p> */}
<iframe
title="Meshery, the collaborative Kubernetes manager"
width="95%"
height="100%"
src="https://www.youtube.com/embed/034nVaQUyME?si=Xip0JqrwiG2QY5vp"
Expand Down
2 changes: 1 addition & 1 deletion src/sections/Pricing/review-slider.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from "react";
import React, { memo } from "react";
import styled from "styled-components";
import Customers from "../../reusecore/Blockquote/Blockquote-image";
import Slider from "react-slick";
Expand Down