Vue.js uses `<template>` when we don't want to output an element but still
want to set some attributes (like `v-if`) on a piece of text. Since we're
outputting a `<span>`, we can just move the attributes there.
Breadcrumbs are served as JSON at `/nodes/{node ID}/breadcrumbs`, with
the top-level parent listed first and the node itself listed last:
{breadcrumbs: [
...
{_id: "parentID",
name: "The Parent Node",
node_type: "group",
url: "/p/project/parentID"},
{_id: "deadbeefbeefbeefbeeffeee",
name: "The Node Itself",
node_type: "asset",
url: "/p/project/nodeID",
_self: true},
]}
When a parent node is missing, it has a breadcrumb like this:
{_id: "deadbeefbeefbeefbeeffeee",
_exists': false,
name': '-unknown-'}
Of course this will be the first in the breadcrumbs list, as we won't be
able to determine the parent of a deleted/non-existing node.
Breadcrumbs are rendered with Vue.js in Blender Cloud (not in Pillar);
see projects/view.pug.
The filter and column settings in tables are stored per project and
context in the browsers localStorage. This makes the table keep the
settings even if the browser is refreshed or restarted.
The table emits a "componentStateChanged" event containing the tables
current state (filter/column settings) which then is saved by the top
level component.
For the user:
Ctrl + L-Mouse to select multiple tasks/shots/assets and then edit
the nodes as before. When multiple items are selected a chain icon
can be seen in editor next to the fields. If the chain is broken
it indicates that the values are not the same on all the selected
items.
When a field has been edited it will be marked with a green background
color.
The items are saved one by one in parallel. This means that one item
could fail to be saved, while the others get updated.
For developers:
The editor and activities has been ported to Vue. The table and has
been updated to support multi select.
MultiEditEngine is the core of the multi edit. It keeps track of
what values differs and what has been edited.
* Drag and drop files to comment editor to add a file attachment
* Using Vue to render comments
Since comments now has attachments we need to update the schemas
./manage.py maintenance replace_pillar_node_type_schemas
Changed how and what we store in elastic to unify it with how we store
things in mongodb so we can have more generic javascript code
to render the data.
Elastic changes:
Added:
Node.project.url
Altered to store id instead of url
Node.picture
Made Post searchable
./manage.py elastic reset_index
./manage.py elastic reindex
Thanks to Pablo and Sybren
project.
Javascript tutti.js and timeline.js is needed, and then the following to
init the timeline:
$('.timeline')
.timeline({
url: '/api/timeline'
});
# Javascript Notes:
## ES6 transpile:
* Files in src/scripts/js/es6/common will be transpiled from
modern es6 js to old es5 js, and then added to tutti.js
* Files in src/scripts/js/es6/individual will be transpiled from
modern es6 js to old es5 js to individual module files
## JS Testing
* Added the Jest test framework to write javascript tests.
* `npm test` will run all the javascript tests
Thanks to Sybren for reviewing