When working with multiple databases - possibly on multiple servers - it can be hard to know which DB you are currently connected to. As you have also seen in the previous chapters, there are several locations in the UI where neo4j Commander needs to show nodes and relationships and by default it does this in a rather random fashion BUT you can use Preferences to optimize your experience and productivity drastically.
Select "Preferences" from the main menu (top left):
- DB Name ... assign a unique name. This will be shown in the top bar of the app so you always know which DB you are connected to
- Toolbar Color ... for example set it to #F00 on a production DB for a visual warning
- Node Labels > Hidden Labels ... enter one or more node labels (comma separated) that should not be shown in search results and other places where nodes are shown. The label editor of the node editor always shows ALL labels, of course.
- Node Avatars - see video below!
- URL ... fixed image per label - e.g. https://domain.com/img.jpg
- property name ... property contains URL e.g. img
- Favorite Node Properties ... Here you can define the node properties you are most interested in and that most likely let you distinguish between nodes. These favorite properties are used in the search result and the first property you enter here, will be shown as the title of a node editor and in the node preview of the relationships lists. (comma separated)
- Favorite Relation Properties ... shown in the relationships-lists (comma separated)
You can set these preferecens according to your data schema to optimize the UI/UX. And since these settings are so tighlty related to the data model of your DB, these preferences are stored inside the DB in a special "N2Neo4j" node.
Note: The query history, last opened editos and editor bookmarks are stored in the browser's localStorage on a per-database basis.
emoji_objectsTip: If you are using OGM/SDN to map classes to DB nodes, the nodes are automatically assigned labels for the object's class and all super classes. E.g. a User class might be derived from AbstractUser which in turn is derived from AbstractEntity. Use the "Hidden Labels" feature set to "AbstractEntity,AbstractUser" to hide those labels and avoid visual clutter.
The UI of neo4j Commander has changed since the following video was recorded but the Node Avatar feature is still the same and works as shown: