Skip to content

Forms - standardise, add step/fly to spectroscopy, and exposure time to tomography - #222

Open
tomkane-dls wants to merge 7 commits into
mainfrom
adjust-forms
Open

tomkane-dls wants to merge 7 commits into
mainfrom
adjust-forms

Conversation

@tomkane-dls

@tomkane-dls tomkane-dls commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Changes

General

  • Remove the visit input form both forms, as this will be set by the instrument session and is not controlled by the form once other PRs have been merged. Remove unused imports
  • Standardise layout across forms -> use grid for tomography, and align buttons the same on both
  • General cleanup and labelling

Tomography

  • Add exposure time to Tomography
  • Align the 3 inputs all on first row
Screenshot from 2026-10-09 18-22-03

Spectroscopy

  • Add separate buttons for Step and Fly scans
  • Moved X and Y to share a grid space, now that visit is removed from the line below
  • Match the button layout of tomography
Screenshot from 2026-10-09 18-21-47

If testing; the spectroscopy controls will actually appear full width, this image is just to show what the half width controls would look like after #221 has been merged in


! Notes

This PR is not ready because it requires the following:

  • instrument session atlas changes to be merged in so that visit form is definitely not needed as a backup
  • test-rig-bluesky needs demo spectroscopy to accept the fly enum similarly to tomography
  • test-rig-bluesky needs tomography to accept exposure time

@tomkane-dls
tomkane-dls requested a review from EmsArnold October 9, 2026 17:36
@zoharma

zoharma commented Oct 12, 2026

Copy link
Copy Markdown
Collaborator

@tomkane-dls If I may suggest, I think it would better to have a mode selector plus one Run button, rather than two run buttons. I would also suggest to change Acquire Dark/Flats to Secondary/Outline, and maybe change the order, or place it on a different row.

@tomkane-dls

Copy link
Copy Markdown
Contributor Author
  • step/fly is now on a mode selector
  • scantype/run/abort buttons on one line standardised for both
  • acquire darks/flats on its own row (this is a temporary plan before we can automate this process with normal scans)

Spectroscopy
spec

Tomography
tomo

@tomkane-dls

Copy link
Copy Markdown
Contributor Author

@zoharma I am not sure what you mean exactly by secondary outline?

@zoharma

zoharma commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

@tomkane-dls I was thinking that the button was set to Button Color: Secondary and Variant: Contained, but actually it is set to Primary as colour and then there's another code that changes the background colour to secondary. This is not the right way.

It should be set to Secondary / Contained or Secondary / Outlined.

TomographyForm.tsx:115-121:

        <Box
          sx={{
            ml: "auto",
            "& .MuiButton-root": {
              backgroundColor: "secondary.main",
              "&:hover": { backgroundColor: "secondary.dark" },
            },
          }}
        >
          <RunPlanButton
            name="darks_flats"
            params={{ light_source: formData.light_source }}
            instrumentSession={instrumentSession}
            buttonText="Acquire Darks/Flats"
          />
        </Box>

It could be something like

        <Box sx={{ ml: "auto" }}>
          <RunPlanButton
            name="darks_flats"
            params={{ light_source: formData.light_source }}
            instrumentSession={instrumentSession}
            buttonText="Acquire Darks/Flats"
            color="secondary"
          />
        </Box>

And also adapted on RunPlanButton for the Contained vs Outlined.

@tomkane-dls

Copy link
Copy Markdown
Contributor Author

@zoharma I do agree with you that your way is much nicer!

But I did it the way above because as far as i could see RunPlanButton doesn't have a color prop, unless i am missing something?

@zoharma

zoharma commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator

But I did it the way above because as far as i could see RunPlanButton doesn't have a color prop, unless i am missing something?

@tomkane-dls I think that RunPlanButton should be extended to cover for these (Color + Variant)

@tomkane-dls

Copy link
Copy Markdown
Contributor Author

Okay i understand I think thats best
for now I might just revert it to be the same colour as the regular button, as i need the other changes merged and this is only a temporary button

@tomkane-dls
tomkane-dls marked this pull request as ready for review October 13, 2026 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants