Comments (7)
💯
So we won't call this API layer directly in React components, but rather in async action creators, right?
Sidenote: to leverage full potential of Redux, we can try to put as few logic as possible on React side (even in containers) and rather create meaningful action creators + selectors, and bind them in @connect.
from neos-ui.
Right, the points you've mentioned: 👍
from neos-ui.
Note for later use: For JSON scheme validations we could use https://github.com/hapijs/joi
from neos-ui.
Though I could see a stream based API as a more future proof solution, for example if you want to retrieve bunch of nodes and want to process them one node at a time(faster rendering), I think we should start small. So here comes a small and simple API draft.
// Needs to be set initially, otherwise the API throws errors.
window.neos.setCsrfToken('myToken');
// Retrieve a node, returns a promise.
window.neos.node('path/to/my/node').get().then(nodeData...);
// Set data of a a node, returns a promise as well.
window.neos.node('path/to/my/node').set({
data...
}).then(newNode).catch(e);
I think this will cover pretty much everything, except one thing. We still need events in some way, since inspector editors/wizards will set data of nodes and this needs to be reflected in the main UI (publish dropdown f.e.). Currently I don't know if events will be a good solutions for this, since I don't want us to create a big event mess in bigger UIs with a lot of custom inspector editors. And thats why I was thinking about streams as well...
Would love some feedback on this @dimaip @grebaldi @skurfuerst
from neos-ui.
How do we get multiple nodes with such API? E.g. to render a list of nodes, or render a tree of nodes.
How would you fetch nodes in different context?
Remind me, why do we identify nodes by path and not by id+context?
I think @kitsunet should have an opinion about this one too.
from neos-ui.
nodeData
this is a defined name on the PHP side, for clarity sake it should never appear in the client please.
Path is important if you moved nodes and work with structure. Basically on a structural level you will want to deal with paths (child named "foo" of parent "/sites/mysite/home/" etc.) and on a technical level you might want or need to work with identifiers to keep same stuff together across dimensions and workspaces (like references, I reference a specific node and the only valid replacement for other dimensions is a node iwth the same identifier regardless of the path).
from neos-ui.
we won't do this now (before 1.0.0); maybe lateron based on Graphql
from neos-ui.
Related Issues (20)
- WIP: Schnappsidee: Provide alternative for client eval's conditional logic and hidden fields HOT 1
- Neos9 Either reimplement or fully remove `presetBaseNodeType`
- FEATURE: Change order of fields in creation dialog (showInCreationDialog) HOT 2
- Creation dialog icons are not shown in Neos installations with subfolder setting
- FEATURE: Make MultiSelectBox drag&drop sorting feature optional HOT 1
- Inconsistent conversion in `CreationDialogPropertiesCreationHandler`
- `neos/content` throws 500 if no site exists and menu drawer is not accessible
- Back button in node creation handler does not work in secondary editor mode HOT 1
- BUG: Horizontal merging of table cells doesn't work when header column is used HOT 1
- BUG: Dont bundle react-dom/server
- FEATURE: Enable table captions in CKEditor HOT 2
- BUG: Unable to add text before or after a table is added to an inline editable
- BUG: reference editor `createNew` only handles hardcoded `title` property but not custom one
- TASK: 9.0 remove leftover manual context path string operations HOT 1
- BUG: Neos9 `ReferenceEditor` `createNew` doesnt work HOT 1
- BUG: Children of previously opened node are missing after search
- EPIC: Neos 9.0 Conflict Resolution
- FEATURE: Lock the UI and present a modal during publish/discard
- FEATURE: Offer resolution strategies when conflicts arise during rebase HOT 2
- FEATURE: Iframe error handling with proper user feedback
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neos-ui.