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

Topic/more words to help home #6141

Open
wants to merge 48 commits into
base: develop
Choose a base branch
from

Conversation

prko
Copy link
Contributor

@prko prko commented Nov 23, 2023

Purpose and Motivation

I recently compared the help document home pages (or index pages) of SC, Max, pd and Csound, and I found SC's documentation to be the most beginner unfriendly. The following three posts in a thread are relevant to this:

  1. https://scsynth.org/t/developing-new-supercollider-tutorials/364/47?u=prko
  2. https://scsynth.org/t/developing-new-supercollider-tutorials/364/49?u=prko
  3. https://scsynth.org/t/developing-new-supercollider-tutorials/364/50?u=prko

Then I thought we needed more words for the help browser home page, and posted the following thread, where I also compared the SuperCollider 3.4 for Windows (I do not have a Mac to launch SC 3.4 on.) documentation with the current one:
https://scsynth.org/t/more-words-to-supercollider-help-document-home/8492?u=prko

This is the latest version, reflecting all the opinions in the thread above as best I can. I have also changed some links to be more appropriate. You can see these changes in the browser home of this PR in the following video:
https://www.dropbox.com/scl/fi/5531ljvpp1iy9j7uuduq3/sc-documentation-home-draft-4.mov?rlkey=ax82kto7erkn4dm2x056gvl2z&dl=0

As you can see in the video, the SuperCollider on the top left hides the S in the SuperCollider label. This is reported in #6138.

We should also update scdoc.css: the most important thing for this PR is to fix the width of the tables, which is also included in this PR.

The scdoc.js should also be modified to include the class tree in the indexes menu at the top. This is also included in this PR.

Notes

  1. To arrange the table more beautifully, I am using soft:: :: for a space placeholder.
    The character between :: and :: is an en space:
    en space | 020002 | 8194 | 0x2002 |  

  2. I have not added a link for sclang, as I am not sure which is better for it between Process, Main and Interpreter.

  3. Would it be better to show the paths of sclang, scsynth, supernova and scide per OS? Showing these executables in the file explorer seems to help beginners understand the inter-application cooperation.

  4. I am not sure what the correct category is for 'Audio device selection'. Would "Basic" in "Get Help" be better than the current category ("Basic" in "Overview")?

Types of changes

  • Documentation

To-do list

  • I hope that the source files included in this PR (and other files not included in this PR) will be modified by many users to get a better help documentation home for beginners, intermediate and advanced users, as well as for non-SC users who might read the help documentation home from the Internet out of interest. Feel free to change the details of this PR.
  • Code is tested
  • All tests are passing
  • Updated documentation
  • This PR is ready for review
Screenshot 2023-11-23 at 20 48 24 Screenshot 2023-11-23 at 20 48 38

@prko
Copy link
Contributor Author

prko commented Nov 23, 2023

I hope that the source files included in this PR (and other files not included in this PR) will be modified by many users to get a better help documentation home for beginners, intermediate and advanced users, as well as for non-SC users who might read the help documentation home from the Internet out of interest. Feel free to change the details of this PR.

Copy link
Contributor

@capital-G capital-G left a comment

Choose a reason for hiding this comment

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

Some minor corrections/suggestions from my side :)

The tables are very nice, but maybe maybe there is a way to control its layout more explicitly via css instead of adding some fill characters :)

HelpSource/Help.schelp Outdated Show resolved Hide resolved
HelpSource/Help.schelp Outdated Show resolved Hide resolved
HelpSource/Help.schelp Outdated Show resolved Hide resolved
HelpSource/Help.schelp Outdated Show resolved Hide resolved
Co-authored-by: Dennis Scheiba <dennis.scheiba@gmx.de>
HelpSource/Help.schelp Outdated Show resolved Hide resolved
HelpSource/Help.schelp Outdated Show resolved Hide resolved
HelpSource/Help.schelp Outdated Show resolved Hide resolved
HelpSource/Help.schelp Outdated Show resolved Hide resolved
HelpSource/Help.schelp Outdated Show resolved Hide resolved
HelpSource/Help.schelp Outdated Show resolved Hide resolved
HelpSource/Help.schelp Outdated Show resolved Hide resolved
@mtmccrea
Copy link
Member

One final thought after this first read-through:
I nearly always have the Help pane docked in the IDE, occupying about 1/4 of the window’s width. Can you post a screenshot of the tables with a narrow pane width?

SuperColliders should be corrected again to SuperCollider's

Co-authored-by: Dennis Scheiba <dennis.scheiba@gmx.de>
reflected the following suggestion:
supercollider#6141 (comment)
typo correction
typo correction
@prko
Copy link
Contributor Author

prko commented Nov 26, 2023

I have split the "Contributing to SC" section into "Sharing your work" and "Contributing to SC".
I changed the left margin of the unordered list in table td in scdoc.css. As far as I have checked, there seems to be no list in a table in the default installation of SuperCollider. The "Help.schelp" file is the only unique help file.
I also removed soft::    :: which was used to adjust the width of the table cells, but not removed soft:: :: used for other purposes.
The following screenshots are taken with the minimum width of the Help Browser to display the Help Home correctly:

Screenshot 2023-11-26 at 15 12 57 Screenshot 2023-11-26 at 15 13 11 Screenshot 2023-11-26 at 15 08 37 Screenshot 2023-11-26 at 15 08 53 Screenshot 2023-11-26 at 15 09 08

@mtmccrea
Copy link
Member

Thanks @prko for the screenshots and making the adjustments to improve the appearance for narrower views!

@capital-G
Copy link
Contributor

@prko maybe it would be best to use css grid layouts for the tables instead? Currently the width of each column is not aligned.

image

