Re: [openstack-dev] [OpenStack-Infra] Announcing Gertty 1.4.0

2016-08-02 Thread Roman Dobosz
On Mon, 1 Aug 2016 17:38:59 -0500
Mikhail Medvedev  wrote:

> > We essentially have two channels of information that we want to
> > represent with color -- the diff, and the syntax.  They can sometimes
> > overlap.
> >
> > Perhaps we could use a 256 color (or even RGB) terminal for this
> > feature.  Then we may be able to get just the right shade of background
> > color for the diff channel, and use the foreground colors for syntax
> > highlighting.
> >
> > At any rate, it may be worth trying to solve *this* problem first with a
> > mockup to see if there is any way of doing this without making our eyes
> > bleed before working on the code to implement it.
> 
> In theory it is possible split diff and syntax spatially, so there
> would be no need to mix diff and syntax colors. Mockup
> http://i.imgur.com/gAD9x9v.png

What is missing in this picture are changes, which are small enough to
take out entire line, like typos, spaces, punctuation and so on.

IMHO using 256 color terminal emulator is not fancy thing in 2016.
Maybe James suggestion wasn't so pointless? In 256 color capable
terminal, vim diff might can look more or less pleasant depending on
colorscheme:

http://www.math.bas.bg/bantchev/vim/gvimdiff-clue.png
http://pic002.cnblogs.com/images/2012/272919/2012020912181654.jpg
http://thenewstack.io/wp-content/uploads/2016/03/vimdiff.png

Another idea would be to use vim itself as the interface, and provide a
vim plugin (which could be written in python) for review activities.
Although it may be unsuitable for other editor users.

-- 
Cheers,
Roman Dobosz

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [OpenStack-Infra] Announcing Gertty 1.4.0

2016-08-01 Thread James E. Blair
Mikhail Medvedev  writes:

>
> In theory it is possible split diff and syntax spatially, so there
> would be no need to mix diff and syntax colors. Mockup
> http://i.imgur.com/gAD9x9v.png

True, though I should have clarified my comments as applying
particularly to the intra-line diff, where not only are changed lines
indicated (by dark red/green) but also changed characters (by bright
red/green).  As someone who could spend an hour staring at a line and
not seeing the addition of a single letter, I find that very useful.  :)

Perhaps in your approach some compromise could be obtained by indicating
a changed line as you suggest, and which characters are changed via an
alteration to either the foreground (perhaps making them bold) or
background color of the characters.

-Jim

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [OpenStack-Infra] Announcing Gertty 1.4.0

2016-08-01 Thread Jeremy Stanley
On 2016-08-01 17:38:59 -0500 (-0500), Mikhail Medvedev wrote:
> In theory it is possible split diff and syntax spatially, so there
> would be no need to mix diff and syntax colors. Mockup
> http://i.imgur.com/gAD9x9v.png

That's not too bad on the eyes, though as an avid user of the
unified diff view (rather than side-by-side as depicted in your
screenshot) it would amount to just color-coding the - and + at the
start of changed lines which probably won't jump out much visually.
-- 
Jeremy Stanley

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [OpenStack-Infra] Announcing Gertty 1.4.0

2016-08-01 Thread Mikhail Medvedev
On Mon, Aug 1, 2016 at 4:00 PM, James E. Blair  wrote:
> Masayuki Igawa  writes:
>
>> Hi!
>>
>> On Wed, Jul 27, 2016 at 11:50 PM, James E. Blair  wrote:
>>> Michał Dulko  writes:
>>>
 Just wondering - were there tries to implement syntax highlighting in
 diff view? I think that's the only thing that keeps me from switching to
 Gertty.
