Giter VIP home page Giter VIP logo

reactivedatadisplaymanager's People

Contributors

alexfilimon avatar danilkomarov avatar dependabot[bot] avatar dmitryd20 avatar dracooooola avatar erikbasargin avatar fixique avatar golubeykov avatar gregoryvit avatar ikeret avatar ismetanin avatar johnreeze avatar kombatkos avatar korolevsoftware avatar lastsprint avatar nullisone avatar paradi2e avatar senseiphonex avatar serge-nanaev avatar somenkovnikita avatar vadim4016 avatar virpik avatar vladyankovenko 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

Watchers

 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

reactivedatadisplaymanager's Issues

Can't build example project

Checked on Xcode 11.6

  • Fetch repository
  • Install pods
  • Try build example project

Actual result: failed with Content and frame layout guides before iOS 11.0
Expected result: build running on simulator or device

--
Possible workarounds

  1. Uncheck Content layout Guides in Main.storyboard/StackScene/Stack/View/ScrollView
  2. Disable supporting of iOS 10 and up minimum target to iOS 11

Possibility to moving generators

Needs possibility to moving generator.
For example I can move generator on 5 positions.
It means that I get current position of generator, and then I increase this position on 5

Add swipe actions to generator

I have code, that works only iOS 11+, because it uses UIContextualAction. Maybe we should support this feature only for iOS 11+?

remove generators from section

Add possibility to remove all cell generators from current section
At this moment possible only remove all cell generators from all sections

PaginableBaseTDDM don't work properly

PaginableBaseTableDataDisplayManager calls lastCellShowingEvent for every section.
Maybe will be better to make calling lastCellShowingEvent only for last section?

CollectionPluginsChecker async AssertionFailure

Short version of CollectionPluginsChecker looks like this:

final class CollectionPluginsChecker {

    weak var delegate: CollectionDelegate?

...
    func asyncCheckPlugins() {
        DispatchQueue.main.async {
            self.checkPlugins()
        }
    }

...
    func checkPlugin(for generator: SelectableItem?) {
        let plugin = delegate?.collectionPlugins.plugins.first(where: { $0 is CollectionSelectablePlugin })

...
        guard generator != nil && plugin == nil && eventsNotEmpty else { return }
        assertionFailure("❗️Include the CollectionSelectablePlugin.")
    }

}

CollectionPluginsChecker has weak reference to CollectionDelegate instance, so it is possible that CollectionDelegate is already deallocated when checkPlugin() is being called, which leads to an unexpected AssertionFailure. This situation can occur when CollectionManager is removed right after calling ddm.forceRefill(). checkPlugins inside forceRefill is called asynchronously and CollectionManager with its delegate are deallocated before one of checkPlugin calls.

The described case can be easily fixed with a strong reference to the delegate here.

Add proxying

Needs to proxying DataSource/TableView/ScrollView methods to events

Add table generators builder

the idea is this: to make a builder for table generators.
You can add a collection of basic type generators (Spacer, Text, Button) as in swiftUI, using a separate library.
This will speed up writing tables and remove a lot of unnecessary code from projects.

Builder:

Снимок экрана 2022-07-04 в 12 17 55

Use:

Снимок экрана 2022-07-04 в 12 18 34

fileprivate tableView is not accessible in inherited classes

If I inherit class CustopTableDataDisplayManager: BaseTableDataDisplayManager I am not able to access to tableView. And what if I want to reload one section in tableView?

Now I should do something like this

class CustopTableDataDisplayManager: BaseTableDataDisplayManager {

    // MARK: - Properties

    private var tableView: UITableView?

    // MARK: - Initialization and deinitialization

    required init(collection: UITableView) {
        super.init(collection: collection)
        tableView = collection
    }

    //MARK: - Public methods

    func reloadSection(with sectionGenerator: TableHeaderGenerator) {
       // ...
    }

}

Maybe making tableView property in BaseTableDataDisplayManager: public fileprivate(set) level of access would be better?

Generators reuse

Now we have a problem with the number of generators if we need to create a table with a large number of cells

Missed init for public classes

It seems that for CollectionBatchUpdatesAnimator and for similar classes init-method was missed. Can you add it on next update?)

public class CollectionBatchUpdatesAnimator: Animator<UICollectionView> {

    public override func perform(in collection: UICollectionView, animated: Bool, operation: () -> Void) {
        if animated {
            collection.performBatchUpdates(operation)
        } else {
            operation()
        }
    }

}

Add BaseGenerator

BaseGenerator should just configure cell conformable to some protocol.
For example

let generator = BaseGenerator<ShopCell>()

public protocol Configurable {
    associatedtype Model

    func comfigure(with model: Model) 
}

Identifier to String

in TableCellGenerator.identifier has UITableViewCell.Type type.
But in some rare case we cant return current cell type.
May be needs to change the type to String?

Modifier `.none` animation ambiguity

Modifier protocol has various methods with optional Animation parameters. In its implementations Animation becomes either UITableView.RowAnimation or CollectionItemAnimation.

The problem appears when using UITableView modifiers with animation parameter .none. .none can be treated both as Optional.none and UITableView.RowAnimation.none. Following IDE warning:
Снимок экрана 2023-06-20 в 16 21 03

Even without ambiguity – it is not clear what should users choose if they need no animation - nil or .none.

Since UITableView.RowAnimation already has .none case, is it possible to make animation parameter non-optional? In UIColectionView modifiers it can still be optional.

Remove Events

Problem
We are not using Events by its intended purpose. I haven't seen any project that uses more that one subscriber for any Event yet.

Solution
I suggest using plain Swift closures instead.

Extendable generators

Add support for extendable cells.

  • Needs add special adapter that can manage Extended and Collapsed cell states
  • Needs add generator container that contain generator for Extendable and Collapsable cells

Tests failing

After merging some old PRs tests have started to fail.

Remove updating cell in non reusable generator

I thought the basic idea of non reusable generator was not to update the cell configuration in generate(tableView: UITableView, for indexPath: IndexPath) method , but in all NonReusableGenerators we have this. And now we have to update generator model everytime when we change smth in that cell to prevent reset data while scrolling, i don't think it should be like this.
How about removing it ?

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.