Skip to content

feat: add minimal flat Cloud shape component#94

Open
shreyashpatel5506 wants to merge 13 commits intoashutosh1919:mainfrom
shreyashpatel5506:main
Open

feat: add minimal flat Cloud shape component#94
shreyashpatel5506 wants to merge 13 commits intoashutosh1919:mainfrom
shreyashpatel5506:main

Conversation

@shreyashpatel5506
Copy link

@shreyashpatel5506 shreyashpatel5506 commented Dec 21, 2025

✨ What’s added

  • Introduced a new Cloud shape with a clean, minimal flat SVG design
  • Fully typed with TypeScript
  • Accessible with aria-label
  • Follows the existing shape API and styling patterns

🧪 Testing

  • Tested locally in development mode
  • Rendered correctly in the shapes demo

📌 Notes

  • This PR focuses only on adding the Cloud shape
  • Existing Theme UI / lint issues in the demo are unrelated and untouched
    ⚠️ Note: The project currently has a known npm peer dependency conflict
    (framework-related). This PR does not introduce or modify dependencies
    and focuses only on adding the Cloud shape component.

@netlify
Copy link

netlify bot commented Dec 21, 2025

Deploy Preview for awesomeshapes ready!

Name Link
🔨 Latest commit 9113f08
🔍 Latest deploy log https://app.netlify.com/projects/awesomeshapes/deploys/694a1e29b6c0390008717e54
😎 Deploy Preview https://deploy-preview-94--awesomeshapes.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@ashutosh1919
Copy link
Owner

@shreyashpatel5506 Deploy preview fails

@shreyashpatel5506
Copy link
Author

@shreyashpatel5506 Deploy preview fails

Yes, the dependency conflict exists on main as well.
Locally tested using npm install --legacy-peer-deps.
Happy to help with a separate dependency-fix PR if needed.

@shreyashpatel5506
Copy link
Author

shreyashpatel5506 commented Dec 23, 2025

@shreyashpatel5506 Deploy preview fails
Please check ,the preview is displaying correctly now.

@shreyashpatel5506
Copy link
Author

@shreyashpatel5506 Deploy preview fails
Please check ,the preview is displaying correctly now.

If everything looks good, please review.

@shreyashpatel5506
Copy link
Author

shreyashpatel5506 commented Dec 29, 2025

@ashutosh1919 please check my pr

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR attempts to add a new Cloud shape component to the react-awesome-shapes library. However, the implementation does not follow the established patterns used by all other shapes in the codebase, creating significant API inconsistencies and maintainability concerns.

Changes:

  • Added a new Cloud shape component using direct SVG rendering (instead of the BaseShape wrapper pattern)
  • Exported Cloud component from library index
  • Added Cloud to the shapes demo constants and display
  • Included unrelated changes to footer component, configuration files, and build setup

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/lib/shapes/cloudshape.tsx New Cloud component with non-standard implementation pattern
src/lib/index.tsx Exports Cloud using default export (inconsistent with other shapes)
src/constants/shapes.constant.ts Adds Cloud to scope and example (with invalid gradient color)
src/components/demo/shapesdemos.tsx Adds Cloud to demo display
src/components/layout/footer.tsx Unrelated: Updates deprecated Themed.a to Link with security attributes
.npmrc Unrelated: Adds legacy-peer-deps configuration
.vscode/settings.json Unrelated: Adds VS Code PR settings
.github/workflows/lint-check.yml Unrelated: Updates Node version and install command
.eslintrc.json Unrelated: Adds ESLint rule for sx prop
package.json Unrelated: Adds Babel plugin dependency

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +1 to +45
import React from 'react';

interface CloudProps {
width?: number | string;
height?: number | string;
color?: string;
zIndex?: number;
}

const Cloud: React.FC<CloudProps> = ({
width = '220px',
height = '120px',
color = '#E5E7EB',
zIndex = 1
}) => {
return (
<svg
aria-label="Minimal flat cloud shape"
height={height}
role="img"
style={{ zIndex }}
viewBox="0 0 220 120"
width={width}
xmlns="http://www.w3.org/2000/svg"
>
<path
d="
M60 90
H150
C175 90 190 75 190 60
C190 45 175 35 160 38
C155 22 138 15 122 22
C112 8 90 10 82 25
C65 25 50 38 50 55
C35 58 30 70 30 80
C30 88 40 90 60 90
Z
"
fill={color}
/>
</svg>
);
};

export default Cloud;
Copy link

Copilot AI Jan 18, 2026

Choose a reason for hiding this comment

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

The Cloud component does not follow the established pattern used by other shapes in this codebase. All other shapes (Circle, Star, Heart, Arrow, Message, etc.) use the BaseShape wrapper component with styled-components and clip-path. This inconsistency creates maintenance issues and API incompatibility.

The Cloud component should:

  1. Use BaseShape wrapper for consistent positioning and responsive behavior
  2. Accept the standard ShapeProps or ShapeWithSize interface properties (top, left, right, bottom, position, className, breakpoints, zIndex as string)
  3. Use styled-components with clip-path or background for the shape rendering
  4. Follow the same pattern as other shapes for consistency

Copilot uses AI. Check for mistakes.
export const cloudExample = `<Cloud
width="220px"
height="120px"
color="linear-gradient(135deg, #c7d2fe, #a5b4fc)"
Copy link

Copilot AI Jan 18, 2026

Choose a reason for hiding this comment

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

The color value uses a CSS linear-gradient which is incompatible with the SVG fill attribute. SVG fill only accepts solid colors (like hex, rgb, or named colors), not CSS gradient syntax. The gradient will not render as expected. Use a solid color value like "#c7d2fe" instead, or implement gradient support using SVG gradient elements (linearGradient/radialGradient) if gradient rendering is desired.

Copilot uses AI. Check for mistakes.
@shreyashpatel5506
Copy link
Author

can you merge it ?

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

C30 88 40 90 60 90
Z
"
fill={color}
Copy link

Copilot AI Mar 1, 2026

Choose a reason for hiding this comment

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

The color prop is passed as the SVG fill attribute, so CSS gradient strings such as "linear-gradient(135deg, #c7d2fe, #a5b4fc)" (used in cloudExample) will have no visual effect. The SVG fill attribute does not support CSS gradient syntax — gradients in SVG must be defined using <linearGradient> or <radialGradient> defs. As a result, the demo example in shapes.constant.ts will render the Cloud as transparent/missing color instead of showing the intended gradient. Either the color prop should only accept plain CSS color values (and the demo example corrected), or the component needs to support SVG gradient defs to render gradients correctly.

Copilot uses AI. Check for mistakes.
@ashutosh1919
Copy link
Owner

@shreyashpatel5506 can you look at issues raised by copilot?

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@netlify
Copy link

netlify bot commented Mar 6, 2026

Deploy Preview for awesomeshapes failed.

Name Link
🔨 Latest commit a813f93
🔍 Latest deploy log https://app.netlify.com/projects/awesomeshapes/deploys/69ad9b74c4e2f50008152694

shreyashpatel5506 and others added 5 commits March 6, 2026 19:57
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@shreyashpatel5506
Copy link
Author

@copilot open a new pull request to apply changes based on the comments in this thread

shreyashpatel5506 and others added 2 commits March 6, 2026 20:01
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@shreyashpatel5506
Copy link
Author

almost all are solved

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 10 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@shreyashpatel5506
Copy link
Author

@copilot open a new pull request to apply changes based on the comments in this thread

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants