Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help formatting in terminal #4529

Closed
waldekmastykarz opened this issue Feb 18, 2023 · 21 comments
Closed

Help formatting in terminal #4529

waldekmastykarz opened this issue Feb 18, 2023 · 21 comments
Assignees
Milestone

Comments

@waldekmastykarz
Copy link
Member

waldekmastykarz commented Feb 18, 2023

Update headings in help to be formatted as bold and uppercase in the terminal.


I've been experimenting with different ways of formatting help in the terminal, specifically, using bold for headings which seems to be convention in man pages. Here are the results:

Bold + uppercase
image

Bold
image

For reference, here's the current format (uppercase, regular)
image

Which option do you like the most @pnp/cli-for-microsoft-365-maintainers?

@milanholemans
Copy link
Contributor

Using bold headings is a great addition @waldekmastykarz!
If I have to pick one, I'd go for just bold. In that sample, I see the URL in the query description is underlined in blue. Does this mean that it's clickable or something?

@Jwaegebaert
Copy link
Contributor

+1 on the bold front. I'm also very intrigued if that link is clickable. A bit of color in the help output would be a great addition.

@waldekmastykarz
Copy link
Member Author

The clickable link is my bad: while taking the screenshot I had my mouse pointer hovering over the URL and my terminal turned it into a link.

@waldekmastykarz
Copy link
Member Author

I like the bold formatting as well! Let's give others a couple of days to respond and we can take it from there 👍

@waldekmastykarz waldekmastykarz added the needs peer review Needs second pair of eyes to review the spec or PR label Feb 18, 2023
@Adam-it
Copy link
Contributor

Adam-it commented Feb 18, 2023

only bold looks cool enugh 🤩. @waldekmastykarz awesome suggestion 👍
BTW white terminal? now I've seen everything 😅

@waldekmastykarz
Copy link
Member Author

My terminal automatically switches between dark and light mode, just as VSCode and any other app that's capable of it 😎

@Adam-it
Copy link
Contributor

Adam-it commented Feb 19, 2023

My terminal automatically switches between dark and light mode, just as VSCode and any other app that's capable of it 😎

the auto dark mode app rocks 🤩... I do the same with everything except the terminal 😅

@waldekmastykarz
Copy link
Member Author

Evidence in dark mode:

image

@martinlingstuyl
Copy link
Contributor

I like the bold plus uppercase best. I feel it stands out just a little better compared to the just bold variant.

@waldekmastykarz
Copy link
Member Author

waldekmastykarz commented Feb 20, 2023

OK, So far we've got:

  • bold (Milan, (not)Jasey, Adam)
  • bold+upper (Martin, Mathijs, Waldek, Nico)
  • keep current 0

I like both bold and bold+upper but if had to choose one, I'd go with bold+upper 😊

@MathijsVerbeeck
Copy link
Contributor

MathijsVerbeeck commented Feb 20, 2023

Personally, I'd prefer the bold+upper.

@waldekmastykarz waldekmastykarz added the ux UX-related work label Feb 20, 2023
@nicodecleyre
Copy link
Contributor

I'm also in favor for the bold + uppercase

@nicodecleyre
Copy link
Contributor

+1 on the bold front. I'm also very intrigued if that link is clickable. A bit of color in the help output would be a great addition.

Speaking of using colors in the terminal, there is something like glow

@waldekmastykarz
Copy link
Member Author

+1 on the bold front. I'm also very intrigued if that link is clickable. A bit of color in the help output would be a great addition.

Speaking of using colors in the terminal, there is something like glow

Correct, it's a lib written in Go for use with scripts. Nothing we can integrate in CLI unfortunately.

@milanholemans
Copy link
Contributor

OK, So far we've got:

* bold (Milan, Jasey, Adam)

* bold+upper (Martin, Mathijs, Waldek, Nico)

* keep current 0

I forgot to mention that I have right of veto, sorry guys 😊

@waldekmastykarz
Copy link
Member Author

Anyone? Anyone else? 😄

@TotallyNotJasey
Copy link

Hi, totally new here. I would also go for the option bold.
Have a nice day gents 🎩

@waldekmastykarz
Copy link
Member Author

Seems like bold+upper it is. Since our text output is not an API, we can always adjust the output if we learn something new.

@waldekmastykarz waldekmastykarz added enhancement help wanted and removed question needs peer review Needs second pair of eyes to review the spec or PR labels Mar 3, 2023
@nicodecleyre
Copy link
Contributor

I'm interested in giving this a go

@nicodecleyre
Copy link
Contributor

nicodecleyre commented Mar 7, 2023

Hi all,

When trying to resolve this issue I used escape codes to make the titles go bold in the console.log. A list of these codes can be found here.

I played around with it a bit and it seems that this also can be used to display colors if we would want to (i'm not saying that we should 😄 )

A couple of examples:

  • The title in another color:
    image

  • dim the code in the response block:
    image

Just wanted to let you guys know this

@milanholemans
Copy link
Contributor

Thank you for sharing @nicodecleyre!
In the past we used to have colors in our docs printout but we stepped away from it. Can't really remember why, maybe because it might give issues when you have terminal themes. For example blue text will be extremely hard to read in a blue PowerShell window. And because people can style their own terminal, it's nearly impossible to create a color palette that works for all I guess.

@Adam-it Adam-it closed this as completed in 4c6aa44 Apr 1, 2023
@Adam-it Adam-it added this to the v6.5 milestone Apr 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
8 participants