symfony/symfony-docs

Add an 'after' tab to diffs

Opened this issue · 0 comments

The problem

The documentation shows a diff on some pages, to indicate what changes need to be made to (generated) code. While this is nice to have, it doesn't allow the user to just copy paste the new code. This means users need to go line by line copy pasting the results, type it over manually, or copy paste the whole thing, and remove the + , and remove lines with a -.

For example in the json login there is a diff of the changes users should make from the template.

Image

The solution

I can see 2 ways of solving this. The first way would be to make tabs like we use for showing configs in PHP/Yaml/XML etc, and write both the diff and the output.

A better solution would be to generate the output diff based on the diff. This would introduce more complexity in the docs builder, but would make it easier for users writing documentation.