Commit Graph

131 Commits

Author SHA1 Message Date
Michael Muré
51a2c85954
make sure every text input is safe and validated
fix #630
2021-04-17 17:40:11 +02:00
Michael Muré
c884d557bf
repo: move bleve there 2020-12-08 14:42:13 +01:00
Michael Muré
499dbc0a03
identity: remove support for legacy identity 2020-10-04 20:50:15 +02:00
Zdenek Crha
999e61224c Fix 'no description' readability in terminal with bright background
The rendering of color for 'No description provided' text is broken on
bright terminals - it sets black background which together with default
black forground color renders opaque rectangle.

The GreyBold color alias is broken too - name suggests bold gray
forground color, but actually sets bold default fg color with black
bacground.

First make color alias consistent. Rename it to BlackBold and have it
set bold black fg color (same as similar *Bold aliases).

Second, update all places which use it to render text to also use white
background to prevent it from disappering in terminals with black
background color.
2020-09-27 09:22:34 +02:00
Zdenek Crha
6bf64841d3 Fix help bar readability in terminal with bright background
Set both background and foreground color when displaying help bar to
avoid sitation where default foreground color used by terminal is hard
to read on blue background (like cyan on blue or black on blue).

Apply colors to whole generated help bar to avoid 'stripes' of different
background color where whitespace is used between help items.
2020-09-27 09:22:34 +02:00
Michael Muré
807844bbec
termui: don't pack it *that* much 2020-08-30 12:17:04 +02:00
Michael Muré
a42abaaed7
termui: show the number of *additional* comments 2020-08-30 11:30:57 +02:00
Yuri D'Elia
5a4dc7aade
TermUI: pack the bug table view 2020-08-29 22:21:11 +02:00
Yuri D'Elia
6824ecf0fb
TermUI: Remove empty borders around bug table view 2020-08-29 22:21:11 +02:00
Michael Muré
8eb7faf67c
termui: help bar background goes all the width 2020-08-22 15:27:57 +02:00
Michael Muré
9ce84fc1a3
termui: make the help visually easier to parse 2020-08-22 15:12:09 +02:00
Michael Muré
ac7e508633
termui: avoid importing a whole package to check an error 2020-07-20 15:45:31 +02:00
Michael Muré
91f07d4753
Merge pull request #428 from wavexx/force_status_fgcolor
Set the Fg color of the status bar to White
2020-07-14 23:11:40 +02:00
Yuri D'Elia
9c3d25e776 Set the Fg color of the status bar to White
Always set the Fg color when Bg is set. This fixes poor contrast on
terminals with non-standard foreground colors.
2020-07-13 13:30:46 +02:00
Yuri D'Elia
54d4307a2e Trim titles in list views 2020-07-13 13:14:47 +02:00
Michael Muré
88ad7e606f
repository: remove tie to Bug, improved and reusable testing
- allow the creation of arbitrary Lamport clocks, freeing the way to new entities and removing Bug specific (upper layer) code.
- generalize the memory-only and persisted Lamport clocks behind a common interface
- rework the tests to provide reusable testing code for a Repo, a Clock, a Config, opening a path to add a new Repo implementation more easily
- test previously untested components with those new tests

Note: one problem found during this endeavor is that `identity.Version` also need to store one time + Lamport time for each other Entity (Bug, config, PR ...). This could possibly done without breaking change but it would be much easier to wait for https://github.com/MichaelMure/git-bug-migration to happen.
2020-06-26 19:14:22 +02:00
Michael Muré
aab3a04d0c
bug: harmonize how time are used, fix some issues in command special formats
This assume that the convertion from time.Time <--> Unix timestamp is lossless which seems to be.
2020-06-25 23:18:17 +02:00
Vojtěch Káně
8a81b9fec7 termui: fix a crash when trying to open a bug when there are none
Nothing prevented you from pressing Enter in bug listing even when there
were no open bugs. Doing so resulted in:

panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
github.com/MichaelMure/git-bug/termui.(*bugTable).openBug(0xc00007aa80, 0xc000354000, 0xc00036c120, 0x2, 0x2)
        /build/source/termui/bug_table.go:440 +0x17f
github.com/awesome-gocui/gocui.(*Gui).execKeybinding(0xc000354000, 0xc00036c120, 0xc0003102a0, 0xc00007a001, 0xc000225b2c, 0xc000000180)
        /build/go/pkg/mod/github.com/awesome-gocui/gocui@v0.6.1-0.20191115151952-a34ffb055986/gui.go:808 +0x65
github.com/awesome-gocui/gocui.(*Gui).execKeybindings(0xc000354000, 0xc00036c120, 0xc000225b38, 0x3, 0x4, 0x3)
        /build/go/pkg/mod/github.com/awesome-gocui/gocui@v0.6.1-0.20191115151952-a34ffb055986/gui.go:787 +0xed
github.com/awesome-gocui/gocui.(*Gui).onKey(0xc000354000, 0xc000225b38, 0x2, 0x0)
        /build/go/pkg/mod/github.com/awesome-gocui/gocui@v0.6.1-0.20191115151952-a34ffb055986/gui.go:745 +0x164
github.com/awesome-gocui/gocui.(*Gui).handleEvent(...)
        /build/go/pkg/mod/github.com/awesome-gocui/gocui@v0.6.1-0.20191115151952-a34ffb055986/gui.go:506
github.com/awesome-gocui/gocui.(*Gui).MainLoop(0xc000354000, 0x0, 0x0)
        /build/go/pkg/mod/github.com/awesome-gocui/gocui@v0.6.1-0.20191115151952-a34ffb055986/gui.go:466 +0x202
