Skip to content

Prettier rendering of job output #9478

Open

Description

@mike-lawrence

I'm using the jobs output pane to render the progress of some background computations and I notice that the text there is far uglier than the equivalent in the terminal that comes with ubuntu.

Here's what I get in ubuntu terminal:
Screenshot from 2021-06-08 21-45-10

Which looks great. In contrast, this is what I get in the Jobs output pane:
Screenshot from 2021-06-08 21-45-46

Code to generate:

jobID = rstudioapi::jobAdd('test')
bar_width = 80 - 2
warmup_width = floor(bar_width/2)
sampling_width = bar_width - warmup_width
bar = paste0(
	'\U00C ' #scroll to next page (hack bc the clear screen and cursor set control sequences don't work)
	, strrep('\U2592',warmup_width) #lighter shade block
	, strrep('\U2593',sampling_width) #darker shade block
	, '\n'
	, '['
	, strrep('\U2588',warmup_width-1) #full block character
	, '\U258B' #partial block character (full set: c('\U258F','\U258E','\U258D','\U258C','\U258B','\U258A','\U2589','\U2588') ) 
	, strrep(' ',sampling_width)
	, ']\n'
)
rstudioapi::jobAddOutput(jobID,bar)

Activity

  1. changed the title [-]Prettier rendering of job's output[/-] [+]Prettier rendering of job output[/+] on Jun 9, 2021
  2. kevinushey commented on Jun 9, 2021

    @kevinushey
    Collaborator

    There's a small chance that this will be improved when we next update xterm.js (via the new canvas renderer) but I'm not sure when we'll be able to approach that work.

  3. gtritchie commented on Jun 9, 2021

    @gtritchie
    Member

    Xterm.js is only used for the terminal; the ANSI support in console, build pane, etc. is a separate implementation.

  4. added this to the Later milestone on Jun 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions