Giter VIP home page Giter VIP logo

Comments (4)

jkk avatar jkk commented on August 25, 2024

Thoughts:

  1. The default renderer is just that - the default. Making a custom renderer with its own particular rules for wrapping/sectioning/etc doesn't require much code. The table renderer, for example, recognizes a :stacked field key which, combined with a nil :label, makes the field display full-width without any label. I actually use the table renderer in most of my own projects, although it does require some custom CSS to make it look nice.

  2. You're right in that there's room for improvement in being able to customize the default renderer. Adding hooks of some kind is a good idea.

Perhaps some generic attributes could be distilled out and attached to fields during prep, before rendering (there's actually a prep-field multimethod). The renderer could then check those attributes to determine how to lay things out. E.g.,

  • :presentational - whether the field actually collects input or is merely decorative/instructional
  • :labeled - whether to display and/or allocate space for a label
  • :fieldset-separator

from formative.

hutch avatar hutch commented on August 25, 2024

Sorry, just went for a short walk and about 30 seconds in to it realised that those sets I mentioned are in the renderers not core. And so are subject to extension and I shouldn't be whinging about those things since I can easily enough do this myself.

I withdraw my question until I attempt to solve it with the tools you've already provided :-)

from formative.

jkk avatar jkk commented on August 25, 2024

No worries, I appreciate hearing this kind of feedback. In addition to helping make the defaults better/more flexible, it will help shape the documentation - I plan on writing a guide on how to tune/extend Formative.

from formative.

jkk avatar jkk commented on August 25, 2024

Closing this, although there may be future changes that address the issues raised.

from formative.

Related Issues (20)

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.