Skip to content

Commit

Permalink
Enhance documentation (#29)
Browse files Browse the repository at this point in the history
* Enhance documentation

* Version bump
  • Loading branch information
QubitPi committed Jun 11, 2024
1 parent 4faf814 commit cfb59d6
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 37 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,14 @@ Neo4j Browser has both unit and end to end tests running automatically on every
`yarn e2e-open` to open the Cypress test runner (requires a **fresh** installation of Neo4j to run against, expects neo4j 3.5 by default). See details below on how to configure database version.

`yarn e2e-local-open` to run against an existing server (with a password already set). We use `newpassword` as the default password here, make sure to pass your password:
`yarn e2e-local-open --env browser-password=<your-password-here>`. The name `browser-password` is a bit misleading. It's actually the password for connecting to Neo4j we just mentioned via bolt portocol, i.e. the "password" input in the image below:

![browser password screenshot](./browser-password.png)
```
yarn e2e-local-open --env browser-password=<your-password-here>
```

The name `browser-password` is a bit misleading. It's actually the password for connecting to Neo4j we just mentioned via bolt portocol, i.e. the "password" input in the image below:

![browser password screenshot](./.github/browser-password.png)

To avoid opening the Cypress test runner and just run the tests in the terminal, remove the "-open" suffix from the previous two commands (so `yarn e2e` and `yarn e2e-local` respectively).

Expand Down
15 changes: 5 additions & 10 deletions docs/modules/ROOT/pages/neo4j-arc/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -109,21 +109,16 @@ The Neo4J Browser is logically composed of 2 parts:
. A user-interface that combines the graph rendering (supported by the graphing module), database, and user
interaction together

[IMPORTANT]
[IMPORTANT] neo4j-arc does NOT generate or manage node/rel ID's
====
Although we see `<id>` property for every node or relationship in the node inspection panel of Neo4J Browser, those
ID's are NOT generated by neo4j-arc, but https://stackoverflow.com/a/67702695[instead by Neo4J database]
ID's are NOT generated by neo4j-arc, but https://stackoverflow.com/a/67702695[instead by Neo4J database]. This pattern
should be honored by all client using neo4j-arc library. All nodes or relationships, at the moment of being fed into
the module for graph viauzliation, MUST all have defined ID's.
Note: the displayed `<id>` is the value of NodeMode.id
====

[CAUTION]
====
neo4j-arc does not generate or manage node/rel ID. Any xref:operations/on-canvas-operations.adoc[on-canvas operation]
generates nodes/rel with *transient ID* only. Any node/rel ID that is to be persisted needs to be generated and
managed by external logics, such as database auto-ID or library user
====

[WARNING]
====
We will not have any TypeDoc documentation, because the TypeScript version used in Neo4J Browser is not supprted by the
Expand All @@ -141,7 +136,7 @@ image:neo4j-browser.png[width=900]
+
--
** Redux
** Sube (discussed below)
** Suber (discussed below)
** Apollo GraphQL Client
** Drag & Drop Plugin
--
Expand Down
27 changes: 3 additions & 24 deletions docs/modules/ROOT/pages/operations/on-canvas-operations.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,10 @@

*Double clicking the white area* on canvas will automatically generate a new node with

1. a transient ID prefixed with "transient-" followed by a random string. For example "transient-rxnnzr6t4x"
1. a label of "Undefined"
2. the node caption of "New Node"

[NOTE]
====

The reason that the ID being transient is due to the fact that this ID won't be persisted into database. Refreshing
the browser will replace this transient ID with a database-generated ID (in the form of a number, such as 65).

Normally, neo4j-browser feeds into neo4j-arc, which is the graphing module of neo4j-browser, with a set of
fully-hydrated set of nodes and relationships. This results in the design in neo4j-arc which is: to render a node or
relationship, the ID of it must be provided (i.e. a required argument to node/rel constructor).

Generating a new node by double-clicking, however, is an operation manged by neo4j-arc, which by design is not
responsible for generating and managing node/relationship ID's. But to implement the "realtime editing" effect, the
new node/rel ID has to be genreated at the beginning.

To resolve the conflict between original neo4j-browser design and on-canvas operation, any node/rel generated
"on-canvas" will have this transient ID.

====

2. a label of "Undefined"
3. the node caption of "New Node"

== Editing the Node Label and Properties in Inspector Panel
== Editing the Node Label and Properties in Node Inspection Panel

[NOTE]
====
Expand Down
2 changes: 1 addition & 1 deletion src/neo4j-arc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "neo4j-devtools-arc",
"version": "0.0.60",
"version": "0.0.61",
"main": "dist/neo4j-arc.js",
"author": "Neo4j Inc.",
"license": "GPL-3.0",
Expand Down

0 comments on commit cfb59d6

Please sign in to comment.