Giter VIP home page Giter VIP logo

Comments (4)

volkov-sergey avatar volkov-sergey commented on June 9, 2024 3

@sedubois working on it

from administrate-field-jsonb.

uysimatpassbase avatar uysimatpassbase commented on June 9, 2024 1

How is it going for this feature?

from administrate-field-jsonb.

volkov-sergey avatar volkov-sergey commented on June 9, 2024

Hey @sedubois nice catch, thanks. What do you think will be the most comfortable way to use an array feature?

Something like this:

Field::JSONB.with_options(array: true)

or

Field::JSONB.with_options(advanced_view: [])

Share your opinion, please

from administrate-field-jsonb.

sedubois avatar sedubois commented on June 9, 2024

@volkov-sergey at first thought I would use another name than "advanced view", technically what is being described here is a description of the JSON's schema. E.g for both arrays and objects:

# JSON array
Field::JSONB.with_options(schema: Field::JSONB::Array(
  Field::String
))
# JSON object
Field::JSONB.with_options(schema: Field::JSONB::Hash(
  'name'  => Field::String,
  ...
))

Or something like that.

Then there is the (separate) question of how to render the form and data, either with jsoneditor or custom. To start, could just use custom views when schema is provided (like now). Then as a second step there could be a way to control this too (either by passing a render option, or by letting user override views).

from administrate-field-jsonb.

Related Issues (16)

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.