Use glamour and termev to render/colorize content #181

Merged
lunny merged 9 commits from 6543/tea:use-glamour into master 2020-09-19 16:00:55 +00:00
Owner

close #146
close #49

use glamour to render markdon for detail views

  • for repos
  • for issues
  • ...

and use glamour's dependency termev to colorize

  • label color field

close #146 close #49 use glamour to render markdon for detail views - for repos - for issues - ... and use glamour's dependency **termev** to colorize - label color field ![](https://gitea.com/attachments/09e75127-52aa-4fec-96bd-5aa89f149768) ![](https://gitea.com/attachments/77c35850-9f2d-42a8-8c90-e2574e8c2aac)
6543 added this to the v0.5.0 milestone 2020-09-16 04:39:07 +00:00
6543 added the
kind
feature
label 2020-09-16 04:39:07 +00:00
6543 added 5 commits 2020-09-16 04:39:10 +00:00
6543 changed title from use-glamour to Use glamour and termev to render/colorize content 2020-09-16 04:39:35 +00:00
6543 added the
status/needs-reviews
label 2020-09-16 04:39:43 +00:00
6543 added 1 commit 2020-09-17 12:58:44 +00:00
Merge branch 'master' into use-glamour
All checks were successful
continuous-integration/drone/pr Build is passing
763aeb5e68
Member

Nice!

This renders badly on a light-themed terminal for me though.
You could use termenv.HasDarkBackground() to set the glamour theme to "light" or "dark".

Also, note that this feature increases build size from 17mb to 25mb. But I guess that's worth it..?

Nice! This renders badly on a light-themed terminal for me though. You could use `termenv.HasDarkBackground()` to set the glamour theme to `"light"` or `"dark"`. Also, note that this feature increases build size from 17mb to 25mb. But I guess that's worth it..?
Author
Owner

for me tea with all patches: 17M (17694720b)

for me tea with all patches: `17M` (17694720b)
6543 added 1 commit 2020-09-17 19:37:48 +00:00
Merge branch 'master' into use-glamour
All checks were successful
continuous-integration/drone/pr Build is passing
1e3fb11148
6543 added
status/wip
and removed
status/needs-reviews
labels 2020-09-18 00:21:11 +00:00
Author
Owner

wip: because of HasDarkBackground()

wip: because of HasDarkBackground()
6543 added 1 commit 2020-09-18 00:31:59 +00:00
select Glamour Theme based on BackgroundColor
All checks were successful
continuous-integration/drone/pr Build is passing
445007e677
6543 added
status/needs-reviews
and removed
status/wip
labels 2020-09-18 00:32:16 +00:00
Author
Owner

@noerw hope your terminal looks now nice too :)

@noerw hope your terminal looks now nice too :)
Member

@6543 nice, theming works well!

RE build size (with go version go1.13.14 linux/amd64):

  • running make results in a 20M binary for me (current master is 13M)
  • running go build results in a 25M binary (current master is 17M).

Might be a go<=1.14 issue..?

@6543 nice, theming works well! RE build size (with `go version go1.13.14 linux/amd64`): - running `make` results in a 20M binary for me (current master is `13M`) - running `go build` results in a 25M binary (current master is `17M`). Might be a go<=1.14 issue..?

@noerw go 1.15 was announced as creating smaller binaries, perhaps you could attempt building with that?

@noerw go 1.15 was announced as creating smaller binaries, perhaps you could attempt building with that?
Member

Can confirm, on go 1.15 production build is 17M (compared to 11M on master).
The point still stands, this feature increases build size by more than 50%.

Considering that 11M is already totally out of place for a simple CLI, 17M is not significantly worse I guess ¯\_(ツ)_/¯ But it somehow rubs me the wrong way

Can confirm, on go 1.15 production build is 17M (compared to 11M on master). The point still stands, this feature increases build size by more than 50%. Considering that 11M is already totally out of place for a simple CLI, 17M is not significantly worse I guess ¯\\_(ツ)\_/¯ But it somehow rubs me the wrong way
Author
Owner

@noerw on the one hand storage space is cheep this days ...

on the other hand: look at the tools the unix time has given us (140K /usr/bin/ls) ...

I think the 6Mb are worth it if we realy utilize this two libs
adding to mouch libs and blow up tea's binary on the other hand is bas

so I would considder only 3 legitime libs: markdown rendering (already include collor lib and syntax highliting lib), the sdk (include version lib) and in the future eventualy survey? (for interactive prompts)

@noerw on the one hand storage space is cheep this days ... on the other hand: look at the tools the unix time has given us (`140K /usr/bin/ls`) ... I think the 6Mb are worth it if we realy utilize this two libs adding to mouch libs and blow up tea's binary on the other hand is bas so I would considder only 3 legitime libs: markdown rendering (already include collor lib and syntax highliting lib), the sdk (include version lib) and in the future eventualy survey? (for interactive prompts)
Author
Owner

@noerw with this and #186 the binary is 18M

gh cli tool is 19M

@noerw with this and #186 the binary is 18M `gh` cli tool is 19M
techknowlogick approved these changes 2020-09-19 04:01:09 +00:00
Dismissed
lunny approved these changes 2020-09-19 15:43:11 +00:00
Dismissed
lunny added 1 commit 2020-09-19 15:43:34 +00:00
Merge branch 'master' into use-glamour
All checks were successful
continuous-integration/drone/pr Build is passing
a8b5634dcf
lunny merged commit 89e93d90b3 into master 2020-09-19 16:00:55 +00:00
6543 deleted branch use-glamour 2020-09-19 18:31:43 +00:00
6543 removed the
status/needs-reviews
label 2020-09-19 18:44:55 +00:00
Sign in to join this conversation.
No description provided.