Skip to content
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

template node will consume space on page even if its empty #1434

Open
WhiteLionATX opened this issue Nov 1, 2024 · 4 comments
Open

template node will consume space on page even if its empty #1434

WhiteLionATX opened this issue Nov 1, 2024 · 4 comments
Labels
feature-request New feature or request that needs to be turned into Epic/Story details size:M - 3 Sizing estimation point

Comments

@WhiteLionATX
Copy link

WhiteLionATX commented Nov 1, 2024

Current Behavior

adding template to a group widget will add an spaceholder.

Expected Behavior

if template is empty or does only contain script there should not any space be reserved for the node at ui.

Steps To Reproduce

add an template node to a ui group and watch how it expands.

Environment

  • Dashboard version:
  • Node-RED version:
  • Node.js version:
  • npm version:
  • Platform/OS:
  • Browser:

Have you provided an initial effort estimate for this issue?

I have provided an initial effort estimate

@WhiteLionATX WhiteLionATX added bug Something isn't working needs-triage Needs looking at to decide what to do labels Nov 1, 2024
@joepavitt
Copy link
Collaborator

This is by design currently as it can provide a "spacer", i.e. push widgets right of the screen and provide an empty space for design reasons.

We're about to introduce a dedicated "Spacer" node to achieve this, so we wouldn't have a need for that use with template anymore.

However, that being said, if you've asked Dashboard to add a template, I don't think we should be trying to be "smart" and work out whether or not to render it. If you don't want it there, why can't you just remove it?

@WhiteLionATX
Copy link
Author

WhiteLionATX commented Nov 4, 2024

I am sorry not to be clear:
I need the template node and use it as script (group widget). But its nothing more than that (no UI elements are created by template node). But it eats space. I give you an example:

All the space marked red is used for a script containing template node (two nodes for each button one needed):
image

template node containing nothing than a script and should not eat any space at the UI then:
image

@joepavitt
Copy link
Collaborator

Ah, very interesting use case that I hadn't considered. We may need to add an option here then that enables you to "hide" the rendering of the template, but maintains the functionality under the covers.

@joepavitt joepavitt moved this from Backlog to Up Next in Dashboard Backlog Nov 5, 2024
@joepavitt joepavitt added size:M - 3 Sizing estimation point feature-request New feature or request that needs to be turned into Epic/Story details and removed needs-triage Needs looking at to decide what to do bug Something isn't working labels Nov 5, 2024
@hotNipi
Copy link
Contributor

hotNipi commented Nov 6, 2024

Meanwhile as a workaround this should work:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request that needs to be turned into Epic/Story details size:M - 3 Sizing estimation point
Projects
Status: Up Next
Development

No branches or pull requests

3 participants