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

Introduce Featured Commands in README in scaffold package-readme #227

Closed
1 task done
ernilambar opened this issue Feb 25, 2024 · 8 comments
Closed
1 task done

Introduce Featured Commands in README in scaffold package-readme #227

ernilambar opened this issue Feb 25, 2024 · 8 comments

Comments

@ernilambar
Copy link
Member

Feature Request

Describe your use case and the problem you are facing

For package with large number of commands and subcommands, navigating through commands is quite difficult. TOC in the beginning of readme would be very helpful.

Describe the solution you'd like

List the commands anchored with corresponding command.

Example: https://github.com/ernilambar/entity-command/blob/toc/README.md

@danielbachhuber
Copy link
Member

Thanks for the suggestion!

I think listing all of the commands in a TOC could be a bit much for some. However, we could allow package authors curate the most popular commands into TOC (and indicate as such).

@ernilambar
Copy link
Member Author

In extra in composer.json, lets support featured-commands parameter:

    "featured-commands": [
      "database test",
      "database reset"
    ],

Output would be:

Screenshot 2024-02-26 at 12 12 46 PM

Example: https://github.com/ernilambar/database-command/tree/yo-toc#readme

@danielbachhuber
Copy link
Member

Cool, I think that looks reasonably good.

@swissspidy
Copy link
Member

swissspidy commented Feb 28, 2024

FWIW, GitHub already shows a table of contents:

Screenshot 2024-02-28 at 10 37 15

IIRC we already had this discussion at some point.

@ernilambar
Copy link
Member Author

Yah it seems there is already an issue: #141

@ernilambar
Copy link
Member Author

@swissspidy That GitHub thingy of readme file looks cool. I didn't know that. Nice.
This issue was started with full TOC is mind but now discussion is going around featured commands

@ernilambar ernilambar changed the title Introduce TOC for the commands in scaffold package-readme Introduce Featured Commands in README in scaffold package-readme Feb 28, 2024
@ernilambar
Copy link
Member Author

@danielbachhuber Featured commands was sparked from the need to see all commands in a bird eye view, which GitHub kind of already provides (even though with one extra click). So I am now neutral about this now. I am ok whatever you decide.

@danielbachhuber
Copy link
Member

Yeah, let's wontfix this. I think it's only a problem when a package has a lot of commands, which is just a few.

Package authors can easily highlight featured commands by creating a custom section part

@danielbachhuber danielbachhuber closed this as not planned Won't fix, can't repro, duplicate, stale Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants