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

Code Folding Issue with Beautify on Save Feature #1845

Open
devvaannsh opened this issue Sep 12, 2024 · 0 comments
Open

Code Folding Issue with Beautify on Save Feature #1845

devvaannsh opened this issue Sep 12, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@devvaannsh
Copy link
Contributor

Describe the bug

When using "Beautify Code after Save" feature :-
When I manually collapse sections of my code (clicking the collapse arrow to fold sections of code) and then continue writing new code elsewhere, the collapsed sections automatically expand after saving, which is unexpected behavior.
Sometimes, the code expands but the collapse button remains in the collapsed state, meaning the visual icon does not update to reflect the actual state of the code section.
This issue disrupts the workflow, as I have to manually collapse the code sections again after each save.

Attaching a GIF for reference :-
ScreenRecording2024-09-12203741-ezgif com-video-to-gif-converter

As shown in the attached GIF, I folded a section of code, wrote some new code, and upon saving (with the Beautify on Save feature enabled), the folded code automatically expands. I then folded another part of the code, wrote more, and saved again. This time, the code expanded, but the collapse icon did not update to reflect the change.

Reproduction

  1. Write some code and collapse a section using the collapse button.
  2. Write additional code elsewhere in the file.
  3. Save the file to trigger the beautification feature.
  4. Observe that the collapsed code expands automatically, but the collapse button sometimes remains in the collapsed state.

Expected behavior

Collapsed code sections should remain collapsed after saving.
The collapse button should accurately reflect the state of the code (collapsed/expanded).

OS, Browser and Phoenix versions

Phoenix version :- Release 3.9 build 3.9.4-20562
build timestamp: 2024-09-09T07:23:11.000Z

OS version :- Windows 11
Issue also persists across browsers (tested in Chrome & Firefox)

logs or debug stack trace if any

No response

Additional context

No response

@devvaannsh devvaannsh added the bug Something isn't working label Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant