devdocs icon indicating copy to clipboard operation
devdocs copied to clipboard

The bin/magento cli reference contains way too many duplicated flags

Open hostep opened this issue 4 years ago • 11 comments

Bug report

Description

Hi guys, take a look at this page here: https://devdocs.magento.com/guides/v2.4/reference/cli/magento.html Search for any of these flags:

  • --help
  • --quiet
  • --version
  • --ansi
  • --no-ansi
  • --no-interaction
  • --verbose

All these flags appear 112 times on the page, because they don't belong to a specific command, but to the bin/magento command itself.

In my opinion it makes no sense to list these same flags 112 times, as it makes the document harder to read if looking for something.

Steps to reproduce

See above

Expected result

See below

Possible solutions

Potential solution could be to list these common flags one time at the top of the page, saying that you can use those flags for all other commands as well. That way we only see the flags that are truly interesting for a specific command.

@dshevtsov

Additional information

hostep avatar Aug 10 '21 20:08 hostep

Hi @hostep. Thank you for your report. To help us process this issue please make sure that you provided sufficient information.

Please, add a comment to assign the issue: @magento I am working on this


m2-assistant[bot] avatar Aug 10 '21 20:08 m2-assistant[bot]

@magento I am working on this

BarnyShergold avatar Aug 11 '21 15:08 BarnyShergold

@dshevtsov

dobooth avatar Aug 11 '21 16:08 dobooth

@dshevtsov - can something be done on this issue as you are the only person that can do it.....?

BarnyShergold avatar Aug 27 '21 14:08 BarnyShergold

We've discussed this before internally, and decision was to keep it as is because it's a reference documentation. Every command had to contain all available options. When users get to the page from outside search, we want to show them all available options, without an assumption that they know that there are common and specific commands. Specific commands are listed in a format string, for example: bin/magento braintree:migrate [--host HOST] [--dbname DBNAME] [--username USERNAME] [--password PASSWORD]. But I can see that it still creates an issue with readability. The solutions I can suggest is, as proposed in Possible solution, to list the common flags at the beginning of the topic, AND add a reference link Common flags to every command instead of listing them. This is a low priority issue, because it only requests reformatting.

dshevtsov avatar Aug 27 '21 17:08 dshevtsov

@dshevtsov - Can we close this issue then or do you want to keep it open for reference? Means we don't have to keep addressing it 😄

BarnyShergold avatar Sep 06 '21 13:09 BarnyShergold

As long as the issue isn't solved, it shouldn't be closed, right? (What's with the desperation to close issues? Open issues form the backlog of what still needs to happen, it makes little sense to close the ones that aren't addressed yet...)

hostep avatar Sep 06 '21 19:09 hostep

As long as the issue isn't solved, it shouldn't be closed, right? (What's with the desperation to close issues? Open issues form the backlog of what still needs to happen, it makes little sense to close the ones that aren't addressed yet...)

No desperation - just trying to clear up issues that don't need to be open so we don't end up looking at the same ones over and over. Question - is it possible to have a new label? Eg "Backlog" then issues like this can be flagged, left open and perhaps even discussed during maintainer calls?

BarnyShergold avatar Sep 07 '21 08:09 BarnyShergold

I agree with @hostep. @BarnyShergold, I added the Help Wanted label, because, technically, I'm not the only one who can do it.

dshevtsov avatar Sep 07 '21 19:09 dshevtsov

@dshevtsov: maybe it can help if you can link to the script that is used to generate that page. Then if somebody is interested in figuring out how to fix this, he/she already knows what script needs to be tweaked and can give it a try.

hostep avatar Sep 07 '21 19:09 hostep

Sure.

The following topic assigns variables required by the script, and includes a file with the script: https://github.com/magento/devdocs/blob/master/src/guides/v2.4/reference/cli/magento.md

The file with script: https://github.com/magento/devdocs/blob/master/src/_includes/reference/cli-template.md

dshevtsov avatar Sep 07 '21 20:09 dshevtsov