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

Move setting impl from ComfySettingsDialog to settingStore #2085

Merged
merged 12 commits into from
Dec 29, 2024

Conversation

huchenlei
Copy link
Member

@huchenlei huchenlei commented Dec 29, 2024

Depends on #2080. #2080 removes the last setting registered before the start of vue app, which enables only keep a single copy of setting value and def in pinia settingStore.

Previously settingStore and ComfySettingsDialog both own a copy of setting definitions and setting values, and the ComfySettingsDialog is driving the state change, i.e. settingStore is calling ComfySettingsDialog.

This PR reverse the relationship so that now only single copy of state exists in settingStore and ComfySettingsDialog now calls into settingStore. All methods on ComfySettingsDialog are now marked as deprecated.

@huchenlei huchenlei requested review from a team as code owners December 29, 2024 00:32
@@ -1001,15 +1001,9 @@ export class ComfyApp {
*/
async setup(canvasEl: HTMLCanvasElement) {
this.canvasEl = canvasEl
// Show menu container for GraphView.
Copy link
Member Author

Choose a reason for hiding this comment

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

No longer necessary as the setting value initialization will trigger the vue watcher to properly set the display attr of legacy menu.

@huchenlei huchenlei changed the title Deprecate ComfySettingsDialog Move setting impl from ComfySettingsDialog to settingStore Dec 29, 2024
@huchenlei huchenlei merged commit a48ad1c into main Dec 29, 2024
10 checks passed
@huchenlei huchenlei deleted the refactor_setting2 branch December 29, 2024 02:31
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.

1 participant