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

Improve big-file usability. Add "Return to Top" Links? #5092

Open
minelarka14 opened this issue Nov 8, 2020 · 15 comments
Open

Improve big-file usability. Add "Return to Top" Links? #5092

minelarka14 opened this issue Nov 8, 2020 · 15 comments
Labels
👥 discussion This Repo is guided by its community! Let's talk! New Feature New feature / enhancement / translation...

Comments

@minelarka14
Copy link

As the content in a single file is huge, scrolling to the top seems to be a hassle. Would it be possible to add "Return to the top" links after every subtopic that make navigating the files alot easier? I wouldn't mind doing this.

@eshellman eshellman changed the title Add "Return to Top" Links. Improve big-file usability. Add "Return to Top" Links? Nov 8, 2020
@eshellman eshellman added the 👥 discussion This Repo is guided by its community! Let's talk! label Nov 8, 2020
@eshellman
Copy link
Collaborator

we could also think about ways to break it into smaller chunks. we could do language agnostic and language specific.
if we do links to the index, we probably don't want them after every topic.

Comment from the community will be appreciated!

@kadhirash
Copy link
Member

Having it at the end of every single topic does seem excessive, but a workaround could be #4588.

If the files were in separate directories by language specific, for example, then it'd be much less to scroll through and return to top wouldn't be needed!

@SethFalco
Copy link
Sponsor Member

SethFalco commented Nov 16, 2020

