tsdataclinic / data-gather Goto Github PK
View Code? Open in Web Editor NEWA data entry app builder to publish any interactive data collection flows
License: Apache License 2.0
A data entry app builder to publish any interactive data collection flows
License: Apache License 2.0
Create a view that allows inputting required information to connect to Airtable.
Airtable requires the following to connect:
Info should be saved somewhere so repeat information isn't required to be inputted. Probably also want to make viewing/editing behind authentication when that's ready
Also, reading/writing to tables/columns requires knowing the table/field IDs (you can get these from the API docs specific to the account). So need to come up with a way to get that information so interview-app can read/write. Airtable has a metadata API https://airtable.com/api/meta but it is not open access and requires applying to a waitlist https://airtable.com/shrWl6yu8cI8C5Dh3
This is a very broad task. We need a general representation for all types (e.g. an Interview, a Screen, etc.) that we will use in the frontend.
We also need a standard JSON schema for how an Interview will be represented when exported. It's likely that there will be minor differences between the TypeScript types and the JSON schema. For example, in TypeScript we will want any date
fields (e.g. if we track a createdDate field) to be an actual Date
type, whereas in JSON this will have to be a string). Are there other differences we should expected between the TypeScript types and the JSON schema we need to output when publishing an interview?
Blocked on scoping out what Airtable operations we want to support and how that will translate to "Interview" configurations
Do the same for when "New Question" is clicked.
After submitting the modal, an Interview should be created in IndexedDB, and we should now be in the Interview page where the user can now configure the entire interview
For example, clicking on an Entry should scroll the page to that Entry in the interview page.
Follow the FastAPI docs to set up a basic server: https://fastapi.tiangolo.com/tutorial/first-steps/
server/
directorypublic/
server/
src/
/api/health
that just returns text "Server is up"(A "health" endpoint is a good convention for when you need to set up automated tests, or CI/CD, to validate if the API server is up and running)
src/models/*
you will see the TypeScript models we've been using. Each of these models has a Serialized*
interface that represents what we should be storing in the backend. Use that type to model your SQLAlchemy classes. Feel free to change any member names if necessary (e.g. if Python/SQLAlchemy convention is to use underscores rather than camel case).No need to add any other functionality yet to populate the databases. Just creating the database and tables is enough for this issue!
Even though Actions are now persisted, they do not update on the left side bar yet. We want the sidebar to show Actions similarly to how we expect Entries to get listed there.
As for what label to use, we can just use "Action: Push" or "Action: Skip" (you should be able to use actionTypeToDisplayString
to turn the ActionType to a string)
We do not have to follow this hierarchy, but this is an example hierarchy:
class IndexedDBWrapper {
// wraps Dexie
}
class ServerAPI {
// does actual calls to our server
}
// this is what the user would call
class API {
constructor() {
this.browserAPI = new IndexedDBWrapper();
this.serverAPI = new ServerAPI();
}
getInterview(interviewId: string) {
return this.browserAPI.getInterview(interviewId);
}
}
Then in our React components we would never call IndexedDB or Server directly, we would use stuff like API.getInterview()
Then when it's time to switch from the browser to server's API it's as simple as just changing the functions in the class API
NOTE you do not have to use any of the names I just used for the classes. This was just an example to illustrate my point. Name things however you want. And structure things differently if you have a better idea!
Also, now that we use a single "Save", we can simplify the API to just use a updateScreen
function that saves the entire thing.
When "Always execute this action" is unchecked we get the conditional operator row. The "Condition" dropdown is currently hardcoded to just show "Response Key 1" and "Response Key 2"
This dropdown should instead use the ids from:
Changes to the milestone payload (currently just an input text box) should persist when saved
Ask Izaak what this checkpoint means in terms of an Interview, in case there is more UI we need than just a string. For example, is this a freetext string, or are there constraints to it?
Need to decide where in the design this button should go, but there should be an ability to delete an interview.
After the interview is deleted we should be directed back to the "My Interviews" page
What operations should a user be able to do with Airtable and how does it translate to an "interview" operation?
For example, we know that we need to allow Airtable lookups. What does that mean in terms of our Interview UI?
We will need to add a new Entry type that is called "Lookup" and then what? What configuration will be needed for it? Selecting a table name? A column name? Etc.
What about for other operations? For example, we'll likely want a conditional action to write back to Airtable. How does that get configured?
We need to scope all this out.
ActionCard
edits should change modifiedActions
This will require working closely with Pablo to figure this out.
Azure AD B2C is the authentication service that security has approved for us. So far we use it in only one other app and it's in NodeJS. This will be an adventure to figure out with Python.
Blocked on a multiselect UI component being created
Write to DB using API layer
When an Action type is changed, the Payload UI should change. Right now, only "Push" is working. (We let you select a screen to Push. Technically we should let you select multiple screens, but until we have a Multiselect component we will leave it at this)
{ [key]: value }
You'll want to update the renderEditor
function in ActionConfigEditor
after #52 gets merged. That function has a switch
block that renders a different UI based off of the action type.
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.