Publishing a page deletes custom Vue component files from the app
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript, python
- Domain
- backend, developer-experience
Research direction
Start with StudioPage.delete_unused_component_files() in the code added by commit 3b1017f1, then trace how the studio_components folder is handled during page publishing. Check that unused Studio Component files are removed while custom .vue files remain. Done means publishing a page changes only its files and preserves the app’s custom Vue components.
Written by the indexing model from the issue text.
Description
Issue
When I publish a page of a standard app in developer mode, Studio deletes every custom Vue component file (*.vue) in the app's studio_components folder.
Steps to reproduce
- Use a standard Studio app that has custom Vue components in
<app>/studio/<studio_app>/studio_components/. For example, Connect has 15.vuefiles there. - Turn on developer mode.
- Open any page of the app in the editor and click Publish Page.
- Run
git statusin the app.
Expected result
Only the published page's files change.
Actual result
All .vue files in studio_components are deleted. In Connect, this removes the sidebar header and footer, settings, notifications, and other components. If the deletion is committed and deployed, those parts of the app stop working.
Cause
StudioPage.delete_unused_component_files() (added in 3b1017f1) keeps only the files whose name matches a Studio Component used by a page of the app:
if file.removesuffix(".json") not in used:
delete_file(folder, file)
Custom Vue components are files in the same folder, not Studio Component records, so they never match used and are always deleted. The editor loads these components from this folder, so the files are in use.
Suggested fix
Delete only .json files of unused Studio Components, or skip .vue files.
Environment
- Studio:
developat 5b9d70a5 - Developer mode: on
- Dominant language
- Vue
- Stars
- 293
- Forks
- 109
- Avg merge
- 15h 57m
- Merged PRs (30d)
- 3
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from frappe/studio
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
-
Difficulty 5/5 Over a week Newbie friendliness 10/100
-
KanbanOpen
Difficulty 5/5 Over a week Newbie friendliness 25/100
Similar issues
-
HTTP Request Smuggling: non-final chunked Transfer-Encoding not rejected (CWE-444)Possibly taken @code1a2024 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
IBM-Cloud/terraform-provider-ibm#7115 ·
Maintainers usually reply within 2 days
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 88/100
hiero-ledger/hiero-sdk-js#4793 ·
Maintainers usually reply within 1 day
-
.NET bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
weaviate/weaviate-python-client#2265 ·
Maintainers usually reply within 1 day