Skip to content
This repository was archived by the owner on Jul 17, 2024. It is now read-only.
This repository was archived by the owner on Jul 17, 2024. It is now read-only.

Improve styling support #2

Description

@zoul

A crucial feature of a form library is styling support, the user should be able to tweak almost anything about the form with as little effort as possible. Ideas:

  • Creating cells inside sections (like in SelectableSection) is a problem, as the caller has no control of the cells. We could provide a builder: (ItemType) -> FormCell<Model>, or maybe a method to override? (There’s already cellForItem, but it’s private.) How about the important cell customizations like calling didSelect or setting shouldHighlight – could we do this after the customized builder? Or shall we leave that to the caller?

  • FormTextFieldCell has to be more customizable. We could at least support several cell styles (ie. a field with a label), but it should also be possible to clear the default constraints and introduce custom ones. So maybe introduce an enum CellStyle { foo, bar, custom } where .custom would not introduce any constraints?

  • Should we also support binding to model with closures instead of key paths? Ie. read: (Model) -> T, write: (inout Model) -> Void, where keypaths would be just a convenience feature atop of that.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions