-
Notifications
You must be signed in to change notification settings - Fork 39
Add ordered option to Multiple field in forms #162
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
Conversation
megoth
left a comment
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.
As I mentioned, The big changes in widgets/forms.js makes it really hard to review...
Also, I think you might benefit from using functional methods such as .reduce, .forEach, and .map in combination with more specialized loops that does one thing each. Using for (...) {...} with a lot of things happening in them can be hard to follow.
package.json
Outdated
| "build-types": "tsc --emitDeclarationOnly", | ||
| "postversion": "git push origin master --follow-tags", | ||
| "prepublishOnly": "npm run build", | ||
| "lint": "prettier-standard --lint 'src/**/*.js' 'src/**/*.ts'", |
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'm doing this in https://github.com/solid/solid-ui/pull/161, please revert these changes
src/acl-control.js
Outdated
|
|
||
| UI.aclControl.ACLControlBox5 = function (subject, dom, noun, kb, callback) { | ||
| var updater = kb.updater || new $rdf.UpdateManager(kb) | ||
| UI.aclControl.ACLControlBox5 = function (subject, dom, noun, kb, _callback) { |
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 also done in https://github.com/solid/solid-ui/pull/161, please revert this change from this PR.
| } | ||
|
|
||
| for (let g = 0; g < things.length; g++) { | ||
| var thing = things[g] |
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 think a .forEach would better suit this loop, since you only refer to things once.
src/widgets/forms.js
Outdated
| // list.append(object) | ||
| ins = [$rdf.st(subject, property, list)] // Will this work? | ||
| } else { | ||
| const oldList = new $rdf.Collecion(list.elments) |
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.
Typo - $rdf.Collection --> $rdf.Collection
src/widgets/forms.js
Outdated
| } | ||
| list.elements.splice(i, 2, list.elements[i + 1], list.elements[i]) | ||
| } | ||
| saveListThenRefresh() |
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.
Maybe use await before the calls of saveListThenRefresh()?
| // box.appendChild(dom.createElement('h3')).textContent = "Fields:". | ||
| var body = box.appendChild(dom.createElement('tr')) | ||
| var tail = box.appendChild(dom.createElement('tr')) | ||
|
|
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.
Please don't do this big moves of functionality in commits that has other big changes - makes it really hard to review what has changed...
Co-Authored-By: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-Authored-By: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-Authored-By: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-Authored-By: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-Authored-By: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-Authored-By: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-Authored-By: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-Authored-By: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-Authored-By: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-Authored-By: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-Authored-By: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-Authored-By: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-Authored-By: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-Authored-By: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-Authored-By: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-Authored-By: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-Authored-By: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-Authored-By: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-Authored-By: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Thank you for all your suggestions @TallTed ^_^ Co-Authored-By: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-Authored-By: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
megoth
left a comment
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.
LGTM
Currently untested