Skip to content

Conversation

mockoocy
Copy link
Contributor

@mockoocy mockoocy commented Sep 2, 2025

Currently in the phase selection UI element, there is "Unknown" option, which just does not do anything (the ChangeEvent is ignored). It seems preferable to just have "Unknown" appear only as the current value (when set from the hardware object), as it currently is, but not as an option in the select.

@marcus-oscarsson
Copy link
Member

marcus-oscarsson commented Sep 2, 2025

The phase dropwdown also displays in what phase diffractometer is. If we remove Unknown we don't know if the diffractometer is in an Unknown state/position/invalid

@beteva
Copy link
Member

beteva commented Sep 2, 2025

If you want to remove unknown, you could do it in a specific diffractometer HO.

@mockoocy mockoocy force-pushed the pm-hide-unknown-phase branch from addcf29 to d143cff Compare September 2, 2025 11:40
@mockoocy
Copy link
Contributor Author

mockoocy commented Sep 2, 2025

@marcus-oscarsson, @beteva
Here's a recording of what this PR is trying to achieve

We don't want to get rid of the "Unknown" phase entirely (as we could using diffractometer HO config).
We just want to remove it from the select input, so it does not show up to user.

@axelboc
Copy link
Collaborator

axelboc commented Sep 2, 2025

Now that I see the recording, I'm wondering why that "Unknown" value even exists and ends up in the front-end. Seems more like a loading state to me. The value should not change to "Unknown", it should just go from "Transfer" directly to "BeamLocation" and the drop-down should have an orange background and be disabled while that change is happening in the back-end.

@marcus-oscarsson
Copy link
Member

I think its a great idea to remove "unknown" from the list of phase that the user can select, but we need to be able to display unknown or a value with the same meaning. Like in your video, very nice !

We can easily remove the "Unknown" phase from the phase list. I agree that this would make alot of sense in most cases. However sometimes for some strange reasons the MD phase is really unknown because the motors are in position that don't correspond to a known position. That position could also be called invalid or whatever but its been named unknown in the dawn of mxcube.

So the unknown label signals something to the user in this sense we can not really remove it.

@axelboc
Copy link
Collaborator

axelboc commented Sep 2, 2025

Alright, so "Unknown" is a sort of error/invalid value, which is fine.

But here it is used while moving from one valid value to another valid value. I feel like there should be a way to either:

  • not update the value to "Unknown" until the motor has stopped moving (and hasn't reached a "known" value)
  • or not show "Unknown" in the UI while the motor is moving (while in "RUNNING" state).

@beteva
Copy link
Member

beteva commented Sep 2, 2025

Now that I see the recording, I'm wondering why that "Unknown" value even exists and ends up in the front-end. Seems more like a loading state to me. The value should not change to "Unknown", it should just go from "Transfer" directly to "BeamLocation" and the drop-down should have an orange background and be disabled while that change is happening in the back-end.

Actually what we see at ESRF is exactly this. The phase menu turns to yellow when the phase changes and until it is done, shows the phase you've started from.

@marcus-oscarsson
Copy link
Member

Ok, so seems like this is cleared out now. Thanks alot for the PR. Ill merge it ASAP ! :)

@axelboc
Copy link
Collaborator

axelboc commented Sep 3, 2025

Indeed, the PR prevents "Unknown" from being a selectable option, which is good regardless 👍

Currently in the phase selection UI element, there is "Unknown" option,
which just does not do anything (the ChangeEvent is ignored).
It seems preferable to just have "Unknown" appear only as the current
value (when set from the hardware object), as it currently is, but not
as an option in the select.
@marcus-oscarsson marcus-oscarsson merged commit 2f3b4ad into mxcube:develop Sep 3, 2025
12 checks passed
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