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

Make list of skipped suggestions an expandable detail #486

Open
timo-a opened this issue Apr 11, 2024 · 0 comments · May be fixed by timo-a/code-suggester#1 or #487
Open

Make list of skipped suggestions an expandable detail #486

timo-a opened this issue Apr 11, 2024 · 0 comments · May be fixed by timo-a/code-suggester#1 or #487
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@timo-a
Copy link

timo-a commented Apr 11, 2024

Thanks for stopping by to let us know something could be better!

Is your feature request related to a problem? Please describe.
In the case of a review such as here a long list of line numbers is added in a comment.
image

This list is nice information but hard to browse past when I don't care about the information, which is most of the time.
I just want to review, I'm not going to manually navigate to any of those lines.

Describe the solution you'd like

The html tags <summary> and <detail> should be used to allow users to expand the list on demand but not make the info take up space until then. Examples can be found here:
https://gist.github.com/scmx/eca72d44afee0113ceb0349dd54a84a2

=> something like this:
'<details><summary>Some suggestions could not be made:</summary>\n\n' + {all the file and line info} + '\n\n</details>'

would look something like this:

Start of example

Some suggestions could not be made:
  • src/main/java/tools/jackson/core/Base64Variant.java

    • lines 47-48
    • lines 59-61
    • lines 273-273
    • lines 285-285
    • lines 376-377
    • lines 454-454
    • lines 470-470
    • lines 524-524
    • lines 800-801
  • src/main/java/tools/jackson/core/Base64Variants.java

    • lines 35-35
    • lines 49-49
    • lines 59-59
    • lines 67-67
    • lines 82-82
  • src/main/java/tools/jackson/core/JacksonException.java

    • lines 12-12
    • lines 36-36
  • src/main/java/tools/jackson/core/JsonGenerator.java

    • lines 1297-1297
    • lines 1363-1363
    • lines 1749-1749
    • lines 1812-1812
    • lines 1899-1900
End of example

Describe alternatives you've considered
Users memorize the key combination to scroll past an entire comment.

Additional context
Example of such a way too long comment(same link as the first one, above): timo-a/jackson-core#2 (review)
Relevant section of code in this repo:

return (
'Some suggestions could not be made:\n' +
Array.from(invalidHunks, ([filename, hunks]) =>
fileErrorMessage(filename, hunks)
).join('\n')
);
}

@timo-a timo-a added priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. labels Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
1 participant