Skip to content

Conversation

EugeneChoi4
Copy link
Contributor

Fixed two small issues with the config panel in the compiler playground:

  1. Object descriptions were being confined in the config box and most of it would not be visible upon hover
  2. Changed it so that "Applied Configs" would only display a valid set of configs, rather than switching between "Invalid Configs" and the set of options. This would be less visually jarring for users as the Output panel already displays errors. Additionally, if users want to see the list of config options but have a currently broken config, they would previously not know how to fix it.

Object hover before:
Screenshot 2025-09-26 at 10 41 03 AM
Hover after:
Screenshot 2025-09-26 at 10 40 37 AM

Applied Configs always displays the last valid set of configs:

Screen.Recording.2025-09-26.at.11.39.09.AM.mov

@meta-cla meta-cla bot added the CLA Signed label Sep 26, 2025
@EugeneChoi4 EugeneChoi4 requested review from poteto, jackpope and mofeiZ and removed request for poteto and jackpope September 26, 2025 15:45
});
lastValidOptionsRef.current = formattedAppliedOptions;
} else {
formattedAppliedOptions = lastValidOptionsRef.current;
Copy link
Contributor

Choose a reason for hiding this comment

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

Its unsafe to read refs during render. There should be a compiler lint error here actually.

Another approach could be to move the compiler step out of render and into the store. So that when an update is dispatched you can decide if the options are valid there and just choose not to update the property on the store in that case.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh wow look at me breaking a key React rule–I'll have this fixed!

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.

2 participants