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

Some code line inequalities when it comes to the screen and the codeoverview #1637

Closed
ioanarusiczki opened this issue Jun 26, 2020 · 2 comments

Comments

@ioanarusiczki
Copy link

Similar with #1632 I've noticed some code line inequalities when it comes to the screen and the codeoverview. These are reproducible for both browse and compare pages. The files did not have changes (same number of lines for both versions, no modified or deleted lines).

  1. Go to any of these files and observe the number of lines then hover over the last line above the code overview.
    https://code.addons-dev.allizom.org/en-US/compare/619668/versions/1691057...1691242/?path=_locales%2Far%2Fmessages.json#N973
    https://code.addons-dev.allizom.org/en-US/compare/619715/versions/1691176...1691284/?allowSlowPages=true&path=popup-sa.css#N5104
    https://code.addons-dev.allizom.org/en-US/compare/619715/versions/1691176...1691284/?path=jsbn2.js#N649
    https://code.addons-dev.allizom.org/en-US/compare/619715/versions/1691176...1691284/?path=jsbn.js#N554
    https://code.addons-dev.allizom.org/en-US/compare/619715/versions/1691176...1691284/?path=aes.js#N211

Expected result:
The number of lines should be the same in both places.

Actual result:
The overview show less lines than the middle section of the screen.

Notes:
The browse pages for the examples above are in the same situation.
Reproducible on AMO dev - FF77(win10).

@bobsilverberg
Copy link
Contributor

The Code Overview takes the lines from the file, and then attempts to create shapes that will allow it to illustrate the overall shape of the file inside the Code Overview panel. This means that, unless every single line can fit it the Code Overview, some lines will be missing. I looked at a couple of the examples above, and the files do have many more lines than could possibly fit into the Code Overview, so it's "squishing" the lines down to a bunch of shapes. Therefore, I believe what you are seeing is the expected behaviour (and nothing about this behaviour has changed with any recent patches).

Am I misunderstanding, or am I correct that this is not in fact a bug?

@ioanarusiczki
Copy link
Author

@bobsilverberg Then feel free to close the issue. I thought it's similar to #1632 except that here the overview shows less lines than the diff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants