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

UpEase-Framework Section #5

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 7 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
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"editor.formatOnSave": true,
"editor.tabSize": 2,
"editor.codeActionsOnSave": {
"source.fixAll": true
"source.fixAll": "explicit"
},
// Tailwind CSS Autocomplete, add more if used in projects
"tailwindCSS.classAttributes": [
Expand Down
10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,19 @@
"prepare": "husky install"
},
"dependencies": {
"@tsparticles/engine": "^3.4.0",
"@tsparticles/react": "^3.0.0",
"@tsparticles/slim": "^3.4.0",
"clsx": "^1.2.1",
"framer-motion": "^10.16.1",
"framer-motion": "^10.18.0",
"lucide-react": "^0.260.0",
"next": "^13.4.10",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-icons": "^4.10.1",
"react-intersection-observer": "^9.10.2",
"react-parallax-tilt": "^1.7.170",
"tailwind-merge": "^1.13.2"
"tailwind-merge": "^1.14.0"
},
"devDependencies": {
"@commitlint/cli": "^16.3.0",
Expand All @@ -53,7 +57,7 @@
"postcss": "^8.4.26",
"prettier": "^2.8.8",
"prettier-plugin-tailwindcss": "^0.1.13",
"tailwindcss": "^3.3.3",
"tailwindcss": "^3.4.3",
"typescript": "^4.9.5"
},
"lint-staged": {
Expand Down
10 changes: 10 additions & 0 deletions public/svg/downarrow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 13 additions & 7 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import * as React from 'react';

import AmsPlatform from '@/app/sections/ams-section';
import Contact from '@/app/sections/contact-section';
import FrameworkSection from '@/app/sections/framework-section';
import Hero from '@/app/sections/hero-section';
import IntroductionAms from '@/app/sections/introduction-ams-section';
import IntroductionSla from '@/app/sections/introduction-sla-section';
import Pricing from '@/app/sections/pricing-section';
import StudentApp from '@/app/sections/sla-section';
/**
* SVGR Support
Expand All @@ -28,25 +28,31 @@ export default function HomePage() {
<section id='upease-section-1'>
<Hero />
</section>
<div className='spacer' style={{ height: '100vh' }}></div>
<div className='spacer h-screen'></div>
Copy link

Choose a reason for hiding this comment

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

Use self-closing tags for elements without children.

- <div className='spacer h-screen'></div>
+ <div className='spacer h-screen' />

This change addresses the linting error regarding the use of self-closing elements for JSX elements without children.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<div className='spacer h-screen'></div>
<div className='spacer h-screen' />
Tools
Biome

[error] 32-32: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing. (lint/style/useSelfClosingElements)

Unsafe fix: Use a SelfClosingElement instead

<section className='bg-black ' id='upease-section-2'>
<IntroductionSla />
</section>
<section className='bg-black' id='upease-section-3'>
<section
className='h-screen snap-mandatory snap-center bg-black '
id='upease-section-3'
>
<FrameworkSection />
</section>
<section className='bg-black' id='upease-section-4'>
<StudentApp />
</section>
<section className='bg-black ' id='upease-section-4'>
<section className='bg-black ' id='upease-section-5'>
<IntroductionAms />
</section>
<section className='bg-black' id='upease-section-5'>
<section className='bg-black' id='upease-section-6'>
<AmsPlatform />
</section>
<section
{/* <section
className='bg-gradient-to-b from-[#F2F2F2] to-white '
id='upease-section-6'
>
<Pricing />s
</section>
</section> */}
<section className='bg-white' id='upease-section-7'>
<Contact />
</section>
Expand Down
43 changes: 43 additions & 0 deletions src/app/sections/framework-section.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import React from 'react';

import Graph from '@/components/Graph';
import { StickyScroll } from '@/components/ui/Sticky-scroll-reveal';

