-
-
Notifications
You must be signed in to change notification settings - Fork 363
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement display options for Boolean types #390
Comments
@kgodey @pavish @seancolsen Do we actually need to |
I don't see a need for the |
According to our API standards, we need to always include all keys in responses:
So as long as we don't ever skip the |
Got into a nasty bug with nested serializer partial update. JsonField default update method makes it even worse as partial update ends up replacing the whole object on the database but acts as a partial object on the serializer. Do we need partial update for display_options , I am thinking of disabling partial update for the custom columns as it makes sense to treat the JSON field as immutable, but this could be supported if needed. |
@silentninja I'm not sure what you mean by partial update for |
Should we support updating certain fields of For example:
or should the display options be specified only as a whole object(acts like a put request for the
|
We should not allow nested partial serialization. |
Should the endpoint return just the keys of the supported display_options or the complete list with the values/choices allowed(something like Entity value attribute)? Entity value attribute would mean something like
Not sure if this would work for options that need nested data. I prefer to have the display option structure in the API documentation. |
I like the entity value attribute option. Our eventual goal is for the frontend to be completely unaware of types (see #661) so I think we'll need that. |
Problem
The boolean data type supports the following display options:
TRUE
andFALSE
TRUE
andFALSE
Solution
(1) We should store these display options in the following format in the
display_options
field of the corresponding column.(2) We should also validate these so that:
input
should be set to eithercheckbox
ordropdown
use_custom_labels
should be a booleancustom_labels
can only have the keysTRUE
andFALSE
(3) If the column type is changed, the display options should be deleted.
(4) We should add supported display options to the
types
endpoint.Additional Context
Column
Django model with support for display options #658The text was updated successfully, but these errors were encountered: