Skip to content
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

Handle input setup mode #20715

Merged
merged 8 commits into from
Oct 18, 2024
Merged

Handle input setup mode #20715

merged 8 commits into from
Oct 18, 2024

Conversation

grotlue
Copy link
Contributor

@grotlue grotlue commented Oct 16, 2024

Description

Part of #20530

Frontend changes for handling the setup mode on inputs.

This PR:

  • fixes some wrong typing with the Input
  • adds a new menu items to the Input list item
    • "Enter Setup Mode" when the input is not yet in setup mode
      • clicking it will make a PUT call and update only the setup_mode value to true
    • "Exit Setup Mode" when the input is already in setup mode
      • clicking it will make a PUT call and update only the setup_mode value to false
  • when the Input is in setup mode instead of Start/Stop it shows a "Setup Input" button which opens the (for now empty) wizard

The backend is not yet done but the frontend can be reviewed and tested in isolation by changing the condition and checking if the right calls are made.

/nocl

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (non-breaking change)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.

@grotlue grotlue linked an issue Oct 16, 2024 that may be closed by this pull request
2 tasks
Copy link
Contributor

@gally47 gally47 left a comment

Choose a reason for hiding this comment

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

It works as described, code looking good, found a type nitpick but I guess that's because the backend is not ready yet so I will approve.


export interface Input extends InputBase {
attributes: {
[type: string]: any,
Copy link
Contributor

Choose a reason for hiding this comment

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

can we safe type these or are they unknown?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think they differ based on the input type.


export interface ConfiguredInput extends InputBase {
configuration: {
[type: string]: any,
Copy link
Contributor

Choose a reason for hiding this comment

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

same here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think they differ based on the input type.

@grotlue grotlue merged commit ea1a4de into master Oct 18, 2024
7 checks passed
@grotlue grotlue deleted the feat/20530/handle-input-setup-mode branch October 18, 2024 08:17
@grotlue grotlue mentioned this pull request Oct 18, 2024
2 tasks
@grotlue grotlue mentioned this pull request Oct 30, 2024
9 tasks
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.

ISW - Handle input setup mode
2 participants