const FrameworkSection = () => {
const content = [
{
title: 'Student App',
description:
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed vitae metus quis orci pharetra fermentum. Pellentesque nec mi nec sem efficitur interdum. Mauris nec est quis turpis vehicula luctus, Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed vitae metus quis orci pharetra fermentum. Pellentesque nec mi nec sem efficitur interdum. Mauris nec est quis turpis vehicula luctu Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed vitae metus quis orci pharetra fermentum. Pellentesque nec mi nec sem efficitur interdum. Mauris nec est quis turpis vehicula luctus',
content: <Graph highlightedNumber={1} />,
},
{
title: 'Copilot Stack',
description:
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed vitae metus quis orci pharetra fermentum. Pellentesque nec mi nec sem efficitur interdum. Mauris nec est quis turpis vehicula luctus, Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed vitae metus quis orci pharetra fermentum. Pellentesque nec mi nec sem efficitur interdum. Mauris nec est quis turpis vehicula luctu Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed vitae metus quis orci pharetra fermentum. Pellentesque nec mi nec sem efficitur interdum. Mauris nec est quis turpis vehicula luctus',

content: <Graph highlightedNumber={2} />,
},
{
title: 'Upease Console',
description:
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed vitae metus quis orci pharetra fermentum. Pellentesque nec mi nec sem efficitur interdum. Mauris nec est quis turpis vehicula luctus, Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed vitae metus quis orci pharetra fermentum. Pellentesque nec mi nec sem efficitur interdum. Mauris nec est quis turpis vehicula luctu Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed vitae metus quis orci pharetra fermentum. Pellentesque nec mi nec sem efficitur interdum. Mauris nec est quis turpis vehicula luctus',

content: <Graph highlightedNumber={3} />,
},
{
title: 'Your App',
description:
'Lorem ipsum dopor sit amet, consectetur adipiscing elit. Sed vitae metus quis orci pharetra fermentum. Pellentesque nec mi nec sem efficitur interdum. Mauris nec est quis turpis vehicula luctus, Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed vitae metus quis orci pharetra fermentum. Pellentesque nec mi nec sem efficitur interdum. Mauris nec est quis turpis vehicula luctu Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed vitae metus quis orci pharetra fermentum. Pellentesque nec mi nec sem efficitur interdum. Mauris nec est quis turpis vehicula luctus',

content: <Graph highlightedNumber={4} />,
},
];
return (
<div className='h-full w-full'>
<StickyScroll content={content} />
</div>
);
};

export default FrameworkSection;
21 changes: 2 additions & 19 deletions src/app/sections/introduction-ams-section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,9 @@ import { motion } from 'framer-motion';
import React from 'react';

