-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: main
Are you sure you want to change the base?
Changes from 7 commits
cc9bc64
4963b6e
b1be237
e397e69
c384699
685c173
fccaa57
bad89ac
3daab94
1c1bf45
ed30df1
1ec486d
ebb918c
53eb82e
267c720
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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; |
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 }} | ||||||
|
@@ -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 }} | ||||||
> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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"
>
|
||||||
<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> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Suggested change
|
||||||
</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> | ||||||
); | ||||||
} |
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 }) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Analysis chain
Scripts ExecutedThe 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; |
There was a problem hiding this comment.
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.
This change addresses the linting error regarding the use of self-closing elements for JSX elements without children.
Committable suggestion
Tools
Biome