>>>
>>> I don't know of anyone working on that, but I suspect it could be done
>>> using the pygments library.
>>
>> Oh, it's an interesting feature to me :) I'll try to investigate and
>> implement in next couple of days :)
>
> As I think about this, one challenge in particular comes to mind: Gerrit
> uses background color (green and pink) to distinguish old and new
> text when displaying diffs.  In Gertty, I avoided that and used
> foreground colors instead because text with green and red backgrounds is
> difficult to read on a terminal.
>
> We essentially have two channels of information that we want to
> represent with color -- the diff, and the syntax.  They can sometimes
> overlap.
>
> Perhaps we could use a 256 color (or even RGB) terminal for this
> feature.  Then we may be able to get just the right shade of background
> color for the diff channel, and use the foreground colors for syntax
> highlighting.
>
> At any rate, it may be worth trying to solve *this* problem first with a
> mockup to see if there is any way of doing this without making our eyes
> bleed before working on the code to implement it.

In theory it is possible split diff and syntax spatially, so there
would be no need to mix diff and syntax colors. Mockup
http://i.imgur.com/gAD9x9v.png

>
> -Jim
>
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [OpenStack-Infra] Announcing Gertty 1.4.0

2016-08-01 Thread Jeremy Stanley
On 2016-08-01 14:00:12 -0700 (-0700), James E. Blair wrote:
[...]
> We essentially have two channels of information that we want to
> represent with color -- the diff, and the syntax.  They can sometimes
> overlap.
[...]

One option that probably wouldn't bug me too much is if it could be
toggled on/off fairly instantaneously while in diff view, so that if
it becomes hard to read one way (syntax highlight colors too noisy)
you just switch to the other (diff highlighting only) and keep
reading.
-- 
Jeremy Stanley

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [OpenStack-Infra] Announcing Gertty 1.4.0

2016-08-01 Thread James E. Blair
Masayuki Igawa  writes:

> Hi!
>
> On Wed, Jul 27, 2016 at 11:50 PM, James E. Blair  wrote:
>> Michał Dulko  writes:
>>
>>> Just wondering - were there tries to implement syntax highlighting in
>>> diff view? I think that's the only thing that keeps me from switching to
>>> Gertty.
>>
>> I don't know of anyone working on that, but I suspect it could be done
>> using the pygments library.
>
> Oh, it's an interesting feature to me :) I'll try to investigate and
> implement in next couple of days :)

As I think about this, one challenge in particular comes to mind: Gerrit
uses background color (green and pink) to distinguish old and new
text when displaying diffs.  In Gertty, I avoided that and used
foreground colors instead because text with green and red backgrounds is
difficult to read on a terminal.

We essentially have two channels of information that we want to
represent with color -- the diff, and the syntax.  They can sometimes
overlap.

Perhaps we could use a 256 color (or even RGB) terminal for this
feature.  Then we may be able to get just the right shade of background
color for the diff channel, and use the foreground colors for syntax
highlighting.

At any rate, it may be worth trying to solve *this* problem first with a
mockup to see if there is any way of doing this without making our eyes
bleed before working on the code to implement it.

-Jim

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [OpenStack-Infra] Announcing Gertty 1.4.0

2016-07-27 Thread Masayuki Igawa
Hi!

On Wed, Jul 27, 2016 at 11:50 PM, James E. Blair  wrote:
> Michał Dulko  writes:
>
>> Just wondering - were there tries to implement syntax highlighting in
>> diff view? I think that's the only thing that keeps me from switching to
>> Gertty.
>
> I don't know of anyone working on that, but I suspect it could be done
> using the pygments library.

Oh, it's an interesting feature to me :) I'll try to investigate and
implement in next couple of days :)

Thanks,
-- Masayuki Igawa

>
> -Jim
>
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [OpenStack-Infra] Announcing Gertty 1.4.0

2016-07-27 Thread James E. Blair
Michał Dulko  writes:

> Just wondering - were there tries to implement syntax highlighting in
> diff view? I think that's the only thing that keeps me from switching to
> Gertty.

I don't know of anyone working on that, but I suspect it could be done
using the pygments library.

-Jim

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev