Skip to content

Optimize the cheat sheet to be in a printable form factor #14903

Merged
cakrit merged 9 commits intomasterfrom
cheat-sheet
Apr 20, 2023
Merged

Optimize the cheat sheet to be in a printable form factor #14903
cakrit merged 9 commits intomasterfrom
cheat-sheet

Conversation

@Ancairon
Copy link
Copy Markdown
Member

@Ancairon Ancairon commented Apr 13, 2023

Summary

Closes netdata/learn#1597

This PR tries to make the cheat sheet be again in a printable form.

The sections left out were commented out and some info is condensed to fit A4 pages.

The goal is to be able to save as PDF using your web browser's built-in function.

I'd be happy to discuss what you think should/shouldn't be in this cheat sheet, I used the commands that I seemed to look for when deploying Netdata into my homelab, so maybe you got other things that you deem are necessary to be in this array of pages.

Just keep in mind, that this has to be the least pages possible, and stuff like the drop down in the start helps with space when collapsed and printed.

I went ahead and saved the cheat sheet in a PDF by right clicking in the page and selecting "print", here's the result:

Netdata cheat sheet.pdf

The sections are arranged in a way that would make sense for each page to be a standalone, and the link for the API page was spelled out in full, as you cant click a paper page 😄

The links for the individual sections I deemed best to put them in the dropdown, to save space in the printed form, as once printed they are just text.
If one doesn't want to print on paper, then he will not collapse the dropdown and save as PDF.

@Ancairon Ancairon self-assigned this Apr 13, 2023
@Ancairon Ancairon marked this pull request as ready for review April 13, 2023 09:33
Comment thread docs/cloud/cheatsheet.md Outdated
Comment thread docs/cloud/cheatsheet.md
Comment thread docs/cloud/cheatsheet.md Outdated
@Ancairon Ancairon requested a review from Ferroin April 13, 2023 15:42
Comment thread docs/cloud/cheatsheet.md
@Ancairon Ancairon requested a review from ilyam8 April 13, 2023 15:54
Comment thread docs/cloud/cheatsheet.md Outdated
**disk.io**, **disk.ops**, and **disk.backlog** are all contexts.
**disk.io**, **disk.ops**, and **disk.backlog** are all contexts. -->

---
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These --- are probably added by mistake.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are line breaks, docusaurus doesn't render them, allows for the bottom of the site page (form, edit this page etc.) to be on a separate PDF page.

Copy link
Copy Markdown
Contributor

@cakrit cakrit Apr 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have more things on a .md then than only work in docusaurus. The printing instructions are like this too.

Suggestion: Put some things you need in comments in the markdown and do some additional processing in learn to produce the .mdx as it needs to be, stripping the comment start/end like we had discussed.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<br> elements used instead to achieve this, @cakrit if we don't care about having those in the last page I could just remove the line breaks. I think it is smart for the user to just discard the last page

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep in mind, guys: one needs to adjust these new lines every time they do changes (add/remove text). It sounds a bit chore.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, but that means that if you save as a PDF then you have some weird stuff at the bottom of the page without those line breaks.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without the line breaks it looks like this
image

If we don't have a problem with how it looks (I don't really like it, but with the line breaks it will be empty space anyways), I will push a commit removing them.

@ilyam8 @cakrit

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't look like a problem to me, but you and @cakrit decide.

@Ancairon Ancairon requested a review from cakrit April 18, 2023 06:07
@cakrit
Copy link
Copy Markdown
Contributor

cakrit commented Apr 18, 2023

I wasn't clear on the request, I apologize. A useful cheatsheet is one that fits in a single printable page, which means tiny fonts. No need to bother printing on multiple pages, it won't help.
See the web for printable cheat sheets and you'll understand.

@cakrit
Copy link
Copy Markdown
Contributor

cakrit commented Apr 18, 2023

So I suggest to take out the printing stuff completely, if we can't make it a single page and just leave in the improvements you did.
Might as well change the name of the page as well, if it's not going to be a single sheet.

@Ancairon
Copy link
Copy Markdown
Member Author

Ancairon commented Apr 19, 2023

@cakrit, I changed the title, I think a fitting one is Useful management and configuration actions, and also a description of what the page contains was added.

I steered clear of using the word "common" because on Learn the first page after this category overview is called "Common configuration changes".

@cakrit cakrit merged commit e24c40d into master Apr 20, 2023
@cakrit cakrit deleted the cheat-sheet branch April 20, 2023 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make the cheat sheet into a printable form

4 participants