-
Notifications
You must be signed in to change notification settings - Fork 52
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: refactoring element identification #1583
Open
bartbutenaers
wants to merge
2
commits into
FlowFuse:main
Choose a base branch
from
bartbutenaers:ui-control-refactoring-input
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
ui-control: refactoring element identification #1583
bartbutenaers
wants to merge
2
commits into
FlowFuse:main
from
bartbutenaers:ui-control-refactoring-input
+372
−168
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 tasks
Not sure why the unit test fails:
And that "looks" to work fine for multiple input formats: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR is a replacement of another. Because I got there the feedback from @joepavitt and @Steve-Mcl that it should also be possible to select pages and groups based their node ids.
Moreover I saw another issue passing by, which is a feature request to be able to target also widgets (instead of only groups and pages). However I am stuck with this! Would be nice if anybody could assist me with this, otherwise I cannot finalize this PR. The problem is that the request (to turn off the visibility of a widget) arrives at the frontend but the widget remains visible:
I tried to add the part for "ui/widgetstate" in the above screenshot, because I thought that works already for
msg.visible
(?) but nothing happens ;-(And finally I experienced myself another bug in the original code, that you can specify "pageName:groupName" and the group is controlled even when the page with that name doesn't exist. That has been fixed in this PR, but that also means a breaking change if some flows relay on that bug. But it makes no sense at all to keep that bug alive...
Due to all the above reasons, I decided that I needed to completely refactor the element identification code. I have done this in a series of iterations, because I was not pleased with my intermediate implementations. Hopefully the current one is ok for you guys...
As you can see in the node info panel, much more selectors are now allowed:
The following example flow demonstrates this (except the widget stuff does NOT work yet as explained above):
P.S. Don't know if it is possible to share such flows somewhere (via the Import menu examples perhaps), because it would really help users to get started...
Summarized the changes of this refactoring:
:
inside the names is fixed.Related Issue(s)
1550 and 711
Checklist
flowforge.yml
?FlowFuse/helm
to update ConfigMap TemplateFlowFuse/CloudProject
to update values for Staging/ProductionLabels
area:migration
label