Skip to content

Commit 04db442

Browse files
linting fixed
1 parent ccb89b5 commit 04db442

File tree

3 files changed

+85
-14
lines changed

3 files changed

+85
-14
lines changed

PULL_REQUEST_DESCRIPTION.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
---
2+
name: Pull Request
3+
about: Submit changes to the project for review and inclusion
4+
---
5+
6+
## Description
7+
8+
This pull request enhances the dropdown navigation UI with significant visual improvements and animations. The changes transform the basic dropdown into a modern, interactive component with enhanced user experience through advanced animations, hover effects, and visual feedback.
9+
10+
## Related Issue
11+
12+
This PR enhances the dropdown navigation UI experience.
13+
14+
## Changes Made
15+
16+
- **Enhanced Button Styling**:
17+
- Upgraded from basic styling to modern rounded-xl design with enhanced padding
18+
- Added font-semibold for better typography hierarchy
19+
- Implemented group hover effects with scale and rotation animations
20+
- Added border and shadow effects on hover for better visual feedback
21+
22+
- **Advanced Animation System**:
23+
- Replaced simple fade animations with complex 3D transforms (rotateX, scale)
24+
- Implemented spring-based animations with custom easing curves
25+
- Added staggered animations for dropdown items with index-based delays
26+
- Enhanced transition timing and easing for smoother interactions
27+
28+
- **Visual Enhancements**:
29+
- Added shimmer effects that sweep across elements on hover
30+
- Implemented layered background effects with opacity transitions
31+
- Created animated dot indicators that scale and appear on hover
32+
- Added enhanced arrow indicators with slide-in animations
33+
- Included top and bottom accent bars with gradient effects
34+
35+
- **Improved Layout and Spacing**:
36+
- Increased dropdown width from 56 to 72 units for better content display
37+
- Enhanced padding and margins throughout the component
38+
- Added rounded-3xl for more modern appearance
39+
- Implemented better shadow system with blue tinting
40+
41+
- **Interactive Feedback**:
42+
- Added scale effects on hover for dropdown items
43+
- Implemented font weight transitions (medium to semibold)
44+
- Created smooth color transitions with enhanced contrast
45+
- Added border effects that appear on hover
46+
47+
## Testing Performed
48+
49+
- Tested dropdown functionality across different screen sizes
50+
- Verified all hover animations work smoothly
51+
- Confirmed dropdown items navigate correctly
52+
- Tested accessibility with keyboard navigation
53+
- Validated animations perform well on different devices
54+
- Ensured no layout breaking on various viewport sizes
55+
56+
## Checklist
57+
58+
- [x] I have tested these changes locally and they work as expected.
59+
- [x] I have followed the project's coding style guidelines.
60+
- [x] I have addressed the code review feedback from the previous submission, if applicable.
61+
62+
## Additional Notes for Reviewers
63+
64+
The enhanced dropdown provides a significantly improved user experience with modern animations and visual feedback. The changes maintain accessibility while adding sophisticated visual effects. The spring-based animations and staggered item reveals create a polished, professional feel that aligns with modern web design standards.
65+
66+
---
67+
68+
Thank you for contributing to our project! We appreciate your help in improving it.
69+
70+
📚 See [contributing instructions](https://github.com/sugarlabs/www-v2/blob/master/README.md).
71+
72+
🙋🏾🙋🏼 Questions: [Community Matrix Server](https://matrix.to/#/#sugar:matrix.org).

src/sections/NavDropdown.tsx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -59,35 +59,35 @@ const NavDropdown: React.FC<NavDropdownProps> = ({
5959
initial={{ opacity: 0, y: -15, scale: 0.9, rotateX: -15 }}
6060
animate={{ opacity: 1, y: 0, scale: 1, rotateX: 0 }}
6161
exit={{ opacity: 0, y: -15, scale: 0.9, rotateX: -15 }}
62-
transition={{
62+
transition={{
6363
duration: 0.3,
6464
ease: [0.4, 0, 0.2, 1],
65-
type: "spring",
65+
type: 'spring',
6666
stiffness: 300,
67-
damping: 30
67+
damping: 30,
6868
}}
6969
className="absolute left-0 mt-4 w-72 rounded-3xl bg-white
7070
shadow-2xl shadow-blue-500/20 ring-1 ring-black/5 border border-gray-100 overflow-hidden
7171
transform origin-top perspective-1000"
7272
>
7373
{/* Subtle border effect */}
7474
<div className="absolute inset-0 bg-blue-50/30 rounded-3xl" />
75-
75+
7676
{/* Top accent */}
7777
<div className="absolute top-0 left-1/2 transform -translate-x-1/2 w-32 h-1 bg-blue-400/30 rounded-full" />
78-
78+
7979
<div className="relative py-3">
8080
{items.map((item, index) => (
8181
<motion.div
8282
key={item.path}
8383
initial={{ opacity: 0, x: -30, scale: 0.9 }}
8484
animate={{ opacity: 1, x: 0, scale: 1 }}
85-
transition={{
85+
transition={{
8686
delay: index * 0.08,
8787
duration: 0.3,
8888
ease: [0.4, 0, 0.2, 1],
89-
type: "spring",
90-
stiffness: 200
89+
type: 'spring',
90+
stiffness: 200,
9191
}}
9292
>
9393
<Link
@@ -100,10 +100,10 @@ const NavDropdown: React.FC<NavDropdownProps> = ({
100100
>
101101
{/* Enhanced hover background */}
102102
<div className="absolute inset-0 bg-blue-100/40 opacity-0 group-hover:opacity-100 transition-all duration-300 rounded-2xl" />
103-
103+
104104
{/* Shimmer effect on hover */}
105105
<div className="absolute inset-0 bg-gradient-to-r from-transparent via-white/30 to-transparent -translate-x-full group-hover:translate-x-full transition-transform duration-500 rounded-2xl" />
106-
106+
107107
{/* Animated dot indicator */}
108108
<div className="relative z-10 flex items-center w-full">
109109
<div className="relative">
@@ -116,11 +116,11 @@ const NavDropdown: React.FC<NavDropdownProps> = ({
116116
<span className="w-1 h-1 bg-white rounded-full opacity-80" />
117117
</span>
118118
</div>
119-
119+
120120
<span className="relative z-10 font-medium group-hover:font-semibold transition-all duration-300 text-gray-800 group-hover:text-blue-700">
121121
{item.label}
122122
</span>
123-
123+
124124
{/* Enhanced arrow indicator */}
125125
<svg
126126
className="w-4 h-4 ml-auto opacity-0 group-hover:opacity-100 transition-all duration-300
@@ -142,7 +142,7 @@ const NavDropdown: React.FC<NavDropdownProps> = ({
142142
</motion.div>
143143
))}
144144
</div>
145-
145+
146146
{/* Enhanced bottom accent */}
147147
<div className="h-1.5 bg-blue-500 relative overflow-hidden">
148148
<div className="absolute inset-0 bg-gradient-to-r from-transparent via-white/30 to-transparent animate-pulse" />

src/styles/globals.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
src: url('/fonts/Caveat-Regular.ttf');
44
}
55

6-
76
@font-face {
87
font-family: 'Roboto';
98
src: url('/fonts/Roboto-Regular.ttf');

0 commit comments

Comments
 (0)