Repository navigation
Keep editor mounted and focus Run after first save - #1691
Conversation
The first save of someone else's project creates a remix. The remix reducer set loading to "idle", which unmounted the editor and loaded the project again. To the user this looked like a page refresh, and focus was reset. Remove the "idle" reset, because the remix response already contains the full project. WebComponentLoader now switches to the new project ID when saving succeeds and the ID changes. useProject skips the fetch when the stored project already matches the requested ID and the save and load both succeeded. The Save button disappears once the user owns the project, so focus now moves to Run.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
|
@macroscope-app review |
|
Manual reviews triggered for commit All prior checks · these links stay valid even if you push more commits. |
|
Review triggered; results will be posted as check runs. |
ApprovabilityVerdict: Needs Human Approval Macroscope's review found this PR requires human approval — The PR changes the shared save/load lifecycle so the editor remains mounted, avoids a project reload, adopts new identifiers, and moves focus after manual saves. These are intentional and tested, but they materially alter existing cross-component runtime behavior and merit human review. Needs human approval because:
Notes:
Enable approvability here. You can add or adjust custom eligibility rules. Learn more. |
closes https://github.com/RaspberryPiFoundation/digital-editor-issues/issues/1668
Changes
loading = "idle", so theeditor stays mounted. The remix response already contains the full
project.
succeeds and the ID changes.
project.
Save button disappears once the user owns the project.