export default function IntroductionAms() {
// const targetRef = React.useRef(null);
// const { scrollYProgress } = useScroll({
// target: targetRef,
// offset: ['start end', 'end start'],
// });
// const borderRadius = useTransform(scrollYProgress, [0, 0.3], [150, 0]);

return (
<motion.section
// initial={{ y: 0, opacity: 0 }}
// transition={{ type: 'spring', stiffness: 100, damping: 15, delay: 1.3 }}
// animate={{ y: -300, opacity: 1 }}
// style={{
// borderTopLeftRadius: borderRadius,
// borderTopRightRadius: borderRadius,
// }}
// ref={targetRef}
className='flex h-full min-h-[50vh] flex-col items-center bg-black md:min-h-screen'
>
<div className='flex flex-1 items-center text-xl font-medium text-[#D4B9B9] sm:text-3xl md:text-4xl '>
<motion.section className='flex h-full min-h-[50vh] flex-col items-center bg-black md:min-h-screen'>
<div className=' flex flex-1 items-start text-xl font-medium text-[#D4B9B9] sm:text-3xl md:text-4xl '>
<p>Introducing</p>
</div>
<h1 className='h-100 w-3/4 flex-1 text-center text-5xl text-white sm:px-5 sm:text-6xl md:text-8xl'>
Expand Down
62 changes: 55 additions & 7 deletions src/app/sections/introduction-sla-section.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
import { motion, useScroll, useTransform } from 'framer-motion';
import React from 'react';

import { SparklesCore } from '@/components/ui/sparkles';

export default function IntroductionSla() {
const targetRef = React.useRef(null);
const targetRef = React.useRef<HTMLDivElement>(null); // Add type annotation to targetRef
const { scrollYProgress } = useScroll({
target: targetRef,
offset: ['start end', 'end start'],
});
const borderRadius = useTransform(scrollYProgress, [0, 0.3], [150, 0]);

const handleClick = () => {
if (targetRef.current) {
window.scrollTo({
top: targetRef.current.offsetTop,
behavior: 'smooth',
});
}
};

return (
<motion.section
initial={{ y: 0, opacity: 0 }}
Expand All @@ -19,14 +30,51 @@ export default function IntroductionSla() {
borderTopRightRadius: borderRadius,
}}
ref={targetRef}
className='mb-[-13rem] flex h-full min-h-[50vh] flex-col items-center bg-black md:min-h-screen'
onClick={handleClick}
className='mb-[-14rem] flex h-full min-h-[50vh] flex-col items-center bg-black md:min-h-screen'
>
<div className='flex flex-1 items-center text-xl font-medium text-[#D4B9B9] sm:text-3xl md:text-4xl '>
<p>Introducing</p>
<div className='mt-10 flex flex-1 flex-col items-center gap-6 text-xl font-medium text-[#D4B9B9] sm:text-3xl md:text-4xl '>
<motion.svg
className='hover:cursor-pointer'
xmlns='http://www.w3.org/2000/svg'
height='30'
width='20'
viewBox='0 0 320 512'
animate={{ y: [0, -10, 0, -5, 0, -2.5, 0] }}
transition={{ repeat: Infinity, duration: 1 }}
>
Copy link

Choose a reason for hiding this comment

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

The SVG element should have an accessible name or title for better accessibility.

<svg
  className='hover:cursor-pointer'
  xmlns='http://www.w3.org/2000/svg'
  height='30'
  width='20'
  viewBox='0 0 320 512'
  animate={{ y: [0, -10, 0, -5, 0, -2.5, 0] }}
  transition={{ repeat: Infinity, duration: 1 }}
+ aria-label="Scroll indicator"
>

Committable suggestion was skipped due low confidence.

<path
fill='#ffffff'
d='M2 334.5c-3.8 8.8-2 19 4.6 26l136 144c4.5 4.8 10.8 7.5 17.4 7.5s12.9-2.7 17.4-7.5l136-144c6.6-7 8.4-17.2 4.6-26s-12.5-14.5-22-14.5l-72 0 0-288c0-17.7-14.3-32-32-32L128 0C110.3 0 96 14.3 96 32l0 288-72 0c-9.6 0-18.2 5.7-22 14.5z'
/>
</motion.svg>
<p className='hover:cursor-pointer'>Introducing</p>
</div>
<div className='flex h-[40rem] w-full flex-col items-center justify-center overflow-hidden rounded-md bg-black'>
<h1 className='relative z-20 text-center text-2xl font-bold text-white md:text-5xl lg:text-8xl'>
Upease Framework
</h1>
<div className='relative h-40 w-[40rem]'>
{/* Gradients */}
<div className='absolute inset-x-20 top-0 h-[2px] w-3/4 bg-gradient-to-r from-transparent via-indigo-500 to-transparent blur-sm' />
<div className='absolute inset-x-20 top-0 h-px w-3/4 bg-gradient-to-r from-transparent via-indigo-500 to-transparent' />
<div className='absolute inset-x-60 top-0 h-[5px] w-1/4 bg-gradient-to-r from-transparent via-sky-500 to-transparent blur-sm' />
<div className='absolute inset-x-60 top-0 h-px w-1/4 bg-gradient-to-r from-transparent via-sky-500 to-transparent' />

{/* Core component */}
<SparklesCore
background='transparent'
minSize={0.4}
maxSize={1.5}
particleDensity={1200}
className='h-3/4 w-full'
particleColor='#FFFFFF'
/>

{/* Radial Gradient to prevent sharp edges */}
<div className='absolute inset-0 h-full w-full bg-black [mask-image:radial-gradient(350px_200px_at_top,transparent_20%,white)]'></div>
Copy link

Choose a reason for hiding this comment

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

JSX elements without children should be self-closing to follow best practices.

- <div className='absolute inset-0 h-full w-full bg-black [mask-image:radial-gradient(350px_200px_at_top,transparent_20%,white)]'></div>
+ <div className='absolute inset-0 h-full w-full bg-black [mask-image:radial-gradient(350px_200px_at_top,transparent_20%,white)]' />

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
<div className='absolute inset-0 h-full w-full bg-black [mask-image:radial-gradient(350px_200px_at_top,transparent_20%,white)]'></div>
<div className='absolute inset-0 h-full w-full bg-black [mask-image:radial-gradient(350px_200px_at_top,transparent_20%,white)]' />

</div>
</div>
<h1 className='h-100 w-3/4 flex-1 text-center text-5xl text-white sm:px-5 sm:text-6xl md:text-8xl'>
Student Lifecycle Management
</h1>
</motion.section>
);
}
68 changes: 68 additions & 0 deletions src/components/Graph.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
import { motion } from 'framer-motion';
import React from 'react';

function Graph({ highlightedNumber }: { highlightedNumber: number }) {
Copy link

Choose a reason for hiding this comment

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

Tip

Codebase Verification

The verification process did not reveal any tests specifically targeting edge cases for highlightedNumber in the Graph component. Additionally, the inspection of the Graph component's implementation did not show explicit handling for edge cases of highlightedNumber.

  • Ensure that the Graph component includes logic to handle edge cases for highlightedNumber, such as when it is out of the expected range or when it is not a valid number.
  • Add tests to cover these edge cases to ensure the robustness of the component.
Analysis chain

Graph component added. Ensure it handles edge cases for highlightedNumber.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify edge case handling for `highlightedNumber`.

# Test: Search for tests related to `highlightedNumber`.
rg 'highlightedNumber' --type js | rg 'test'

Length of output: 42



Script:

#!/bin/bash
# Description: Verify edge case handling for `highlightedNumber` in the Graph component.

# Step 1: Search for tests related to the Graph component.
rg 'Graph' --type js | rg 'test'

# Step 2: Inspect the Graph component for edge case handling logic.
ast-grep --lang tsx --pattern $'function Graph({ highlightedNumber }: { highlightedNumber: number }) {
  $$$
}' --debug

# Step 3: Check for any related utility functions or components that might handle edge cases.
rg 'highlightedNumber' --type js

Length of output: 391



Script:

#!/bin/bash
# Description: Verify edge case handling for `highlightedNumber` in the Graph component.

# Step 1: Search for tests related to the Graph component.
rg 'Graph' --type js | rg 'test'

# Step 2: Inspect the Graph component for edge case handling logic.
ast-grep --lang tsx --pattern $'function Graph({ highlightedNumber }: { highlightedNumber: number }) {
  $$$
}' --debug-query

