Break into horizontal scrolling panes ?

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Break into horizontal scrolling panes ?

Dean Arnold

1st, many thnx for a great tool! And in my old favorite language!

 

But I’ve got a request: my source code has long lines, and the lack of a wrapping capability is a serious limitation. Is it possible to break the display table into 2 nested, fixed width tables w/ horizontal scrolling ? Or alternately, into iframes w/ horizontal scrollbars ?

 

If you can point me at the general area where this might be applied, I’d be happy to play w/ it and submit a patch.

 

Thanks,

 

ParAccel, Inc.

                                          

Dean Arnold

Sr. Connectivity Engineer

[hidden email]

3 Results Way, Cupertino, CA 95014

Phone: (858)309-4733 x158   YIM: renodino1

www.paraccel.com

 

 


------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Codestriker-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/codestriker-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Break into horizontal scrolling panes ?

David Sitsky
Administrator
Hi Dean,

Thanks for your message.

I haven't tried this, but edit the html/codestriker.css file, and replace:

white-space: pre;

white-space: pre-wrap;

This might give you something closer to what you want..

Cheers,
David

On Wed, Sep 22, 2010 at 9:26 AM, Dean Arnold <[hidden email]> wrote:

> 1st, many thnx for a great tool! And in my old favorite language!
>
>
>
> But I’ve got a request: my source code has long lines, and the lack of a
> wrapping capability is a serious limitation. Is it possible to break the
> display table into 2 nested, fixed width tables w/ horizontal scrolling ? Or
> alternately, into iframes w/ horizontal scrollbars ?
>
>
>
> If you can point me at the general area where this might be applied, I’d be
> happy to play w/ it and submit a patch.
>
>
>
> Thanks,
>
>
>
> ParAccel, Inc.
>
>
>
> Dean Arnold
>
> Sr. Connectivity Engineer
>
> [hidden email]
>
> 3 Results Way, Cupertino, CA 95014
>
> Phone: (858)309-4733 x158   YIM: renodino1
>
> www.paraccel.com
>
>
>
>
>
> ------------------------------------------------------------------------------
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing.
> http://p.sf.net/sfu/novell-sfdev2dev
> _______________________________________________
> Codestriker-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/codestriker-user
>
>

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Codestriker-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/codestriker-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Break into horizontal scrolling panes ?

Dean Arnold
Alas, that's suboptimal. While it does fit everything into the browser, the wrap causes the line numbers to align to the center of the wrapped lines (which is hard to read), and frankly the resulting wrapped layout is hard to read (my target users tend to be fussy about code layout).

Looking at the templates, it seems like template/en/default/viewdeltas.html.tmpl is where the code gets rendered ? I'll see if I can split the single table into 2. My CSS is rusty, but I recall doing something similar for other projects (maybe using a scrollable div instead of table ?)

I guess I'll kick it around a bit.

Thanks for the prompt response,
Dean Arnold
ParAccel, Inc.

-----Original Message-----
From: David Sitsky [mailto:[hidden email]]
Sent: Wednesday, September 22, 2010 3:16 AM
To: Dean Arnold
Cc: [hidden email]
Subject: Re: [Codestriker-user] Break into horizontal scrolling panes ?

Hi Dean,

Thanks for your message.

I haven't tried this, but edit the html/codestriker.css file, and replace:

white-space: pre;

white-space: pre-wrap;

This might give you something closer to what you want..

Cheers,
David

On Wed, Sep 22, 2010 at 9:26 AM, Dean Arnold <[hidden email]> wrote:

> 1st, many thnx for a great tool! And in my old favorite language!
>
>
>
> But I've got a request: my source code has long lines, and the lack of a
> wrapping capability is a serious limitation. Is it possible to break the
> display table into 2 nested, fixed width tables w/ horizontal scrolling ? Or
> alternately, into iframes w/ horizontal scrollbars ?
>
>
>
> If you can point me at the general area where this might be applied, I'd be
> happy to play w/ it and submit a patch.
>
>
>
> Thanks,
>
>
>
> ParAccel, Inc.
>
>
>
> Dean Arnold
>
> Sr. Connectivity Engineer
>
> [hidden email]
>
> 3 Results Way, Cupertino, CA 95014
>
> Phone: (858)309-4733 x158   YIM: renodino1
>
> www.paraccel.com
>
>
>
>
>
> ------------------------------------------------------------------------------
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing.
> http://p.sf.net/sfu/novell-sfdev2dev
> _______________________________________________
> Codestriker-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/codestriker-user
>
>

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Codestriker-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/codestriker-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Break into horizontal scrolling panes ?

Dean Arnold
I'm attaching a sample piece of html (hope it gets thru).

It accomplishes most of what I'm after. It works in FF and Chrome, but of course, not in IE (I tested IE8). I haven't tested safari or opera yet.

However, I'm not certain where to make the incision to inject this into the templates. Its going to add a div around the tables used for the old/new sources, and adds a bit of JS.

Question: will the delta view always pad the shorter file to the same # of lines as the longer ? This hack seems to handle different file sizes OK, but to be usable both panes have to have vertical scrollbars; whereas if both are the same length, then the vertical scroll can be hidden on the left (or the right) pane.

If you can mark the spot to inject this, I'll hack and give it a whirl.

TIA,
Dean Arnold
ParAccel, Inc.

-----Original Message-----
From: David Sitsky [mailto:[hidden email]]
Sent: Saturday, September 25, 2010 9:03 PM
To: Dean Arnold
Subject: Re: [Codestriker-user] Break into horizontal scrolling panes ?

If you have any luck - feel free to email across your changes.  Thanks!

On Thu, Sep 23, 2010 at 2:03 AM, Dean Arnold <[hidden email]> wrote:

> Alas, that's suboptimal. While it does fit everything into the browser, the wrap causes the line numbers to align to the center of the wrapped lines (which is hard to read), and frankly the resulting wrapped layout is hard to read (my target users tend to be fussy about code layout).
>
> Looking at the templates, it seems like template/en/default/viewdeltas.html.tmpl is where the code gets rendered ? I'll see if I can split the single table into 2. My CSS is rusty, but I recall doing something similar for other projects (maybe using a scrollable div instead of table ?)
>
> I guess I'll kick it around a bit.
>
> Thanks for the prompt response,
> Dean Arnold
> ParAccel, Inc.
>
> -----Original Message-----
> From: David Sitsky [mailto:[hidden email]]
> Sent: Wednesday, September 22, 2010 3:16 AM
> To: Dean Arnold
> Cc: [hidden email]
> Subject: Re: [Codestriker-user] Break into horizontal scrolling panes ?
>
> Hi Dean,
>
> Thanks for your message.
>
> I haven't tried this, but edit the html/codestriker.css file, and replace:
>
> white-space: pre;
>
> white-space: pre-wrap;
>
> This might give you something closer to what you want..
>
> Cheers,
> David
>
> On Wed, Sep 22, 2010 at 9:26 AM, Dean Arnold <[hidden email]> wrote:
>> 1st, many thnx for a great tool! And in my old favorite language!
>>
>>
>>
>> But I've got a request: my source code has long lines, and the lack of a
>> wrapping capability is a serious limitation. Is it possible to break the
>> display table into 2 nested, fixed width tables w/ horizontal scrolling ? Or
>> alternately, into iframes w/ horizontal scrollbars ?
>>
>>
>>
>> If you can point me at the general area where this might be applied, I'd be
>> happy to play w/ it and submit a patch.
>>
>>
>>
>> Thanks,
>>
>>
>>
>> ParAccel, Inc.
>>
>>
>>
>> Dean Arnold
>>
>> Sr. Connectivity Engineer
>>
>> [hidden email]
>>
>> 3 Results Way, Cupertino, CA 95014
>>
>> Phone: (858)309-4733 x158   YIM: renodino1
>>
>> www.paraccel.com
>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Start uncovering the many advantages of virtual appliances
>> and start using them to simplify application deployment and
>> accelerate your shift to cloud computing.
>> http://p.sf.net/sfu/novell-sfdev2dev
>> _______________________________________________
>> Codestriker-user mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/codestriker-user
>>
>>
>

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Codestriker-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/codestriker-user

