-
Notifications
You must be signed in to change notification settings - Fork 38
Add uniforms to starter app #417
Conversation
client/package.json
Outdated
"typescript": "3.8.3" | ||
"typescript": "3.8.3", | ||
"uniforms-ionic": "^0.0.11", | ||
"uniforms": "v3.0.0-alpha.3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pinged @radekmie to see when beta will be available.
DataSync starter itself is designed as template that various parties can push to production.
It will be nice to use some beta/prerelease version etc.
Happy to get alpha in as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, we are almost there. My wishful plan is to get a final release candidate by the end of June, but I cannot guarantee that. You are not the only ones using the latest alpha though, therefore I'm quite confident about the stability of each release.
I think it should say "uniforms": "3.0.0-alpha.3",
or "uniforms": "^3.0.0-alpha.3",
though. Or is this v
prefix something I don't know?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@radekmie Ah, that is good to know, looking forward to the release. I have found one or two issues using it in another project for a POC (mainly with JSON schema, I will create the issues. I'll fork the repo too and have a play around with it to see if I can sort that out.
You are correct on that, I will update it to "uniforms": "^3.0.0-alpha.3"
, but I think somehow yarn
is still able to parse the v3.0.0-alpha.3
import { LongTextField } from 'uniforms-ionic'; | ||
|
||
const s = new SimpleSchema({ | ||
title: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we use mongo we can add some of the elements now to the task to present capabilities of the forms. We use here an only string. Maybe some checkboxes etc.
Suggestions:
- suggestedStartTime
- suggestedStartDay
- finishedNote (when task is completed it is marked with note)
- incidents (Long string field to mark some problems with task)
- priority
- links (string with possible external references)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is optional, but we can copy some stuff from https://openvolunteer.org
I will add relationship later on as with relationship this will be much better (something like task having OneToOne comment rather than finishedNote field
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that sounds like a good idea. I can flesh this out a bit and add a few more fields to this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinking about this a little bit, maybe this part we can think about add it in as a separate PR. Just so we can get the forms added in without too much of a drastic change (from the UI side).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.. I'm happy to add this. I will create an issue and assign this to myself.
client/src/pages/UpdateTaskPage.tsx
Outdated
<IonToast | ||
isOpen={showToast} | ||
onDidDismiss={() => setShowToast(false)} | ||
message={errorMessage} | ||
position="top" | ||
color="danger" | ||
duration={2000} | ||
duration={20000} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be too long. Not opinion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh whoops, that was me debugging. Will fix
client/package.json
Outdated
"typescript": "3.8.3" | ||
"typescript": "3.8.3", | ||
"uniforms-ionic": "^0.0.11", | ||
"uniforms": "v3.0.0-alpha.3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, we are almost there. My wishful plan is to get a final release candidate by the end of June, but I cannot guarantee that. You are not the only ones using the latest alpha though, therefore I'm quite confident about the stability of each release.
I think it should say "uniforms": "3.0.0-alpha.3",
or "uniforms": "^3.0.0-alpha.3",
though. Or is this v
prefix something I don't know?
</IonItem> | ||
<IonButton className="submit-btn" expand="block" type="submit">Create</IonButton> | ||
</form> | ||
<TaskForm handleSubmit={submit} model={{}} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An empty object is the default value for model
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I'm overloading the TaskForm component for update and edit so I'm passing an empty object in for the add component
and then passing in values for the edit/update component
, which allows me to re-use the form
@wtrocki ping |
Amazing job. Works like dream |
Description
Checklist
npm test
passesnpm run build
works