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

ui-control colon in group name #1554

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

bartbutenaers
Copy link
Contributor

Description

When a group name contains a colon ":":

image

Then you should be able to escape (using backslashes) that colon for the ui-control node like this:

image

Otherwise it will trigger an error that group name "This is" cannot be found...

This PR splits only by non-escaped colons, and removes the escape characters afterwards. Then it seems to work:

groupname_colon

Related Issue(s)

1550

Checklist

  • I have read the contribution guidelines
  • Suitable unit/system level tests have been added and they pass
  • Documentation has been updated
    • Upgrade instructions
    • Configuration details
    • Concepts
  • Changes flowforge.yml?
    • Issue/PR raised on FlowFuse/helm to update ConfigMap Template
    • Issue/PR raised on FlowFuse/CloudProject to update values for Staging/Production

Labels

  • Includes a DB migration? -> add the area:migration label

@Steve-Mcl
Copy link
Contributor

Thanks for your support, Bart. ❤️

@joepavitt
Copy link
Collaborator

Documentation you've added shows to escape it with \, but your example escapes with \\?

@joepavitt joepavitt self-requested a review December 23, 2024 17:01
@Steve-Mcl
Copy link
Contributor

Documentation you've added shows to escape it with \, but your example escapes with \\?

It'll be because it's inside JSON I imagine.

As for the whole escape using backslash - I have reservations (but cannot put my finger on why). Things like CSV usually just double up the character :: or html use an alt code.

Ideally, We would support better structured property for specifying the page (not just a string joined by a random colon) but I understand this is a throwback from dashboard 1. In fact, I've always been super curious why we don't support the node ID. There is no ambiguity and if I ever change the title of the page, my UI control still works.

@bartbutenaers
Copy link
Contributor Author

Hi guys,
Quick response because familly stuff going on.

  1. Yes like Steve says, escape is single \ but you need extra \ to get a valid json. I will need to correct the docs later on.
  2. Indeed while creating a fix, I indeed had a bad feeling. Not about the fix, but about the long string path. A separate page and group property is nicer imho.
  3. Yes the node id makes sense. Perhaps as an alternative way of working?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Colon in group name prevents working of group visibility
3 participants