github.com/MichaelMure/git-bug/termui.initGui(0x0)
        /build/source/termui/termui.go:113 +0x12c
github.com/MichaelMure/git-bug/termui.Run(0xc000228000, 0xc000078b30, 0x0)
        /build/source/termui/termui.go:66 +0x185
github.com/MichaelMure/git-bug/commands.runTermUI(0x1211bc0, 0x12478e0, 0x0, 0x0, 0x0, 0x0)
        /build/source/commands/termui.go:18 +0xd5
github.com/spf13/cobra.(*Command).execute(0x1211bc0, 0x12478e0, 0x0, 0x0, 0x1211bc0, 0x12478e0)
        /build/go/pkg/mod/github.com/spf13/cobra@v0.0.6/command.go:840 +0x453
github.com/spf13/cobra.(*Command).ExecuteC(0x1210960, 0x0, 0x0, 0x0)
        /build/go/pkg/mod/github.com/spf13/cobra@v0.0.6/command.go:945 +0x317
github.com/spf13/cobra.(*Command).Execute(...)
        /build/go/pkg/mod/github.com/spf13/cobra@v0.0.6/command.go:885
github.com/MichaelMure/git-bug/commands.Execute()
        /build/source/commands/root.go:54 +0x2d
main.main()
        /build/source/git-bug.go:14 +0x20
2020-04-16 18:59:42 +02:00
Michael Muré
314fcbb229
query: no need for an ast package 2020-03-28 17:13:28 +01:00
Michael Muré
5e4dc87ffe
cache: replace the all-in-one query parser by a complete one with AST/lexer/parser 2020-03-28 17:13:27 +01:00
Michael Muré
a322721a11 termui: fix label cropped in the label edition window 2020-02-25 19:40:07 +01:00
Michael Muré
97bc5ccd22
various cleanups suggested by golang-ci 2020-02-08 16:17:15 +01:00
Michael Muré
fc568209f0
termui: fix an excessive assumption about an error 2019-12-27 20:08:58 +01:00
Michael Muré
965102f73c termui: rework the cursor in bugtable to match the rendering before the switch to awesome-gocui 2019-11-10 13:05:01 +01:00
Michael Muré
cb8236c9c2
termui: migrate to awesome-gocui instead of the old fork I had 2019-11-03 20:47:29 +01:00
Michael Muré
f72a9dc62b
switch to go-term-text to fix bad underflow for label rendering 2019-11-03 14:00:35 +01:00
ludovicm67
c9e824152d
termui: better overflow management 2019-10-16 23:51:11 +02:00
ludovicm67
25b1516968
termui: add labels colors in bug table 2019-10-15 20:42:27 +02:00
ludovicm67
75004e1298
bug: rename RGBA to Color 2019-10-15 20:42:27 +02:00
ludovicm67
d0d9ea56b9
termui: add colors for labels 2019-10-15 20:42:27 +02:00
Michael Muré
99b5c58d43 finish the refactoring for the dedicated identifier type 2019-08-12 16:12:14 +02:00
Michael Muré
612a29b031 fix everything following the hash-->id change 2019-08-08 19:06:13 +02:00
Michael Muré
08c0e18ade cache: expose the operation when creating a new bug 2019-06-16 21:04:36 +02:00
Michael Muré
b76357a5b1
termui: make bugTable only use the cache Easy pick
fix #127
2019-04-21 00:55:39 +02:00
ludovicm67
ff686e6d5b
termui: fix bug when trying to edit without selection 2019-04-10 23:53:10 +02:00
Michael Muré
24d6714dd5 cache: properly push/pull identities and bugs 2019-03-27 21:44:11 +01:00
Michael Muré
e100ee9f10
github: fix 3 edge-case failures 2019-03-01 22:48:50 +01:00
Michael Muré
bdbe9e7e82
identity: more progress and fixes 2019-03-01 22:35:37 +01:00
Michael Muré
feab9412df
WIP identity in git 2019-03-01 22:35:36 +01:00
Michael Muré
ebcf3a7587
termui: use a forked gocui to fix large character handling 2018-12-25 20:49:54 +01:00
Michael Muré
60d44f750e
Merge pull request #83 from Steap/improve-termui-paging
Improve termui paging
2018-12-25 20:12:20 +01:00
Michael Muré
94b28b68e5
termui: display an explicit placeholder for empty messages 2018-12-23 21:46:47 +01:00
Michael Muré
fb87d44888
termui: don't reset the cursor when paginating with left/right
See https://github.com/MichaelMure/git-bug/pull/83 for the rationale
2018-12-23 21:16:27 +01:00
Michael Muré
261aa61711
text: fix a wrapping bug leading to line longer than they should 2018-12-23 20:13:14 +01:00
Cyril Roelandt
87098cee7b Termui: Better position the cursor when changing page.
After moving to the previous page, users probably want to have their cursor on
the last entry of the page. When moving to the next page, they probably want it
to be on the first entry.
2018-12-22 01:39:38 +01:00
Cyril Roelandt
1174265e59 Termui: switch to the previous/next page when going up/down.
Rather than using 'h' or 'l' to load the previous or next page, allow users to
do this automatically when going up or down the list with 'k' or 'j'. This is
the default behaviour in mutt, for instance.
2018-12-22 00:06:40 +01:00
Michael Muré
9c89cf5b96
termui: tighter column in the bug table 2018-12-01 17:09:13 +01:00
Michael Muré
ab970da4d5
termui: use the '↵' symbol to save screen space 2018-12-01 17:08:19 +01:00
Michael Muré
1b9121def5
Merge branch 'labeledit' 2018-10-17 19:51:39 +02:00
Michael Muré
7275280de3
termui: some cleanup in the label edition code 2018-10-17 19:50:41 +02:00