-
-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
type/featureCompletely new functionality. Can only be merged if feature freeze is not active.Completely new functionality. Can only be merged if feature freeze is not active.type/proposalThe new feature has not been accepted yet but needs to be discussed first.The new feature has not been accepted yet but needs to be discussed first.
Description
Feature Description
When you use the web interface, why is it not possible to have preview of a new file that is created in the repository?
You can do it with already created files that you edit but not with new files and i find this very strange, it would be very useful for lets say is you create a new "markdown" file.
Repository -> Add File -> New File
But the preview tab is missing
ClientCrash and HesterG
Metadata
Metadata
Assignees
Labels
type/featureCompletely new functionality. Can only be merged if feature freeze is not active.Completely new functionality. Can only be merged if feature freeze is not active.type/proposalThe new feature has not been accepted yet but needs to be discussed first.The new feature has not been accepted yet but needs to be discussed first.
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
silverwind commentedon Mar 19, 2023
Preview Tab should be there for at least markdown, but I do agree we could show it for other file types as well, if there is a benefit.
Also see #23333 which touches these parts.
brechtvl commentedon Mar 19, 2023
The Preview tab is not there for New File at all, only for Edit File. Editing a
.txt
file and renaming it to.md
also does not make a Preview tab appear.I had a quick look, and there seem to be two things to fix:
IsNewFile
intemplates/repo/editor/edit.tmpl
createCodeEditor
after editing the file name, not only on page load.I won't have time to submit a proper fix in the next few days, anyone feel free to take over. Otherwise I'll get to it later.
silverwind commentedon Mar 20, 2023
I agree, we should try to handle new file similar to edit file.
Allow new file and edit file preview if it has editable extension (#2…