# Visibility of context storage options

**URL:** <https://discourse.nodered.org/t/visibility-of-context-storage-options/88079>\
**Category:** Core Development\
**Tags:** editor, context\
**Created:** [18 May 2024 11:06 UTC](https://discourse.nodered.org/t/visibility-of-context-storage-options/88079 "2024-05-18T11:06:47Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [18 May 2024 11:06 UTC](https://discourse.nodered.org/t/visibility-of-context-storage-options/88079/1 "2024-05-18T11:06:47Z")

</div>

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](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/c/7c250dad3c886853a264089cbe97c5a45ae78f03.png)

**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%)  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/7/77102c2f4a1ee3ee586bad144f51e422a420723c.png)  
b) because the two options use the same icon.  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/e/6e9d804463feec4357cde0bcef757ca8280640e0.png)

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](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/f/9f7aa97df5968bac59b39077ec554440c3db1fda.png)

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/8/8820ef964f5425f33f378b927d49406b23be31a0.png)

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [18 May 2024 11:32 UTC](https://discourse.nodered.org/t/visibility-of-context-storage-options/88079/2 "2024-05-18T11:32:19Z")

</div>

> [@jbudd](#):
>
> **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](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/f/9f7aa97df5968bac59b39077ec554440c3db1fda.png)

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.

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

```

  

> [@jbudd](#):
>
> 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.

Reasonable request.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [18 May 2024 14:10 UTC](https://discourse.nodered.org/t/visibility-of-context-storage-options/88079/3 "2024-05-18T14:10:54Z")

</div>

> [@Steve-Mcl](#):
>
> Perhaps allowing the user to set the icon would be a better suggestion?

👍

Great idea.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [18 May 2024 17:03 UTC](https://discourse.nodered.org/t/visibility-of-context-storage-options/88079/4 "2024-05-18T17:03:08Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [18 May 2024 17:23 UTC](https://discourse.nodered.org/t/visibility-of-context-storage-options/88079/5 "2024-05-18T17:23:56Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [18 May 2024 17:58 UTC](https://discourse.nodered.org/t/visibility-of-context-storage-options/88079/6 "2024-05-18T17:58:56Z")

</div>

> [@dceejay](#):
>
> But then need to sanitise that of course to stop fa-5x

Nah, let em 'av' at it I say 😉

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [17 July 2024 17:59 UTC](https://discourse.nodered.org/t/visibility-of-context-storage-options/88079/7 "2024-07-17T17:59:00Z")

</div>

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