Visibility of context storage options

A couple of suggestions/observations around context storage options...

  1. If you blindly follow the directions in the documentation, Node-red will error on startup.
    This is because the context storage section needs to be followed by a comma (no doubt other documentation pages also omit settings.js trailing commas).
    image

Suggestion - I understand that the code snippet is only the required text but can the comma at least be mentioned?

  1. I cannot tell if this context variable uses file or memory storage.
    a) because this text is almost invisible (my eyesight is not 100%)

    b) because the two options use the same icon.
    image

The text opacity seems to be set to 0.3 in the code. I can use CSS to make it even less visible but the 0.3 seems to be the upper limit.

Suggestion - remove the inline opacity setting so that it can be tweeked by an editor CSS file.

Using the icon fa-database (a disc pack) strongly implies filesystem storage.

Suggestion - Use fa-pencil-square for filesystem storage and fa-pencil-square-o for memory. They may not be intuitive but at least they are not actively misleading.
image

image

1 Like

Since you can have more than file and memory, this would not really be sensible.

Perhaps allowing the user to set the icon would be a better suggestion?

e.g.

contextStorage: {
  file: {
    module: 'localfilesystem',
    icon: 'fa fa-file'
}

Reasonable request.

1 Like

:+1:

Great idea.

1 Like

But then need to sanitise that of course to stop fa-5x etc

It seems that most editor icons are not font-awesome icons but SVG files in /usr/lib/node_modules/node-red/node_modules/@node-red/nodes/icons, which have presumably been created specifically for Node-red

Is the change node alone in using a font-awesome icon?
Is there a better alternative SVG?

Nah, let em 'av' at it I say :wink:

4 Likes

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.