Bug 415897 - Render README.md in the right pane when a directory is the editor target
Summary: Render README.md in the right pane when a directory is the editor target
Status: RESOLVED FIXED
Alias: None
Product: Orion (Archived)
Classification: ECD
Component: Client (show other bugs)
Version: 4.0   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: 4.0 M2   Edit
Assignee: Malgorzata Janczarska CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
: 412396 (view as bug list)
Depends on: 416336
Blocks: 415338
  Show dependency tree
 
Reported: 2013-08-26 13:41 EDT by Simon Kaegi CLA
Modified: 2013-09-20 15:35 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Kaegi CLA 2013-08-26 13:41:48 EDT
We have permission to use https://github.com/chjj/marked v0.2.9. We currently display nothing when on a folder -- we should display the rendered README.md file as frequently projects have interesting information to show.
Comment 1 Gabriel Luong CLA 2013-08-26 14:32:05 EDT
I am working on this in Bug 412396 :s
Comment 2 Malgorzata Janczarska CLA 2013-08-27 05:09:36 EDT
Gabriel, this viewer is critical for Bug 415338, that's why I told Simon that I will start working on it straight away. If you have something to deliver in a day or two I will be glad to use it, if not do you mind if I take in over from you?
Comment 3 Gabriel Luong CLA 2013-08-27 11:04:46 EDT
Hi Gosia, go for it! Places of interest from my investigation is editor.js#setInput and inputManager.js#_setInputContents. Basically, check if there is no input in inputManager.js#_setInputContents, and then find the README.md and set that as the editor input.
Comment 4 Malgorzata Janczarska CLA 2013-08-27 14:02:05 EDT
*** Bug 412396 has been marked as a duplicate of this bug. ***
Comment 5 Silenio Quarti CLA 2013-09-04 17:40:05 EDT
I have released changes that allow you to display the README.md (and/or project.json) when the target of the editor is a directory.  This is hard wired in for now. I will work on bug#416336 next.  You should be able to add the logic to decide what to show in folderView.js. 

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=aee6baaa1032dfaa15dd1534d797012863331585

Note that to support opening directories in the editor we changed the behavior of the mini-nav when a directory link was clicked. The old behavior was to go into the directory. The new behavior is to open it.  It is still possible to go into the directory, but now the user needs to click the "down" arrow command.
Comment 6 Malgorzata Janczarska CLA 2013-09-05 06:43:51 EDT
Great! I should be able to display project view and readme this way. I added a minor fix, because folder may not have Children, it may have ChildrenLocation instead:
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=01552011b5534b22899a8a690e1789c0a0ff8cf2
Comment 7 Malgorzata Janczarska CLA 2013-09-05 10:39:35 EDT
Readme.md now rendered in folder view. Thanks Silenio!