FlowFuse / FlowFuse/flowfuse

Refactor template editable change state tracking

Open
#3,015 0 comments 0 reactions 0 assignees View on GitHub
size:M task
Dominant language
JavaScript
Stars
400
Forks
89
Avg merge
1d 20h
Merged PRs (30d)
149

Description

### Description

Right now, the change state tracking for a template happens inside the own template object (via this.editable.changed).
Except Vue is configured to watch for changes on `this.editable` and uses that to set `this.editable.changed` i.e. the watch handler is mutating the object it is watching.

https://github.com/FlowFuse/flowfuse/blob/af3ed3af4da648bf1cb418aef728c250a463be5b/frontend/src/pages/admin/Template/index.vue#L103-L113

(Note this.editable is being mutated inside the watch handler)

We should separate out the field change state and template properties.

Related issue https://github.com/FlowFuse/flowfuse/pull/3012

### Epic/Story

_No response_

### Have you provided an initial effort estimate for this issue?

I have provided an initial effort estimate

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.