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

Only render Sensor Form in flexContext Form Option For certain fields #1361

Merged
merged 4 commits into from
Mar 8, 2025

Conversation

joshuaunity
Copy link
Contributor

@joshuaunity joshuaunity commented Mar 7, 2025

Description

This PR mainly targets the flexContext fields:

  1. consumption-price
  2. production-price
  3. inflexible-device-sensors

When any of these fields are selected on the form for adding sensors is rendered as adding a fixed value in any of these field currently could break the code. So to avoid confusion to users, the fixed value option will be removed on the UI level.

Look & Feel

Before:
image

After:
image

How to test

  1. Go to these assets page and select any assets(preferably one with senors)
  2. Go the the flexContext Modal form(Part of the Edit options on the side)
  3. Click on the edit button for flexContext
  4. click on any of the mentioned fields above and confirm that only the sensor form is being rendered for it

Further Improvements

None

Related Items

This PR closes #1360


  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on code under GPL or other license that is incompatible with FlexMeasures

@nhoening nhoening changed the title Refactor: Only render Sensor Form in flexContext Form Option For certain fields Only render Sensor Form in flexContext Form Option For certain fields Mar 7, 2025
Copy link
Contributor

@nhoening nhoening left a comment

Choose a reason for hiding this comment

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

Thanks, works great!

@nhoening nhoening merged commit 67e7375 into main Mar 8, 2025
10 checks passed
@nhoening nhoening deleted the feat/conditional-form-rendering branch March 8, 2025 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FlexContext Modal: Only render sensor form for fields that can currently only support sensors
2 participants