Giter VIP home page Giter VIP logo

currencytext's Introduction

Hi there πŸ‘‹

My name is Felipe, but you can also call me by my last name - Marino 🀌 . I'm a software engineer, with expertise in development for iOS and Apple's ecosystem.
I’m currently working full-time @GetYourGuide, where our mission and journey is to share incredible experiences with travelers around the world πŸ—Ό 🎑 β›© πŸ– πŸ—».

Learning 🌱

  • At the moment focused in apps at scale, hyper modularization, tooling, build systems and compilers
  • From time to time I play with Rust - goal is dive more into low(er) level and strengthen fundamentals

Open source πŸ”“ 🌎

Most part of my contributions are in Swift. Please don't shy away from opening an issue, requesting a feature or helping me out as you can, all contributions are super welcomed.

Buy Me A Coffee

Contributions πŸ“Š

currencytext's People

Contributors

andrewsb avatar cgkarnlund avatar dependabot[bot] avatar marinofelipe avatar renatomedina avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

currencytext's Issues

add auto clear custom options

What problems I want to solve?

Auto clears only removes zeroed values.

What value it delivers?

Improves auto clears with custom options.

  • Let user define conditions where te text field should be auto cleared

Tasks

  • ...

Dependecies / References

No dependencies and/or references by now.

Decimal recognized as value

What problems I want to solve?

Awesome Library
The decimal place is recognized as values e.g

1,200.00 is interpreted as 120000 which is wrong. Can there be a fix to this please

Set a min and max value

What problems I want to solve?

The framework does not allow to define min and max values.
What would be really nice and friendly.

What value it delivers?

Improve the usage

Tasks

...

Dependecies / References

...

Improve Example app with different configurations

Description

Improve clarity on the Example app.
The idea is to showcase users how a different currency formatter setup affect the text field input formatting.

e.g. adding pickers to change both currency and locale

Dependecies / References

Idea from @CGKarnlund on #59

Incorrect cursor position when editing

Description

As reported:

The starting cursor positioning code hasn't been working for us when we fill the text field with a formatted currency string so the user can edit it. Under this condition, when the user taps the field the initial cursor position is forced to be somewhere in the middle of the string. So something similar to this "$123,|456".

Setup to reproduce the issue:
$0.minValue = 1
$0.currency = .dollar
$0.locale = CurrencyLocale.englishUnitedStates
$0.maxValue = 100000000
Text entered in the filed: 12345678

Dependecies / References

Reported by @CGKarnlund on #59

improve travis build time

What problems I want to solve?

Travis build could be improved. This would also bring great new CI advanced knowledges.

What value it delivers?

... πŸ™„

Tasks

  • Cache bundler
  • See if caching cocoapods is possible when working with development pods
  • See what else can be improved

Dependecies / References

No dependencies and/or references by now.

Misbehave when minValue is Int and decimals are enabled

What problems I want to solve?

When the CurrencyTextFieldDelegate is constructed with a formatter that hasDecimals = true and minValue as an integer (e.g. 1), the first inserted number is not taken into account, and the field text gets formatted to the min value. This happens because the first inserted number would be the last decimal number, which is less than the min value.
0.05 < 1.00.

Implement and release SwiftUI support

What problems I want to solve?

Released and stable dependency that provides API for CurrencyText functionality in SwiftUI.

What value it delivers?

  • CurrencyText API provided on Apple's latest UI framework
  • SwiftUI is the future on Apple's ecosystem for UI, therefore such support would potentially also resolve #33 , by providing a unified way of formatting currency on text field over Apple's OS's.

Dependecies / References

#72

Forgotten project simple demo

What problems I want to solve?

The project sample does not have a sample. believe me!

What value it delivers?

Besides the tests the sample shows how to use the cocoa pod.

Tasks

  • Add simple demo
    • Storyboard
    • programmatically

Dependecies / References

No dependencies and/or references by now.

SwiftUI view not updated when currency value changed

What problems I want to solve?

If the CurrencyFormatter currency value is changed and re-rendered, the CurrencyTextField does not update with the new currency value.

Example:

struct SomeView: View {
    @State var currency: String
    @State var text: String
    @State var unformatted: String?
    @State var input: Double?
    
    var body: some View {
        Picker("Currency", selection: $currency) {
            ForEach(["EUR", "GBP", "USD"], id: \.self) { currency in
                Text(currency)
            }
        }
        CurrencyTextField(
            configuration: .init(
                placeholder: "0",
                text: $text,
                unformattedText: $unformatted,
                inputAmount: $input,
                formatter: CurrencyFormatter {
                    // HERE the View is not updated when `$currency` changes
                    $0.currency = Currency(rawValue: currency)!
                },
                textFieldConfiguration: { uiTextField in
                    // …
                }
            )
        )
    }
}

