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
feat: add progress bar component #3
Conversation
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.
You can maybe try to reduce VitaminProgressbar
by extracting linear
or circular
code in an other file.
I think that you can also add the final
keyword to your classes.
I tried, but most of the code is organized with common functions for both variant, and a test on the variant in the body of the method. And when I try to move extensions in other files, I always struggle with private properties/functions, that are not visible. And I am not sure this is a good idea to reduce the access control just to match the Swiftlint rule about file size. I was just able to extract colors in a separate file. And I extracted the background and label colors in this extension. |
And for the |
I added the final class on the Did you mean to put it on Showcase classes ? If yes, I can do that, but I am not sure to get the point since they are classes of the Showcase, they won't be packaged and distributed, and thus, I am not really sure to understand who we would like to avoid subclassing these classes... ;) |
With a lot of classes, it could speed up the build, it's principally for that. |
Honesttly, I did not know that. So let's go for it ! |
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.
Perfect 👍
@florentlotthepro @baptistedajon is it ok to merge it soon? :) |
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.
🍫
# Conflicts: # Showcase/Vitamin Showcase.xcodeproj/project.pbxproj
21a0418
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.
🍆
* fix: proposal for accessibility of progress bar * refacto - improve accessibility Label setting
…prepare SwiftUI version
7ca15f6
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Changes Description
Here is a proposal of implementation for progress bars.
It handles the two variants (linear, circular), each sub-style (empty, image, percentage), size (small, medium, large) of them.
It also handles the progress type (determinate and indeterminate)
The Showcase has been updated to demonstrate all possible configurations for progressbar.
The documentation has been added, and the general Readme has been updated to reference this documentation.
Remarks
1 - there is still a SwiftLint warning regarding the file length. I decided not to fix it because it would require to :
2 - The content of this PR has already partially been reviewed by @florentlotthepro on the inner-source repo, I just refactored the showcase and doc parts, fixed @florentlotthepro feedbacks, and fixed some problems with dark mode