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

internal(Thresholds): Validate and save to Generator file #446

Merged
merged 2 commits into from
Feb 5, 2025

Conversation

cristianoventura
Copy link
Collaborator

@cristianoventura cristianoventura commented Jan 31, 2025

Description

This PR implements logic to validate and persist the state of the thresholds to the Generator file.

  • 🔨 Codegen pending
  • 🔨 UI polishing pending

How to Test

  • Type the konami code and enable Thresholds
  • Open a generator and configure some thresholds
  • Check that the generator state is now dirty
  • Save the generator and check that the data is persisted

Checklist

  • I have performed a self-review of my code.
  • I have added tests for my changes.
  • I have run linter locally (npm run lint) and all checks pass.
  • I have run tests locally (npm test) and all tests pass.
  • I have commented on my code, particularly in hard-to-understand areas.

Screenshots (if appropriate):

Related PR(s)/Issue(s)

@cristianoventura cristianoventura self-assigned this Jan 31, 2025
Comment on lines +41 to +42
// Handle selected statistic when the metric field changes
useEffect(() => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The available options in the 'Statistic' field depend on the selection made in the 'Metric' field. Here we handle the case when a different option is chosen in the 'Metric' field that is incompatible with the current selected 'Statistic'.

@cristianoventura cristianoventura changed the title Internal(Thresholds): Validate and save to Generator file internal(Thresholds): Validate and save to Generator file Jan 31, 2025
@cristianoventura cristianoventura marked this pull request as ready for review January 31, 2025 17:12
@cristianoventura cristianoventura requested a review from a team as a code owner January 31, 2025 17:12
Copy link
Member

@Llandy3d Llandy3d left a comment

Choose a reason for hiding this comment

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

🙌

Not related to this PR but I noticed that when we open the popover it always defaults to load options, might make more sense to re-open it on the last section opened 🤔

@cristianoventura
Copy link
Collaborator Author

Not related to this PR but I noticed that when we open the popover it always defaults to load options, might make more sense to re-open it on the last section opened

We may have to introduce some state to keep track of the last selected tab. I'll bring this up to the team to discuss.

@cristianoventura cristianoventura merged commit fef51d8 into main Feb 5, 2025
6 checks passed
@cristianoventura cristianoventura deleted the internal/validate-and-save-thresholds branch February 5, 2025 02:26
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.

2 participants