Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add List Skeleton and modifiable Corner Radius #2

Merged
merged 2 commits into from
Jul 24, 2024

Conversation

OmarJalilo
Copy link
Contributor

Description

This pull request introduces two significant enhancements to the EasySkeleton project: the addition of a List Skeleton and the integration of a modifiable corner radius directly within the initialization function.

Rationale

1. List Skeleton:

  • User Preference: Many developers prefer using List over ForEach in their SwiftUI applications. By adding a List Skeleton, we cater to this preference, making the library more versatile and user-friendly.
  • Logical Step: Given the widespread use of List, adding a skeleton placeholder for it is a logical progression for the EasySkeleton library, enhancing its utility.

2. Modifiable Corner Radius in Initialization:

  • Simplified Usage: Previously, the corner radius modifier function was needed frequently throughout the codebase. By allowing the corner radius to be set directly in the initialization, we simplify the code, reduce redundancy, and improve readability.
  • Convenience: This change streamlines the process of customizing the skeleton's appearance, providing a more intuitive and efficient way to set the corner radius.

Changes Made

1. Added List Skeleton:

  • Implemented a new List Skeleton that can be used as a placeholder for lists, ensuring consistent design and behavior with the rest of the EasySkeleton components.

2. Modified Initialization to Include Corner Radius:

  • Updated the initialization function to accept a corner radius parameter.
  • Adjusted relevant parts of the codebase to utilize the new initialization parameter, removing the need for the separate corner radius modifier function.

Benefits

  • Enhanced Flexibility: Users can now easily create skeletons for lists, broadening the library's applicability.
  • Improved Code Maintainability: Centralizing the corner radius modification within the initialization reduces code duplication and enhances maintainability.
  • User Convenience: Simplifies the customization process, making the library more intuitive and easier to use.

Copy link

codesandbox bot commented Jul 23, 2024

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@SpectralDragon
Copy link
Owner

Hi!
Looks fantastics! Thanks for you job and improvements to EasySkeleton.

@SpectralDragon SpectralDragon merged commit 0047954 into SpectralDragon:main Jul 24, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants