Skip to content

Conversation

Williangalvani
Copy link
Member

@Williangalvani Williangalvani commented Jun 26, 2024

This implements the (for me) more relevant/important failsafes
image

helps #2723

@Williangalvani Williangalvani force-pushed the failsafes branch 7 times, most recently from 0b4e816 to aada0f9 Compare June 26, 2024 16:59
@Williangalvani Williangalvani marked this pull request as ready for review June 26, 2024 17:00
@patrickelectric
Copy link
Member

We should ask for marketing to come up with the icons if we want that in the next stable.

@patrickelectric patrickelectric added the merge-after-stable Should be merged only after next stable release label Jun 26, 2024
@@ -0,0 +1,231 @@
<template>
<v-form
Copy link
Member

Choose a reason for hiding this comment

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

We should not use form, this can result in NS_BINDING_ABORTED problems.

Copy link
Member Author

@Williangalvani Williangalvani Jun 26, 2024

Choose a reason for hiding this comment

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

I don't quite recall what the issue was. care to elaborate?
also it looks like we use forms quite a lot? is this a different situation?
(first result in google is purple but I don't recall what happened)

Copy link
Member

Choose a reason for hiding this comment

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

I don't quite recall what the issue was. care to elaborate? also it looks like we use forms quite a lot? is this a different situation? (first result in google is purple but I don't recall what happened)

https://github.com/bluerobotics/BlueOS/issues?q=is%3Aissue+NS_BINDING_ABORTED+is%3Aclosed

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

@Williangalvani Williangalvani Jun 26, 2024

Choose a reason for hiding this comment

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

ok that is weird. It must be a combination of things, though, right? maybe some request initialized in the form and then aborted because of the submit action?
We do have 15 other v-forms in the code, and I'm actively relying on the form validation in this component.
I'm not looking forward to changing it if the issue isn't really there.
@joaoantoniocardoso can you try the image plz? I'll do a bunch of testing here too.

I tried changing a bunch of settings both on chrome and firefox, and I couldn't see any broken requests.

Copy link
Member

Choose a reason for hiding this comment

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

I would be okay if @joaoantoniocardoso fails to replicate the issue, he's pretty good on that 😆

Copy link
Collaborator

@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.

Great start - thanks for all the hard work on this! :-)

A few comments and suggestions, mostly around language consistency and clarity.

@Williangalvani Williangalvani force-pushed the failsafes branch 3 times, most recently from 4d5e352 to 643662c Compare June 27, 2024 14:15
@patrickelectric
Copy link
Member

patrickelectric commented Jun 27, 2024

We should ask for marketing to come up with the icons if we want that in the next stable.

SMS will work on that, we can merge after stable

Copy link
Collaborator

@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.

Looking great! Just a few more small changes / suggestions, and these few extra things that I couldn't tie to specific lines of code:

  1. It seems a little weird to be able to set negative values for the battery voltages, but that might not be something we have control over within this PR

  2. When a parameter is set to a custom value (as is the case for the default value of the EKF variance threshold) the dropdown just shows up empty

    • This is also a problem in the Parameters page, but it at least shows as the custom value in the main table there, and has the option to set other custom values (but I think it's ok for the failsafes page to not support setting custom values, would just be nice if it displayed them somehow)
    Screen.Recording.2024-06-28.at.1.22.21.AM.mov
    • If this isn't fixable in this PR, I can open it as a separate issue
    • Resolved
  3. I think it would be more intuitive if fields that are linked to an Action get greyed out/disabled when the action is set to disabled

    • I'm not sure how hard that is to implement, and I can add it as a future TODO in the Issue if you don't think it's worth doing in this PR
  4. I believe this box is incorrectly being set to have a background colour, when it should be transparent so the cards are surrounded by blue (like in the other configuration pages)
    image

v-model.number="new_value"
dense
:items="as_select_items"
:rules="[() => true]"
Copy link
Member

Choose a reason for hiding this comment

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

what ?

Copy link
Member Author

Choose a reason for hiding this comment

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

also old code, doesnt's seem like it is required. removed

Comment on lines 36 to 39
custom_input
|| (param
&& !param.options
&& !param.bitmask
)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
custom_input
|| (param
&& !param.options
&& !param.bitmask
)
custom_input || (!param?.options && !param?.bitmask)

@ES-Alexander
Copy link
Collaborator

SMS will work on that, we can merge after stable

@patrickelectric feedback so far has been positive on the existing hand-drawn designs. I've mentioned that I can neaten them up or change them to not drawn ones, but that hasn't been requested or desired by the five people who've responded.

Daniel did mention that it might be a bit weird to have a different style only in this page, but we can have a think about whether that's ok since we don't have such images anywhere else, or if we perhaps want to add those kinds of images to some of our other pages as well :-)

