-
Notifications
You must be signed in to change notification settings - Fork 17.4k
Use logical coordinates in DisplayBuffer #8905
Conversation
...as we are already testing a similar behavior in the presenter
Okay, the build is 💚 now and I think I have addressed all the concerns we had during our call. 🎉 I have found, however, a method on We cannot shim it to a corresponding method on the view, though, as we don't have any reference to If we want to keep it, I think the only option would be to deprecate it for a few versions and then delete it afterwards (so that package developers have some time to upgrade). On the other hand I'd ❤️ to clean the Other than that, I think this is ready to 🚢! @nathansobo: please, have one last 👀. Thanks everyone for the feedback! 🙏 |
It wasn't in the public API right? How popular is the package in question? Maybe we should open an issue or even open a PR if it's a simple fix. |
|
||
iterator = @model.tokenizedLineForScreenRow(row).getTokenIterator() | ||
while iterator.next() | ||
charWidths = @getScopedCharacterWidths(iterator.getScopes()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's going to be so great to drop this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed! 🎆
Gave this a quick scan. Ultimately if tests are green and the structure hasn't changed beyond our discussion, I'm good to merge once we drop deprecated methods from the docs. |
Nope, the method wasn't in the public API. The package in question is Thanks, @nathansobo! |
Use logical coordinates in DisplayBuffer
💥🎉🇮🇹 |
Awesome! |
@as-cii, apparently our internal CI goes red when deprecated methods are called by core or bundled packages. I actually didn't know this either, until now, but I guess it makes sense, because we don't want the somewhat-expensive When you get a chance, could you update core and bundled packages to use the new APIs? The deprecations occurred in these tests:
|
This PR moves all the code that handles pixel positions into
TextEditorPresenter
, where it belongs. This is part of the effort to merge #8811, as we realized we needed theDisplayBuffer
to be clean before proceeding with measurements.This refactoring was quite big, so I'd ❤️ to gather some feedback on the changes I have made (both on code quality and regressions).
What's missing:
TextEditor
APIs to use theirTextEditorElement
counterpart.Thanks! 🙇
/cc: @nathansobo @atom/feedback