-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
Remove unused annotation highlight div #5569
Remove unused annotation highlight div #5569
Conversation
This is now done using CSS. For annotation-heavy documents this change makes the DOM much lighter.
@CodingFabian Could you review this as you came up with the initial idea for this PR? I would say this fixes #5207. It is already quite fast for me right now (most likely due to recent optimizations), but this PR helps even more by avoiding a lot of DOM elements. Would you agree? |
/botio-linux preview |
From: Bot.io (Linux)ReceivedCommand cmd_preview from @timvandermeij received. Current queue size: 0 Live output at: http://107.21.233.14:8877/cdca7760af2ac61/output.txt |
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/cdca7760af2ac61/output.txt Total script time: 0.78 mins Published
|
/botio test |
From: Bot.io (Linux)ReceivedCommand cmd_test from @timvandermeij received. Current queue size: 0 Live output at: http://107.21.233.14:8877/dca00f8c0646feb/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_test from @timvandermeij received. Current queue size: 0 Live output at: http://107.22.172.223:8877/a0cbb62dc86bdee/output.txt |
From: Bot.io (Windows)SuccessFull output at http://107.22.172.223:8877/a0cbb62dc86bdee/output.txt Total script time: 17.20 mins
|
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/dca00f8c0646feb/output.txt Total script time: 22.98 mins
|
This was added as part of PR #4318, where #4318 (comment) should explain the reason for adding the code that this PR aims to remove. While I completely agree that we should do as much as possible to reduce the number of DOM elements, we might want to make sure that we're not just removing code that someone might rely on. We should probably involve @dferer in this discussion to see if he still needs this code, and if so see if there is a way that we could at least disable it by default. |
i suggested to remove it because I could not find where it is used. So I fully support the removal. If this is needed code then it is at least a smell, and we should figure out how to make it more obvious why the code is needed. |
As I see it now, it is not used at all; it's just a hidden div.
That can also be achieved in other ways than by adding a new div, for example by changing the appearance of the annotation divs themselves. There is no such feature now, so right now the divs are just taking up unnecessary DOM space. If there were such a feature, it would be a slightly different story, but even then it should be implemented differently in my opinion. @dferer Could you elaborate on how you think about this? |
I have no objection to their removal. They were useful to me at one point, but not anymore. |
Remove unused annotation highlight div
Thank you! |
Remove unused annotation highlight div
This is now done using CSS. For annotation-heavy documents this change makes the DOM much lighter.