I don't have a strong opinion on this issue, I just wanted to drop by something interesting I noticed on another repo.
(If anything, I'm probably with @kadhirash and think having a link on every topic would be excessive.)

I just wanted to note though, it doesn't look like it's unfeasible, another repo took such an approach in the README.

image

At the end of each heading, they add an up-arrow which goes to the top of the page.
- https://github.com/chicagoruby/MongoDB_Koans

Hypothetically, if this was to be done as described, seems like a viable solution.

@borgified
Copy link
Contributor

control + up arrow or command + up arrow (if you are on mac) will take you to the top of any webpage

@minelarka14
Copy link
Author

image

I think that this would greatly improve readability while still retaining minimalism, is it alright if I create a PR to add this?

@eshellman
Copy link
Collaborator

I took a look at that repo, the source files are "rdoc" rather than "md". How do you propose that we implement it? How will it be maintained? will it play nice with our linter?

@eshellman eshellman mentioned this issue Nov 27, 2020
5 tasks
@ianchanning
Copy link
Contributor

I think you should be consistent with other awesome lists. I don't remember ever seeing a 'return to top' link. For example the main awesome list is very long, but still has no return links.

I guess this list is longer than others, but it still seems out of place.

The nngroup does recommend it and I guess on mobile it is handy.

However it would be nice if we could find similar examples elsewhere in the awesome list universe

@eshellman
Copy link
Collaborator

we've reorganized our files, so now is a good time to make changes.

@SethFalco
Copy link
Sponsor Member

On the side, since this repository recognizes itself as an awesome list on the README, it might be nice to add the awesome topic to it on GitHub.


I'll gladly contribute the change, but just want to verify if we really want to do this, and if so, which method.

Looking at the most popular awesome repositories on GitHub with the topic awesome.

  • awesome - N/A
  • awesome-python - N/A
  • awesome-go - N/A
  • awesome-selfhosted - ^ back to top ^ under each heading.
  • Awesome-Hacking - N/A
  • awesome-mac - N/A
  • awesome-nodejs - N/A
  • awesome-android-io - N/A
  • awesome-interview-questions - N/A
  • awesome-ios - N/A
  • awesome-courses - N/A
  • awesome-flutter - N/A
  • awesome-cpp - N/A

From here we can see most of the most popular awesome repositories don't actually include back to tops at all despite being massive. I also checked the issues and pull requests and didn't see any demand for a back to top link either.

That doesn't go to say it's undesirable though, just that others don't do it, and there doesn't seem to be a convention among awesome repositories.

Proposals:

Do Nothing (Current)

Just leave the repo as it and close this issue, personally I think it's fine as is anyway.

Java

Python

"back to top" under Heading

The same way that awesome-selfhosted does it.

Java

^ back to top ^

Python

^ back to top ^

Icon Next to Heading

Similar to the screenshot showed during this discussion.
This could be achieved with various icons/emojis though, if we do this, it might be worth thinking which one.

I think if we took this approach, using an emoji would be best since it'll look attractive. We should use the actual character (ie ⤴️) though rather than the GitHub shortcut (ie :arrow_heading_up:) so that it can render correctly outside of GitHub.

  • ⤴️ - Nice character that GitHub has an emoji for.
  • ⬆ - Alternate character if a straight is preferred over curved.
  • ↑ - A normal up arrow character, GitHub doesn't have an emote for this character. (Used in screenshot referenced in discussion.)
  • Tonnes of others, I just shortlisted apt candidates.

Java ⤴️

Python

Rust

@eshellman
Copy link
Collaborator

how would it work if we split the english books list into topics and languages?

@SethFalco
Copy link
Sponsor Member

SethFalco commented Feb 13, 2021

how would it work if we split the english books list into topics and languages?

My understanding is that the "back to top" links would always send the user back to #index (table of contents), so I don't think the structure of the documents would change anything. (Assuming we did "back to top" the way most sites would handle it.)

By Language ⤴️

Java ⤴️

By Topic ⤴️

Cloud Computing ⤴️

All ⤴️ link to the index/table of contents.

We could technically do it differently, like instead of implementing "back to top", we could implement "up a level" to take the user to the parent heading. For example, from the h2 (Python) to its parent h3 (By Language). I suspect most users wouldn't expect this behavior, so probably not viable, but figured I'd propose the alternative as it came to mind. (Haven't surveyed.)

By Language ⤴️

Java ⤴️

Spring Boot ⤴️

By Topic ⤴️

Cloud Computing ⤴️

The h5 (Spring Boot) link to the parent h4 (Java), h4 link to the parent h3, and the h3 link to the index/table of contents.

@davorpa
Copy link
Member

davorpa commented Aug 23, 2021

About put the mark on headings...

It would take care to don't break generated anchors by github markdown / github pages and be synced with TOCs

@davorpa
Copy link
Member

davorpa commented Sep 4, 2021

Another option could be markdown spoilers:

<details><summary>A very long content....! (:arrow_down: Expand/Collapse)</summary>

  **free-programming-books is awesome.**
  
  > ### By Language [:arrow_heading_up:](#index)
  > #### Java [:arrow_heading_up:](#index)
  > * [Cool Java Resource](https://example.com) - Author

  `markup like blockquote's should even work on github!`

  ![Image](https://user-images.githubusercontent.com/22801583/99295480-c05b5e80-2845-11eb-9215-0b34cf2a29e7.png)

</details>

Seen as Dependabot issues description.

PREVIEW

A very long content....! (:arrow_down: Expand/Collapse)

free-programming-books is awesome.

By Language ⤴️

Java ⤴️

markup like blockquote's should even work on github!

Image

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

Edit: I'm on Android and seems works well. I'll try to make a branch on my fork testing with helldam english book listing 😆

@SethFalco
Copy link
Sponsor Member

SethFalco commented Sep 4, 2021

I think spoilers are a nice idea, but last time I was on Android the GitHub app didn't render them.
Maybe someone could test it on the Android app and verify if this is still the case?

I can set up Anbox later and try it myself if no one else uses it.

Edit: Reworded the initial statement. Spoilers could be a good idea, but I think the GitHub app will cause issues, though.

@LuigiImVector
Copy link
Member

Markdown spoilers are a good idea but maybe would give problems to the free-programming-books-parser and to the new contributors since to make the markdown work within the spoiler you need a white space after the tag:

⬇️ Invalid * doesn't * work
<details><summary> :arrow_down: Invalid</summary>
* doesn't
* work
</details>
⬇️ Valid
  • doesn't
  • work
<details><summary> :arrow_down: Valid </summary>

* doesn't
* work
</details>

IMO the best idea is to put an emoji every section in the longer files:

C++ ⤴️

### C++ <a href="#index">:arrow_heading_up:</a>

Before creating an implementation pr, we need to figure out if any of these things can create problems with fpb-search @EbookFoundation/f-p-b-search

@LuigiImVector LuigiImVector added the New Feature New feature / enhancement / translation... label Jul 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👥 discussion This Repo is guided by its community! Let's talk! New Feature New feature / enhancement / translation...
Projects
None yet
Development

No branches or pull requests

8 participants