Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Allow data-lake variables to auto trigger actions #1675

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

rafaellehmkuhl
Copy link
Member

@rafaellehmkuhl rafaellehmkuhl commented Feb 6, 2025

image

.

To be merged after #1674
Fix #1641

Copy link
Contributor

@ArturoManzoli ArturoManzoli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still reviewing code, but for now, there is an UI issue:

  • Change the save button text color to white (1)

image

@rafaellehmkuhl rafaellehmkuhl force-pushed the allow-data-lake-variables-to-auto-trigger-actions branch from 4ef8033 to 935c0e8 Compare February 6, 2025 18:29
Copy link
Contributor

@ES-Alexander ES-Alexander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The actual triggering seems to work, but:

  • There's no description of the link functionality in the help text at the top
    • e.g. "Actions can be run manually, or configured to trigger automatically when a linked Data Lake variable changes"
  • Dropdown is light themed (and so are the others in the Actions section), while the rest of the interface uses dark ones:
    Screenshot 2025-02-07 at 5 57 54 am
  • Variables aren't searchable, so you need to scroll for ages to find what you're looking for
  • Configured variables can't be removed from in the bar, so they need to be found again
    • Each selected pill should ideally have a little x on the right for removing it

As something of a side note, it's hard to test using actual values, because they can't be set manually, and #1542 means sliders seemingly can't be used for integer values, and #1678 means dials aren't usable for PWM values and the like :(

@rafaellehmkuhl
Copy link
Member Author

The actual triggering seems to work, but:
Will fix all the raised points.

As something of a side note, it's hard to test using actual values, because they can't be set manually, and #1542 means sliders seemingly can't be used for integer values, and #1678 means dials aren't usable for PWM values and the like :(

Yeah...
I need to add that functionality for adding/removing variables and persist them, but while that, try this branch, as it adds the hardcoded variables for the camera.

@ES-Alexander ES-Alexander added the docs-needed Change needs to be documented label Feb 7, 2025
@ArturoManzoli
Copy link
Contributor

It works very well.
But is it possible to set a value or a range for that data lake variable to trigger the action? If not, could it be implemented on this PR?

For example, if water temp goes above 28º C, trigger the action that let some cold water in.

@rafaellehmkuhl
Copy link
Member Author

It works very well. But is it possible to set a value or a range for that data lake variable to trigger the action? If not, could it be implemented on this PR?

For example, if water temp goes above 28º C, trigger the action that let some cold water in.

I think it can fit here, yes. Let me give it a try!

@rafaellehmkuhl rafaellehmkuhl force-pushed the allow-data-lake-variables-to-auto-trigger-actions branch 3 times, most recently from ebaa73e to 2328b38 Compare February 17, 2025 19:23
@rafaellehmkuhl
Copy link
Member Author

rafaellehmkuhl commented Feb 17, 2025

It works very well. But is it possible to set a value or a range for that data lake variable to trigger the action? If not, could it be implemented on this PR?
For example, if water temp goes above 28º C, trigger the action that let some cold water in.

I think it can fit here, yes. Let me give it a try!

@ArturoManzoli, about that, I was reviewing the auto-trigger functionality and its architecture, and I'm yet unsure if this threshold behavior would be best fitted here and how, since we can have different types of variables (booleans, numbers and strings), and a dedicated interface would be needed for each one.

I propose we go with the base functionality as it is, as it fulfills the needs for the radcam support, and leave the extended functionality (trigger on condition) for a future PR. I can open an issue to track that as well.

@ES-Alexander do you remember if there's an issue around that already?

@rafaellehmkuhl rafaellehmkuhl force-pushed the allow-data-lake-variables-to-auto-trigger-actions branch from 2328b38 to c00c4a5 Compare February 17, 2025 19:30
@rafaellehmkuhl
Copy link
Member Author

The actual triggering seems to work, but:

  • There's no description of the link functionality in the help text at the top

    • e.g. "Actions can be run manually, or configured to trigger automatically when a linked Data Lake variable changes"
  • Dropdown is light themed (and so are the others in the Actions section), while the rest of the interface uses dark ones:

  • Variables aren't searchable, so you need to scroll for ages to find what you're looking for

  • Configured variables can't be removed from in the bar, so they need to be found again

    • Each selected pill should ideally have a little x on the right for removing it

As something of a side note, it's hard to test using actual values, because they can't be set manually, and #1542 means sliders seemingly can't be used for integer values, and #1678 means dials aren't usable for PWM values and the like :(

All done!

@ArturoManzoli
Copy link
Contributor

I propose we go with the base functionality as it is, as it fulfills the needs for the radcam support, and leave the extended functionality (trigger on condition) for a future PR. I can open an issue to track that as well.

Sure, no problem

Copy link
Contributor

@ArturoManzoli ArturoManzoli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works very well!

Those CSS problems @ES-Alexander mentioned were only visible on macOS's Crome.
I've seen that before and it usually happens on selectors and color pickers from vuetify.
Let's keep an eye on them.

@ES-Alexander
Copy link
Contributor

I propose we go with the base functionality as it is, as it fulfills the needs for the radcam support, and leave the extended functionality (trigger on condition) for a future PR. I can open an issue to track that as well.

@ES-Alexander do you remember if there's an issue around that already?

@rafaellehmkuhl it's covered by idea 3 in #1538, but is perhaps still worth having a dedicated sub-issue for? :-)

Copy link
Contributor

@ES-Alexander ES-Alexander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly working well and looking good now! :D

A minor polish problem is that searching opens the dropdown without the dropdown element realising it is open, so then clicking out of the search bar keeps it open, and you need to click twice on the dropdown component arrow to make it close properly:

Screen.Recording.2025-02-19.at.4.33.39.am.mov

There also seems to be an internal blue element highlight for the dropdown components, which seems unnecessary and looks weird.

<li>
You can also link actions to Data Lake variables, by clicking the link icon. When configuring that, any
changes to the variable value will automatically trigger the linked action.
</li>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<li>
You can also link actions to Data Lake variables, by clicking the link icon. When configuring that, any
changes to the variable value will automatically trigger the linked action.
</li>
<li>
The link button can be used to link Actions to Data Lake variables, so that changes to the variable
value will automatically trigger the linked action.
</li>
<li>Actions can also be tested/run manually, using the play button.</li>

@rafaellehmkuhl
Copy link
Member Author

Mostly working well and looking good now! :D

A minor polish problem is that searching opens the dropdown without the dropdown element realising it is open, so then clicking out of the search bar keeps it open, and you need to click twice on the dropdown component arrow to make it close properly:

There also seems to be an internal blue element highlight for the dropdown components, which seems unnecessary and looks weird.

All fixed.
I made it so the dropdown menu opens automatically when the search is focused (so the user can readily see the results) and closed when it is unfocused or cleared.

…e variables

- Added a new button in the configuration view to link actions to data-lake variables
- User can specify the minimum interval between two automatic calls to the action
@rafaellehmkuhl rafaellehmkuhl force-pushed the allow-data-lake-variables-to-auto-trigger-actions branch from a2448a1 to c85f739 Compare February 20, 2025 20:34
@rafaellehmkuhl
Copy link
Member Author

image

@ES-Alexander @Williangalvani let me know what you think.

Also another question: should the minimum interval between calls be only for auto-trigs or for any trigs (like joystick button calls)? I'm leaning for the latter, as it solves two problems with the same implementation and gets clearer to the user as well.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
docs-needed Change needs to be documented
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow actions to be triggered when associated data-lake variables change
3 participants