change-currency-dynamically

What value it delivers?

It would allow to dynamically change the currency of the CurrencyTextField

Tasks

TBD

Dependecies / References

No dependencies and/or references by now.

Contribution MD

What problems I want to solve?

The repo does not have a contribution guideline file

Tasks

  • Define and create contributing.md
  • Define and create pull_request.md

Improve customizing

What problems I want to solve?

The lib API is not friendly and readable as it should be.
To customize currency the user has to set the number formatter locale, as an example.

What value it delivers?

Review and improves all properties, interfaces, functions and set ups to add an easy to use interface with a great documentation.

Tasks

  • Work upon all ISO currency Codes instead of Locale and number formatter
  • Add a custom setup struct to improve customizing

Dependecies / References

No dependencies and/or references by now.

Support Swift Package Manager

What problems I want to solve?

Now that SPM is integrated with Xcode 11, add support for it.

What value it delivers?

Drives the framework to the future of dependency management in Apple OS's.

Tasks

  • ...

Dependecies / References

No dependencies and/or references by now.

Multiple SwiftUI Warnings on >iOS 16.X

What problems I want to solve?

There are mutliple warnings on iOS >16.X while using your code:
Publishing changes from within view updates is not allowed, this will cause undefined behavior.

File: CurrencyText/tree/main/Sources
Lines: 73, 122 and 124

CleanShot 2022-11-20 at 01 50 20

What value it delivers?

There will be no more warnings while running the app. Improve stability.

Tasks

TBD

Dependecies / References

No dependencies and/or references by now.

Investigate support for SwiftUI

What problems I want to solve?

The functionality provided by CurrencyText should be available not only on UIKit, but also on SwiftUI.

I imagine CurrencyFormatter can still be used, but a separate library must be created to support using a currency formatter along with SwiftUI's TextField.

Cover more use case scenarios on tests

Description

Update automated tests with a larger variety of currency formatter + text field delegate setups.
This intends to (among other things) improve the reliability of the project for different "formatting" cases.

Dependecies / References

#59

Update `SwiftUI` libraries to vanilla SwiftUI + support all platforms

Whenever Apple provides us with API for fully controlling TextFields selected text range, it will open the door for a plain vanilla SwiftUI version of CurrencyTextField and its libraries.

As additional benefits all TextField modifiers will work nicely with CurrencyTextField, and support for all platforms will be possible given that importing UIKit won't be needed anymore.

Let's see what WWDC and the next iteration of SwiftUI will give us 🀞 !

Dependecies / References

Apple πŸ˜œπŸ™

support Carthage

What problems I want to solve?

support Carthage

What value it delivers?

...

Tasks

...

Dependecies / References

None.

add fastlane + ci

What problems I want to solve?

The pod could have fastlane and ci integrations.

What value it delivers?

Repetitive work would be automated lowering chances of failures.

Tasks

  • Add fastlane
    • create test lane
  • integrate with travis
  • integrate with coveralls
  • add badges to readme

Dependecies / References

No dependencies and/or references by now.

string and cursor pending unit tests

What problems I want to solve?

unit tests for non tested string extension funcs and cursor positioning

Tasks

  • String extension tests
    • adding decimal separators to String
    • removing currency separator
    • represents zero
  • CurrencyTextField
    • autoclear
    • cursor positioning

Dependecies / References

No dependencies and/or references by now.

Bug when setting fraction digits to 0

What is it

The lib does not work when setting fraction digits to zero.

What are the improvements

Fix this bug and support formatting without decimal values.

Reference

This bug was discovered by myanalysis. Thanks πŸ‘

add other useful lanes

What problems I want to solve?

The pod could have lanes to:

  • delivery
  • tagging
  • other..

What value it delivers?

Repetitive work would be automated lowering chances of failures.

Tasks

  • Add pull request lane
  • Tag lane
  • Publish lane

Dependecies / References

No dependencies and/or references by now.

Turn into a text field mask lib??

What problems I want to solve?

Now that this framework works apart from text field subclassing and acts as a currency text field mask formatter, should not it become a full text field mask framework?

What value it delivers?

Allows this framework to be more helpful for those who needs text field masks πŸ˜„ !

Tasks

  • First Task
    • Subtask of first task
  • Second Task
    • Subtask of second task

Dependecies / References

No dependencies and/or references by now.

Fix CI to fail when tests do not pass

What problems I want to solve?

  • Fix CI to report error when tests fail

What value it delivers?

Make the CI more reliable.

Dependecies / References

Behavior can be seen on #59

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.