-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Separate the "add new config-node" option into a new (+) button #4627
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given the new button takes up horizontal space, making the select box narrower, I don't think we should also change the 'add new' message to push the type further to the right.
Also, by removing the _ADD_
option from the select box if there are existing config nodes, it is no longer possible to leave the property unset. It forces you to pick an existing config node even if that isn't what you want it to do.
It may be an edge case, but being able to unset the value is something we should allow for.
packages/node_modules/@node-red/editor-client/locales/en-US/editor.json
Outdated
Show resolved
Hide resolved
packages/node_modules/@node-red/editor-client/locales/fr/editor.json
Outdated
Show resolved
Hide resolved
Do you want me to add a “nothing” option? So there will be 2 basic options (add and nothing) then the different options plus nothing? |
Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
Something like that? Enregistrement.de.l.ecran.2024-03-28.a.13.40.25.mov |
... maybe... I'm not sure. It's one of the reasons this particular bit of UI has not received the update it has needed for so long. Trying to find the right UI that works for the different valid states it can be in. I do agree having the |
Just having a "None" option would work imo |
I am hesitating between the following for the case without options (no node available):
Then available options and "none" option. |
"None" or "Add new..." make sense to me. Definitely not both together |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor changes to add a 'none' option, and add tooltips to the buttons
Proposed changes
This PR reduces the number of three steps into one to add a config-node by clicking a new (+) button.
The "edit" button will be disabled if no option is available. The "add" option is removed from the list as soon as it contains at least one option.
Requested by @joepavitt on the forum.
PS: I don't know if I should also adapt the test files? (
10-mqtt_page.js
and22-websocket_page.js
)Checklist
npm run test
to verify the unit tests pass