7904082: The UI for API Diff could be improved#32
7904082: The UI for API Diff could be improved#32lahodaj wants to merge 12 commits intoopenjdk:masterfrom
Conversation
|
👋 Welcome back jlahoda! A progress list of the required criteria for merging this PR into |
|
@lahodaj This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been no new commits pushed to the ➡️ To integrate this PR with the above commit message to the |
Webrevs
|
|
Thanks for working on apidiff! Can you also provide a an example of the "after" for the case when unchanged elements are included? (That's what I'd need to use for the Platform JSR Annex 2 (e.g. https://cr.openjdk.org/~iris/se/25/latestSpec/apidiffs/index.html).). I think if you're changing the default, there's probably a corresponding change you'll need to make in src/share/doc/apidiff.md, which is also published here: https://openjdk.org/projects/code-tools/apidiff/apidiff.html. In the list of updated elements, the background for the "!=" is now appears purple-y grey (formerly pinkish) and the "!=" character itself is red (unchanged, I think). I think this combination isn't as easy to parse as the former, Perhaps it needs more context to appreciate? The change in SourceCodeAnalysis.SnippetWrapper which adds the background color for the notes "Only in baseline; not in: demo" and "Only in: demo; not in: demo" looks good. (I noticed that there's a typo in report/html/resources/report.properties, line 126 "not i" should be "not in".) I'm not sure I'm finding an example of coloring of the signature lines. Let me know which elements I should be looking at for the comparison. Thanks again for all of your work to improve apidiff! |
Thanks for looking at the PR!
The diffs produced after this PR hide the unchanged elements using JavaScript - i.e. the unchanged elements are still in the page, just hidden. And there's a checkbox in the upper right corner to show them "Show unchanged". The state of the checkbox is not persisted when one clicks on links, which is not very nice, but my inclination was that it would be rare for people to look at stuff that didn't change. Not sure if that's acceptable for the platform annex, if not I can add a command line option to either always show the unchanged elements, or to show them by default. (The current value of the "Show unchanged" checkbox is unchecked, so JavaScript will by default hide the unchanged elements. But, as the hiding is done by JavaScript, if JavaScript is disabled, the unchanged elements are shown, which I think might be helpful, as without JavaScript, we can't control the state.)
I tried this:
(And I made the green and red slightly darker.) Not sure if that looks good, I've changed the original diff with these colors: Does this look better?
(I've fixed the typo, but the examples above were generated before fixing that, sorry. Thanks for finding that!)
What I meant was the colors in the "Only in ..." lines, sorry for being imprecise. I can try to extend the color to other lines as well in desired.
|
|
I've:
|
|
/integrate |
|
Going to push as commit cb6c45e. |
This PR intends to improve the result of API diff in a few ways:
An example diff that is produced before this patch:
https://cr.openjdk.org/~jlahoda/CODETOOLS-7904082/before/
after this patch:
https://cr.openjdk.org/~jlahoda/CODETOOLS-7904082/after/
Please let me know what you think. I'll see if I can reasonably add some tests for this functionality.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/apidiff.git pull/32/head:pull/32$ git checkout pull/32Update a local copy of the PR:
$ git checkout pull/32$ git pull https://git.openjdk.org/apidiff.git pull/32/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 32View PR using the GUI difftool:
$ git pr show -t 32Using diff file
Download this PR as a diff file:
https://git.openjdk.org/apidiff/pull/32.diff
Using Webrev
Link to Webrev Comment