dualscroll.html (31K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Break into horizontal scrolling panes ?

Nicolae Badiu

Hi guys,

 

I tested this HTML file in Chrome 6, Safari 5, Opera 10, and they all display double scroll bars.

 

However, under IE9, I get a wrap-around and a single vertical scrollbar.

 

Nick

 

 

-----Original Message-----
From: Dean Arnold [mailto:[hidden email]]
Sent: Tuesday, September 28, 2010 12:23 AM
To: David Sitsky
Cc: [hidden email]
Subject: Re: [Codestriker-user] Break into horizontal scrolling panes ?

 

I'm attaching a sample piece of html (hope it gets thru).

 

It accomplishes most of what I'm after. It works in FF and Chrome, but of course, not in IE (I tested IE8). I haven't tested safari or opera yet.

 

However, I'm not certain where to make the incision to inject this into the templates. Its going to add a div around the tables used for the old/new sources, and adds a bit of JS.

 

Question: will the delta view always pad the shorter file to the same # of lines as the longer ? This hack seems to handle different file sizes OK, but to be usable both panes have to have vertical scrollbars; whereas if both are the same length, then the vertical scroll can be hidden on the left (or the right) pane.

 

If you can mark the spot to inject this, I'll hack and give it a whirl.

 

TIA,

Dean Arnold

ParAccel, Inc.

 

-----Original Message-----

From: David Sitsky [mailto:[hidden email]]

Sent: Saturday, September 25, 2010 9:03 PM

To: Dean Arnold

Subject: Re: [Codestriker-user] Break into horizontal scrolling panes ?

 

If you have any luck - feel free to email across your changes.  Thanks!

 

On Thu, Sep 23, 2010 at 2:03 AM, Dean Arnold <[hidden email]> wrote:

> Alas, that's suboptimal. While it does fit everything into the browser, the wrap causes the line numbers to align to the center of the wrapped lines (which is hard to read), and frankly the resulting wrapped layout is hard to read (my target users tend to be fussy about code layout).

> 

> Looking at the templates, it seems like

> template/en/default/viewdeltas.html.tmpl is where the code gets

> rendered ? I'll see if I can split the single table into 2. My CSS is

> rusty, but I recall doing something similar for other projects (maybe

> using a scrollable div instead of table ?)

> 

> I guess I'll kick it around a bit.

> 

> Thanks for the prompt response,

> Dean Arnold

> ParAccel, Inc.

> 

> -----Original Message-----

> From: David Sitsky [mailto:[hidden email]]

> Sent: Wednesday, September 22, 2010 3:16 AM

> To: Dean Arnold

> Cc: [hidden email]

> Subject: Re: [Codestriker-user] Break into horizontal scrolling panes ?

> 

> Hi Dean,

> 

> Thanks for your message.

> 

> I haven't tried this, but edit the html/codestriker.css file, and replace:

> 

> white-space: pre;

> 

> white-space: pre-wrap;

> 

> This might give you something closer to what you want..

> 

> Cheers,

> David

> 

> On Wed, Sep 22, 2010 at 9:26 AM, Dean Arnold <[hidden email]> wrote:

>> 1st, many thnx for a great tool! And in my old favorite language!

>> 

>> 

>> 

>> But I've got a request: my source code has long lines, and the lack

>> of a wrapping capability is a serious limitation. Is it possible to

>> break the display table into 2 nested, fixed width tables w/

>> horizontal scrolling ? Or alternately, into iframes w/ horizontal scrollbars ?

>> 

>> 

>> 

>> If you can point me at the general area where this might be applied,

>> I'd be happy to play w/ it and submit a patch.

>> 

>> 

>> 

>> Thanks,

>> 

>> 

>> 

>> ParAccel, Inc.

>> 

>> 

>> 

>> Dean Arnold

>> 

>> Sr. Connectivity Engineer

>> 

>> [hidden email]

>> 

>> 3 Results Way, Cupertino, CA 95014

>> 

>> Phone: (858)309-4733 x158   YIM: renodino1

>> 

>> www.paraccel.com

>> 

>> 

>> 

>> 

>> 

>> ---------------------------------------------------------------------

>> --------- Start uncovering the many advantages of virtual appliances

>> and start using them to simplify application deployment and

>> accelerate your shift to cloud computing.

>> http://p.sf.net/sfu/novell-sfdev2dev

>> _______________________________________________

>> Codestriker-user mailing list

>> [hidden email]

>> https://lists.sourceforge.net/lists/listinfo/codestriker-user

>> 

>> 

> 


------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Codestriker-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/codestriker-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Break into horizontal scrolling panes ?

David Sitsky
Administrator
In reply to this post by Dean Arnold
> However, I'm not certain where to make the incision to inject this into the templates. Its going to add a div around the tables used for the old/new sources, and adds a bit of JS.

Have a look at viewdeltas.html.tmpl, which goes through all the deltas
and creates the tables.

> Question: will the delta view always pad the shorter file to the same # of lines as the longer ? This hack seems to handle different file sizes OK, but to be usable both panes have to have vertical scrollbars; whereas if both are the same length, then the vertical scroll can be hidden on the left (or the right) pane.

They should be the same height - blank lines are inserted.

Cheers,
David

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Codestriker-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/codestriker-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Break into horizontal scrolling panes ?

Dean Arnold
I've managed to make progress (see attachment). Its not a pretty hack, but its getting close to what I'm after. Fwiw, I've only tested w/ FF and chrome so far. As stated before, I don't know that this will ever work w/ IE (at least, not wo/ major JS hackery...and since I avoid the blue E like plague, I call "not it")

Other gotchas:

1. It probably won't work as is w/ "view all files"; that can probably be fixed by a bit more JS (A separate set of panes for each file, and installing each set of pane's ID's into the scrollbar handler)
2. The sizing of the panes is static; I need to JS up the window dimensions and adjust accordingly
3. Empty lines in one pane are smaller height than non-empty lines in the other pane, which causes gradual misalignment between the panes. I'm guessing a CSS adjustment is needed to get adjacent rows in left and right tables to always be the same height.

Any ideas how to deal w/ item (3) ? Maybe empty lines need a class definition to match ?

Dean Arnold
ParAccel, Inc.

-----Original Message-----
From: David Sitsky [mailto:[hidden email]]
Sent: Monday, September 27, 2010 11:04 PM
To: Dean Arnold
Cc: [hidden email]
Subject: Re: [Codestriker-user] Break into horizontal scrolling panes ?

> However, I'm not certain where to make the incision to inject this into the templates. Its going to add a div around the tables used for the old/new sources, and adds a bit of JS.

Have a look at viewdeltas.html.tmpl, which goes through all the deltas
and creates the tables.

> Question: will the delta view always pad the shorter file to the same # of lines as the longer ? This hack seems to handle different file sizes OK, but to be usable both panes have to have vertical scrollbars; whereas if both are the same length, then the vertical scroll can be hidden on the left (or the right) pane.

They should be the same height - blank lines are inserted.

Cheers,
David

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Codestriker-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/codestriker-user

viewdeltas.html.tmpl (6K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Break into horizontal scrolling panes ?

Dean Arnold
In reply to this post by David Sitsky
I managed to solve item (3) on my own. If the old or new source line is empty (has an empty line number), I apply an un-linked "0" w/ white color so its invisible. That forces the table row layout to the fixed font size wo/ displaying anything. Fixed version attached.

Again, its not pretty, but does get the job done. This is starting to look acceptable to my users; item (1) should be simple...item (2) is a bit more difficult.

Dean Arnold
ParAccel, Inc.

-----Original Message-----
From: Dean Arnold
Sent: Thursday, October 07, 2010 5:58 PM
To: 'David Sitsky'
Cc: [hidden email]
Subject: RE: [Codestriker-user] Break into horizontal scrolling panes ?

I've managed to make progress (see attachment). Its not a pretty hack, but its getting close to what I'm after. Fwiw, I've only tested w/ FF and chrome so far. As stated before, I don't know that this will ever work w/ IE (at least, not wo/ major JS hackery...and since I avoid the blue E like plague, I call "not it")

Other gotchas:

1. It probably won't work as is w/ "view all files"; that can probably be fixed by a bit more JS (A separate set of panes for each file, and installing each set of pane's ID's into the scrollbar handler) 2. The sizing of the panes is static; I need to JS up the window dimensions and adjust accordingly 3. Empty lines in one pane are smaller height than non-empty lines in the other pane, which causes gradual misalignment between the panes. I'm guessing a CSS adjustment is needed to get adjacent rows in left and right tables to always be the same height.

Any ideas how to deal w/ item (3) ? Maybe empty lines need a class definition to match ?

Dean Arnold
ParAccel, Inc.

-----Original Message-----
From: David Sitsky [mailto:[hidden email]]
Sent: Monday, September 27, 2010 11:04 PM
To: Dean Arnold
Cc: [hidden email]
Subject: Re: [Codestriker-user] Break into horizontal scrolling panes ?

> However, I'm not certain where to make the incision to inject this into the templates. Its going to add a div around the tables used for the old/new sources, and adds a bit of JS.

Have a look at viewdeltas.html.tmpl, which goes through all the deltas and creates the tables.

> Question: will the delta view always pad the shorter file to the same # of lines as the longer ? This hack seems to handle different file sizes OK, but to be usable both panes have to have vertical scrollbars; whereas if both are the same length, then the vertical scroll can be hidden on the left (or the right) pane.

They should be the same height - blank lines are inserted.

Cheers,
David

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Codestriker-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/codestriker-user

viewdeltas.html.tmpl (6K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Break into horizontal scrolling panes ?

Dean Arnold
In reply to this post by David Sitsky
One last (major) update for now (attached). This solves the "View all files" issue, and cleans up the template code a bit. There's an oddity with the Parallel viewer that causes the left pane to reset to the top when the horizontal scrollbar moves...probably some DOM element that needs tweaking. But I think its generally useful...or at least good enough.

Dean Arnold
ParAccel, Inc.

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Codestriker-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/codestriker-user

viewdeltas.html.tmpl (7K) Download Attachment
Loading...