# Step 3: Check for any related utility functions or components that might handle edge cases.
rg 'highlightedNumber' --type js

Length of output: 4121

const description = [
{ id: 1, nodes: ['Student App'] },
{ id: 2, nodes: ['Copilot Stack', 'UpEase Console', 'Your App'] },
{ id: 3, nodes: ['UpEase Framework', 'University Data Model'] },
{
id: 4,
nodes: ['Microsoft EDU', 'Office Apps', 'Multi Tenant', 'Microsoft AD'],
},
];

return (
<>
<div key='1' className='flex flex-col items-center gap-8'></div>
{description
.filter((item) => item.id === highlightedNumber)
.map((item, id) => (
<motion.div
initial={{
x: 1000,
opacity: 0,
}}
animate={{
x: 0,
opacity: 1,
}}
transition={{
ease: 'easeInOut',
duration: 0.5,
}}
key={id}
className='flex h-full w-full flex-col justify-around gap-6 rounded-lg p-6'
>
{item.nodes.map((node, index) => (
<motion.div
key={index}
className='flex h-1/4 rounded-lg border border-gray-200 bg-gray-400 p-6 text-center shadow-lg shadow-gray-300'
initial={{
x: 10000,
opacity: 0,
}}
animate={{
x: 0,
opacity: 1,
}}
exit={{
x: 10000,
opacity: 0,
}}
transition={{
ease: 'easeInOut',
duration: 0.3,
delay: index * 0.1, // Add delay for staggered animation
}}
>
<div className='m-auto text-4xl font-bold'>{node}</div>
</motion.div>
))}
</motion.div>
))}
</>
);
}

export default Graph;
Loading