-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Let TypedInput width be calculated - but forced #5422
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
|
Dave, this will affect all existing typedinputs right? And likely not in the best where users have done something a little off-spec right (like add CSS or styles to slightly increase the label widths)? Typically, where I want the typed input to be sizable, I simply add the calc to the width of the element - the typedinputs widget then inherits that (the typedinput widget code is designed to pick up width entered by user on the origin element) e.g: where the 130px is the width of the label field. Ideally, the label field width (and other parts obv) would be a CSS variable so that users can do scoped adjustments e.g There is a lot of legacy (in existing contrib nodes) and a BIG rethink/refresh on the edit form is definitely needed, but I dont think this is the right course of action here, today? Happy to be told otherwise? |
|
yes - as per discussion on the thread I have now set this just to tweak the two file nodes for now. |
Ah sorry Dave, I haven't had time to frequent the forum today and missed the whole conversation. |
|
No probs - I expected the discussion to move over when I raised the PR as well... but it didn't 🤷 |
knolleary
left a comment
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.
Propose we don't introduce --typedInput-width-adjust as that isn't a existing thing in our code base and don't want to introduce it through the backdoor
packages/node_modules/@node-red/editor-client/src/sass/ui/common/typedInput.scss
Outdated
Show resolved
Hide resolved
packages/node_modules/@node-red/nodes/core/storage/10-file.html
Outdated
Show resolved
Hide resolved
packages/node_modules/@node-red/nodes/core/storage/10-file.html
Outdated
Show resolved
Hide resolved
|
TBH - this can be targeted to master for the maintenance release |
|
I have rebased the changes for the master branch and opened #5425 |

Proposed changes
As per discussion here - https://discourse.nodered.org/t/resize-path-field-on-resizing-editor-panel/100088 - this PR lets the typeInput box in editpanels calc it's width and resize to 100%.
BUT - this does so by using the !important tag to force it... which may or may not be a good thing...
If used without !important quite a few nodes have hardcoded style attributes that override it . so until they can all be cleaned up then this is probably the way to go... but if we are going to clean them up then we ought to apply same calc logic/style to a lot of other input fields to make them all scale nicely (at least visually)
Checklist
npm run testto verify the unit tests pass