Using grid view allows in an easy way to distribute content equally as well as changing the layout easily on really narrow views (e.g. 200px) through e.g.

@media only screen and (max-width: 200px) {
    .table-content {
        grid-template-columns: 1fr;
    }
}

If you need some help for this I am happy to help :)

inserting the code in the following post

supercollider#6141 (comment)
@prko
Copy link
Contributor Author

prko commented Nov 26, 2023

@capital-G

@prko maybe it would be best to use css grid layouts for the tables instead? Currently the width of each column is not aligned.
...
If you need some help for this I am happy to help :)

This is a great idea. I found the following website:
https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout/Basic_concepts_of_grid_layout

To implement this functionality, a class (according to the page the class "wrapper") should be used in the scdoc.css file and the help.schelp file, if I understand it correctly.

Am I correct?

If I am correct, I can put the following part in scdoc.css:

.wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
}

However, I do not know how to put its corresponding counterpart <div class="wrapper"> into the Help.schelp file. The SCDoc.sc file or/and the SCDocRenderer.sc file should seem to be modified, but this is beyond my capabilities.

So I need your help and I would be very grateful if you could help me!

@prko
Copy link
Contributor Author

prko commented Nov 26, 2023

@capital-G

The SCDoc.sc file or/and the SCDocRenderer.sc file should seem to be modified,

Some tags seem to be related to .cpp, .hpp, .l, and .y files which are used to build a package of SC:
#6131

animations added to sclang
Update Help.schelp - alternative editor list part
Update Help.schelp alternative editors mentions only wiki in github
github wiki added
table design changed
@prko
Copy link
Contributor Author

prko commented Jan 5, 2024

the table design is changed. seems better?
Screenshot 2024-01-05 at 16 21 46

HelpSource/Help.schelp Outdated Show resolved Hide resolved
HelpSource/Help.schelp Outdated Show resolved Hide resolved
@prko
Copy link
Contributor Author

prko commented Feb 3, 2024

The current design (the smallest width).
The even cell width results in a wider page width.
Screenshot 2024-02-03 at 17 28 23
Screenshot 2024-02-03 at 17 28 50
Screenshot 2024-02-03 at 17 29 07
Screenshot 2024-02-03 at 17 32 49
Screenshot 2024-02-03 at 17 32 00

prko added a commit to prko/supercollider that referenced this pull request Feb 9, 2024
the removed part was for supercollider#6141

So, the removed part is in that PR.
redesigned
- Vertical cell width arrangement is better (still not perfect).
- Horizontal width is now the most compact.
- Links in Contribute and Share have been added and redesigned.
@prko
Copy link
Contributor Author

prko commented Feb 9, 2024

This seems to be the last change from my point of view, but I am willing to change if anyone asks for a change.

  • Vertical cell width arrangement is better (still not perfect).
  • Horizontal width is now the most compact.
  • Links in Contribute and Share have been added and redesigned.

Here is some screenshots on Windows:
Screenshot 2024-02-09 at 21 20 40
Screenshot 2024-02-09 at 21 20 22

@capital-G
I would like to know if you have a solution for the following:

Using grid view allows in an easy way to distribute content equally as well as changing the layout easily on really narrow views (e.g. 200px) through e.g.

@media only screen and (max-width: 200px) {
    .table-content {
        grid-template-columns: 1fr;
    }
}

If you need some help for this I am happy to help :)

As I wrote earlier, I cannot find a way to do this myself, unfortunately...

@capital-G
Copy link
Contributor

I just checked out the code and the problem is that scdoc is not really following best practices regarding DOM construction, so it is not possible to give a namespace to the described tables and therefore adjust only their styling. It also seems not possible to construct a div namespace "on the fly" within the document.

One can create a css selector along "select the table after the heading of title xyz" but this is prone to fail - additionally the individual blocks are not wrapped in a div and the individual blocks are also not divs, which makes alignment really hacky.

I tried to create a similar flow via definitionlist:: but it allows no nesting of lists or linebreaks, so I instead tried to use definitionlist with a list which looks like

image
definitionlist::
     ## Basics
     || List::
          ## link::Guides/How-to-Use-the-Interpreter::
          ## link::Guides/Understanding-Errors::
     ::
     ## Intermediate
     || List::
          ## link::Guides/Debugging-tips::
          ## link::Guides/Tracing-Processes::
          ## link::Guides/HID_permissions::
          ## link::Guides/LID_permissions::
     ::
     ## Intermediate
     || List::
          ## link::Guides/Internal-Snooping::
     ::
::

While I looked at it I also noticed some strange symbols in the code which should not be there - I think you use them to create spacing, but this is more a hack and one should use CSS instead, but this doesn't work either as stated above.

image

Generally, scdoc would benefit from a rewrite implementing div namespaces which would allow for improved styling capabilities, but this would be out of scope.

I think its best to use the existing design patterns within scdoc, as this makes a future re-design (or else) easier if there are not too different elements or hacks present.

@prko
Copy link
Contributor Author

prko commented Feb 9, 2024

@capital-G
Thank you for your time, effort and kindness!

For me, the design is not that important. I am more satisfied with the current content because

  • I can do more things in the help browser, and
  • I think I can make SuperCollider more beginner-friendly.

I hope one of this one or the previous one could be accepted with the content based on the current content.

Here is the current state (The numbers '123' with a strikethrough line to the right of the 'Indexes' are relevant to #6207):

Screenshot 2024-02-10 at 0 54 29

Screenshot 2024-02-10 at 0 54 38

Screenshot 2024-02-10 at 0 54 44

Screenshot 2024-02-10 at 0 55 14

Screenshot 2024-02-10 at 0 55 19

Screenshot 2024-02-10 at 0 55 23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants