Closed ghost closed 5 years ago
I don't like that we override viewDidDisappear
. There can be side effects that can be hard to find.
If i create Custom UIAlertController overrides viewDidDisappear
then this will nok work correctly.
I think this should be moved to its own little framework. Even it is only a couple if classes.
Because this don't belongs to extensions. More like a final class GlobalyAlertController: UIAlertController { }
If we start to add those kind of classes here, there will fast come a lot of other classes and then TriforkSwiftExtensions will be bloated.
Rather 100 micro frameworks than one huge bloated.
Swift Package Manager and the Swift community is heavily using a lot of small packages with only one functionality.
Look at https://github.com/vapor
I agree with @kdvtrifork. I didn't see the override of viewDidDisappear
at first. I like the concept of the global alert, but it should probably be its own framework as @kdvtrifork suggests.
What do you think about that @ktvtrifork ? π π
We will of course make it open source. It is easier to integrate with Carthage then! π
Well that is a good point @kdvtrifork however, this would then concern multiple things in this repo as for example https://github.com/trifork/TriforkSwiftExtensions/tree/master/TriforkSwiftExtensions/TriforkSwiftExtensions/Reusable would be more in the "it should have its own micro framework", since it deviates from the "Extension" part as well as this does. Perhaps the question should then be; Should we create a "container" project with all these micro projects ( git sub project) and then create these smaller projects for themselves ?
the only options for this is really 1) integrate 2) not integrate, 3) its own framework 4) conditionally compile it in, but this kinda breaks a lot. 5) rewrite it to let us create a custom UIAlertViewController that we instead can do the magic on. (but that makes it hardly and easier to use or argue about)
I see your point @ktvtrifork with Reusable.swift
I was also in doubt about this too. The main difference I see between those two is that we only use computed properties. So no side effects at all.
We could also remove Reusable.swift
and get same functionality I think, as we have default implementations on UITableViewCell
and UITableViewHeaderFooterView
.
Likewise i think that TSLogger.swift
should be its own logger project π But that is another talk!
I don't think a container framework would give any benefits. It take 2 sec to add a new framework to Carthage and I think it is also easier to control versions that way. Related to CI, when we have so many repos that it becomes a problem we should find a solution then. We don't wanna solve problems that don't exists yet. π€
I also agree with @tkctrifork if the framework depends to much on other there might be a problem. I know that we can't avoid it 100% but we can try to achieve it.
Removed reusable ππ€·ββοΈ https://github.com/trifork/TriforkSwiftExtensions/pull/45
We all agreed to create a "EnhancedSwiftPlatform" (working title) repository with a very strict policy for "platform only enhancements", such as this global UIAlertController
stuff can be placed.
Closing issue and continuing to enforce extension-stuff only in this repository.
Requested (and implemented) by @ktvtrifork :