kinto / formbuilder Goto Github PK
View Code? Open in Web Editor NEWCreate your own forms and surveys, get your data back.
Create your own forms and surveys, get your data back.
Users should be able to specify which kinto server they want to use during the creation of the form (e.g. it shouldn't only be a configuration of the application itself).
I can foresee a world where it would also be possible to not only send the schema to the server, but also the complete application that consumes the schema (using kinto-attachments
), and then maybe another plugin that would return the index.html page if the collection is accessed via a browser (By checking the Content-Type
header + the presence of an attached file).
This way, form consumers could just have to converse with the storage server to store data there.
This is a technical term (placeholer
html attribute) which only makes sense to tech people. We should find a better name.
Once (if) rjsf-team/react-jsonschema-form#214 makes it upstream :)
Should be done by Kinto Emailer
With a way to select the configuration file, as it's done in kinto-admin.
It should be specified as a defaultProps
instead, and should be renamed to "sidebarComponent" or something similar.
As it makes no sense from an accessibility standpoint. Instead, use "the widget menu".
I think it could be useful to have the fields in edit mode as soon as they are added. I did some testing and changing edit
to true
by default isn't enough because the state isn't persisted.
What do you think about storing this information in the store and passing it as props rather than having the component directly handle this with state? Otherwise the default value will always come back (currently, if you are in edition and add a new field then the field you were editing will come back to the edit:false state).
It states uiSchema is undefined
.
Hi,
When accessing on https://www.fourmilieres.net/ Opera failed with a "Too many redirections" error.
Opera 37.0.2178.43 - Mac OS X 10.9.5 64-bit
After opening the debug console and refreshing the page, things are better, the page is loading but still with many redirections.
For instance, when the kinto server isn't running, no notification is actually shown to the end user.
The "back" button currently goes back to the homepage, which isn't the intended behaviour.
When working on v1, we made the decision to remove the support for fieldset, but it's indeed a good feature.
In order to integrate it properly, we would need to:
Maybe we should add a link to a page where questions are asked / answered (a FAQ, but for the users) where this solution could be explained.
Sometimes, it can be useful to have a paragraph of text in addition to the different inputs.
The current implementation of #12 uses the same credentials for the form creator and for the consumers. Instead, we should generate an authentication token for the admin and put it in the URL to the admin view.
I would be an advocate to rethink the whole field edition process (yeah I know, big thing). I do think it can be made much simpler and handier. Google Form, for example, does way better :-/, especially in their last version that implements a quasi-wysiwyg approach.
This is not an easy design, and I do think that this is one that cannot be efficiently discussed in a forum (or similar). A "real-world" design session is likely to help much.
Currently it works using dragndrop. We should keep the dragndrop for the reorganisation of the widgets but we don't need to dragndrop them when they're first added.
For this, we would need to generate an encryptionSecret
on the client side, and pass it to the users using a hash in the URL.
Then, all records could be encrypted with it, before being stored.
The problem with this approach is the fact that validation cannot happen server side, but I believe that could be an interesting mode, depending on what you want to achieve.
I would be interested in having thoughts about this approach. cc @Natim @leplatrem and eventually a security feedback from @jvehent
Should we add a welcoming page like what I did for the daybed project?
The way the drag and drop is currently used is not very user friendly. One way to solve it is to add a handle to the components, and have only this handle able to trigger the dragndrop.
We shouldn't set number field schema defaults to 1-100 integers and find a way to offer free form input by default.
json2csv looks like a good candidate.
In the Daybed formbuilder, we had an option to download the generated URLs as a text file, using a Content-URL
link.
The code in daybed did:
var TEMPLATE = (
"{{formName}}\n" +
"---------------------\n" +
"\n" +
" * User Link: {{userlink}}\n" +
" * Admin Link: {{adminlink}}"
);
var filename = "form-" + this.props.metadata.formName + ".txt";
var fileContent = "data:text/plain;base64," + btoa(
TEMPLATE
.replace("{{userlink}}", this.props.userLink)
.replace("{{adminlink}}", this.props.reportLink)
.replace("{{formName}}", this.props.metadata.formName);
downloadButton = <a download={filename} href={fileContent} className="btn btn-primary pull-right">Download</a>;
Once #12 will have landed, it will be possible to store the data generated by the formbuilder to kinto. That would be great to be able to use a different storage mechanism (couchdb, cozy, etc.).
In order to do this, an abstraction needs to be done for the storage, and the storage layer could be configured from the config.js file.
Currently the label of new form element is generated when added, and we end up with IDs such as field_8117647
. Rather than that, it could be useful to show something such as "Question 1", "Question 2" per default.
eg border: 1px dashed grey;
Currently, when a server isn't responding and an error is displayed after a form submission, the spinner is still spinning. We should stop it when an error occurs.
This is especially true when the target server is booting (the case of heroku free dynos for instance).
refs #6 (comment)
The storage service used should be pluggable, so it's possible to store the data in CozyCloud, CouchDB or remoteStorage.
With JSONSchema it is possible to set a empty value as Nullable.
{
"type":"object",
"properties":{
"user":{
"type":"object",
"properties":{
"profileType":{
"type":["string", "null"],
"enum":[
"INTERNAL_SHORT_PROFILE",
"EXTERNAL_SHORT_PROFILE",
"DEMO_SHORT_PROFILE"
]
},
"userId":{
"type":["string", "null"]
},
"email":{
"type":["string", "null"]
},
"photoId":{
"type":["string", "null"]
},
"statusPhrase":{
"type":["string", "null"]
},
"country":{
"type":["string", "null"]
},
"city":{
"type":["string", "null"]
},
"company":{
"type":["string", "null"]
},
"jobTitle":{
"type":["string", "null"]
},
"presenceStatus":{
"type":["string", "null"],
"enum":[
"OFFLINE",
"AVAILABLE",
"BUSY",
"AWAY",
"HIDDEN"
]
},
"emails":{
"type":"array",
"items":{
"type":"object",
"properties":{
"email":{
"type":["string", "null"]
},
"validated":{
"type":"boolean",
"required":true
},
"default":{
"type":"boolean",
"required":true
}
}
}
},
"phones":{
"type":"array",
"items":{
"type":"object",
"properties":{
"rawPhoneNumber":{
"type":["string", "null"]
},
"e164PhoneNumber":{
"type":["string", "null"]
},
"validated":{
"type":"boolean",
"required":true
},
"validable":{
"type":"boolean",
"required":true
},
"default":{
"type":"boolean",
"required":true
}
}
}
},
"tags":{
"type":["array", "null"],
"items":{
"type":["string", "null"]
}
},
"editable":{
"type":"boolean",
"required":true
},
"firstName":{
"type":["string", "null"]
},
"lastName":{
"type":["string", "null"]
},
"nickName":{
"type":["string", "null"]
}
}
}
}
}
When types contains null, we could add a checkbox to let people set the field value to null.
If the ckeckbox is checked, the field should not be editable.
Currently, when a widget is deleted, an alert
dialog is shown to the users. We should find another mechanism instead.
I like the idea to change the label of the "delete" link to "are you sure"? and let the user click again, or display the user with a "cancel" link.
This can replace the "edit form property" link in the menu.
Step to reproduce:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.