#2151 More files should be considered "viewable"

v1.0.0
closed
sf-2 (994)
SCM
Cory Johns
2015-08-20
2011-05-22
Anonymous
No

Originally created by: lsproc

Currently we look for MIME types starting with text/ -- this should be expanded to handle all the popular programming languages. Additionally, there is a method to specify 'additional viewable extensions' for the SCM tools. Unfortunately this is ignored when deciding whether a file is viewable.

When a file is detected as not viewable in the web browser by the file viewer, a message appears to signal this, allowing you to force open the file. The file displays correctly when forced, therefore, the error should not appear in the first place.

Example: https://sourceforge.net/p/umstools/code/28/tree/trunk/config.php

We should also use our "pypeline" rendering that we do for README files for all .md, .rst, etc files that it can handle.

Related

Tickets: #1917
Tickets: #3608

Discussion

  • Rick Copeland - 2011-07-29
    • summary: PHP files do not display by default in scm, but work when forces --> More files should be considered "viewable"
    • Description has changed:

    Diff:

    --- old 
    +++ new 
    @@ -1,3 +1,5 @@
    +Currently we look for MIME types starting with text/ -- this should be expanded to handle all the popular programming languages. Additionally, there is a method to specify 'additional viewable extensions' for the SCM tools. Unfortunately this is ignored when deciding whether a file is viewable.
    +
     When a file is detected as not viewable in the web browser by the file viewer, a message appears to signal this, allowing you to force open the file. The file displays correctly when forced, therefore, the error should not appear in the first place.
    
     Example: https://sourceforge.net/p/umstools/code/28/tree/trunk/config.php
    
     
  • Mark Ramm - 2011-09-12
    • milestone: backlog --> forge-sept-30
     
  • Dave Brondsema

    Dave Brondsema - 2011-09-30
    • milestone: forge-oct-14 --> forge-backlog
     
  • Dave Brondsema

    Dave Brondsema - 2012-01-20
    • milestone: forge-backlog --> forge-feb-03
     
  • Dave Brondsema

    Dave Brondsema - 2012-01-20
    • size: --> 2
     
  • Dave Brondsema

    Dave Brondsema - 2012-03-14
    • Description has changed:

    Diff:

    --- old 
    +++ new 
    @@ -3,3 +3,5 @@
     When a file is detected as not viewable in the web browser by the file viewer, a message appears to signal this, allowing you to force open the file. The file displays correctly when forced, therefore, the error should not appear in the first place.
    
     Example: https://sourceforge.net/p/umstools/code/28/tree/trunk/config.php
    +
    +We should also use our "pypeline" rendering that we do for README files for all .md, .rst, etc files that it can handle.
    
     
  • Jenny Steele - 2012-04-23
    • status: open --> in-progress
    • assigned_to: Jenny Steele
     
  • Jenny Steele - 2012-04-24
    • status: in-progress --> code-review
    • qa: Cory Johns
     
  • Jenny Steele - 2012-04-24

    On allura js/2151. To test:

    • create a new svn tool
    • import this repo: https://texttrix.svn.sourceforge.net/svnroot/texttrix
    • confirm this displays: yourtool/634/tree/texttrix/trunk/readme.txt
    • confirm this displays: yourtool/634/tree/texttrix/trunk/pkg.sh
    • confirm this does not display: yourtool/634/tree/texttrix/trunk/manifest-additions.mf
    • Add ".mf" to Viewable Files for your repo in the tool admin
    • confirm this now displays: yourtool/634/tree/texttrix/trunk/manifest-additions.mf
     
  • Cory Johns - 2012-04-25

    I get an error:

    Running tests in module AlluraTesting
    Allura/allura/model/repository.py:1065: invalid syntax
    if self.content_type.startswith('text/') or self.extension in VIEWABLE_EXTENSIONS or

     
  • Cory Johns - 2012-04-26
    • status: code-review --> open
     
  • Jenny Steele - 2012-04-26
    • status: open --> code-review
     
  • Jenny Steele - 2012-04-26

    Made a typo in some last minute formatting improvements, sorry. It's fixed now.

     
  • Cory Johns - 2012-04-27
    • status: code-review --> closed
     
  • Cory Johns - 2012-04-27

    Merged to dev

     

Log in to post a comment.