@patrickelectric
Copy link
Member

SMS will work on that, we can merge after stable

@patrickelectric feedback so far has been positive on the existing hand-drawn designs. I've mentioned that I can neaten them up or change them to not drawn ones, but that hasn't been requested or desired by the five people who've responded.

Daniel did mention that it might be a bit weird to have a different style only in this page, but we can have a think about whether that's ok since we don't have such images anywhere else, or if we perhaps want to add those kinds of images to some of our other pages as well :-)

I agree, the feedback from SMS was: "I think we could probably keep the essence of these icons, but maybe tweak them just a little!"

@patrickelectric patrickelectric removed the merge-after-stable Should be merged only after next stable release label Jun 28, 2024
@patrickelectric
Copy link
Member

patrickelectric commented Jun 29, 2024

@ES-Alexander @Williangalvani after talking with @rjehangir, we agreed that the current icons can be used, but sms will be working to make them sharp. Meanwhile, if the PR gets ready, we can merge it before 1.3 stable.

@ES-Alexander
Copy link
Collaborator

ES-Alexander commented Jun 29, 2024

@Williangalvani there are cleaned up SVGs downloadable in the Issue, which can be switched to if you want.

@Williangalvani Williangalvani force-pushed the failsafes branch 2 times, most recently from 461b018 to 0f82b9f Compare July 1, 2024 22:06
Copy link
Collaborator

@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.

SMS requested colour changes

Copy link
Collaborator

@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.

I've confirmed that both aspects of the no-value parameter thing has been fixed - thanks! 😀
I did notice that now (?1) when you click save on a parameter in the Autopilot Parameters page the dialog goes into the "unchanged" state (with the save button greyed out). I think it would make more sense to just close the dialog, since the user is done with it, and otherwise the 'correct' interaction sequence is "change param, click save, click cancel", which is unintuitive.

Would be good if you can comment on the numbered items 1, 3, and 4 of my earlier review, as to whether they'll be included in this PR or I should open issues for them :-)

There are a couple of colour issues in my drawn70-set that I didn't notice before, but they should be fixed in the new SMS colours set anyway 👍

Footnotes

  1. This might just be an existing interface issue with the Parameter page, rather than being new, but I've just noticed it now.

@Williangalvani Williangalvani force-pushed the failsafes branch 2 times, most recently from cc8b84b to 0865c27 Compare July 4, 2024 20:23
@Williangalvani
Copy link
Member Author

@ES-Alexander the negative voltage is somewhat hard to control, the limits should be defined in the parameter metadata.

As for blocking the settings if we don't have a threshold set, I think it should be a subsequent PR, and it would probably mean we should move the action up, no? 👀

@ES-Alexander
Copy link
Collaborator

the negative voltage is somewhat hard to control, the limits should be defined in the parameter metadata.

Yeah, fair enough.

As for blocking the settings if we don't have a threshold set, I think it should be a subsequent PR, and it would probably mean we should move the action up, no? 👀

Nah, I think the actions should stay at the bottom, but the rest of the card can be greyed out / disabled, so it's clearer that the other fields aren't effective until the (normal-coloured + interactive) Action field has been configured to do something :-)

Copy link
Collaborator

@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.

Looking great! :D

Only remaining comments are:

  1. It'd be nice to have a non-zero minimum horizontal margin around the cards, to prevent this from being possible:
    Screenshot 2024-07-05 at 10 07 04 AM
  2. I think low battery is more important than the pressure/temp ones, and it would also look better if it was moved up to directly after the Leak Sensor (so when they're paired up the pressure/temp ones go together and can shrink the card height)
    Screenshot 2024-07-05 at 10 15 05 AM
  3. I'm not sure how the flat blue background is applied, but it might be worth showing the page background gradient, or at least making sure the flat background colour is defined in terms of the theme variables

I do think 1 and 2 are worth fixing, but none of those points are critical, so approving now.

Again, excellent work with this - it'll hopefully make the failsafes more approachable and widely used :-)

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.

4 participants