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

With introduction of Image preview feature there is no way to edit textual image formats (svg) as a code in Zed #10403

Closed
1 task done
nazgu1 opened this issue Apr 11, 2024 · 4 comments
Labels
defect [core label] image viewer Feedback for image preview, zoom, manipulation, etc

Comments

@nazgu1
Copy link

nazgu1 commented Apr 11, 2024

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

Maybe I'm missing something, but I've searched through documentation, release notes, PR related to Image preview and I can't find any way to open .svg files in edit mode.

Steps to reproduce:

  1. Open workspace with svg file
  2. Click of svg file in project tree
  3. SVG preview appears
  4. (Expected) User should be able to choose preview/edit mode (e.g by clicking with some modifier key)

Environment

Zed: v0.130.5 (Zed)
OS: macOS 14.4.1
Memory: 24 GiB
Architecture: aarch64

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

No response

@nazgu1 nazgu1 added admin read Pending admin review defect [core label] triage Maintainer needs to classify the issue labels Apr 11, 2024
@tao
Copy link

tao commented Apr 11, 2024

Same. I edit .svg files all the time for web development and now it just opens the preview in the latest update.

It seems like I have to change the filetype to a .txt first to edit it and rename it back again?

@peloycosta
Copy link

Second this, editing SVG is extremely useful.
Also add that it seems like failing to preview some svg files crashes zed (#10421), opening it as text as a fallback could be a workaround.

@JosephTLyons JosephTLyons added image viewer Feedback for image preview, zoom, manipulation, etc and removed triage Maintainer needs to classify the issue admin read Pending admin review labels Apr 11, 2024
@rgbkrk
Copy link
Member

rgbkrk commented Apr 11, 2024

Absent a way to flip modes, I think I better disable SVG for the image previewer. Thanks all.

rgbkrk added a commit that referenced this issue Apr 11, 2024
Absent some ability to toggle between viewing and editing a file, I
think it would be best to get a fix out quick for people to edit SVGs as
text files.

Release Notes:

- Fixed editing of SVG images by disabling it from the image viewer
([#10403](#10403)).
gcp-cherry-pick-bot bot pushed a commit that referenced this issue Apr 11, 2024
Absent some ability to toggle between viewing and editing a file, I
think it would be best to get a fix out quick for people to edit SVGs as
text files.

Release Notes:

- Fixed editing of SVG images by disabling it from the image viewer
([#10403](#10403)).
rgbkrk added a commit that referenced this issue Apr 11, 2024
Cherry-picked Do not show image viewer for SVGs (#10435)

Absent some ability to toggle between viewing and editing a file, I
think it would be best to get a fix out quick for people to edit SVGs as
text files.

Release Notes:

- Fixed editing of SVG images by disabling it from the image viewer
([#10403](#10403)).

Co-authored-by: Kyle Kelley <rgbkrk@gmail.com>
@rgbkrk
Copy link
Member

rgbkrk commented Apr 11, 2024

Fixed in #10435, shipped in Zed preview.

@rgbkrk rgbkrk closed this as completed Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect [core label] image viewer Feedback for image preview, zoom, manipulation, etc
Projects
None yet
Development

No branches or pull requests

5 participants