You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Incorrect deprecate warning when MarkerLayer::markRange passed persistent options #154
I'm working on Atom master branch to catch-up display-layer.
cc @as-cii
Then I noticed this warning.
Assigning custom properties to a marker when creating/copying it is
deprecated. Please, consider storing the custom properties you need in
some other object in your package, keyed by the marker's id property.
As far as I check, persistent option is for MarkerLayer but this options is validated by Marker's Marker.extractParams(options).
Should delete options.persitent before passing Marker.extractParams()?
With #149 we have basically moved all the concerns about markers' lifetime and persistence to marker layers and, as a result, passing that option won't actually persist the marker across reloads. This is how the new API looks like (you can also take a look at some of the core packages, like bookmarks, to see how we've switched to marker layers):
You can also optionally pass a maintainHistory parameter to addMarkerLayer which, when true, makes sure to restore your markers when undo or redos are performed.
Activity
as-cii commentedon May 6, 2016
With #149 we have basically moved all the concerns about markers' lifetime and persistence to marker layers and, as a result, passing that option won't actually persist the marker across reloads. This is how the new API looks like (you can also take a look at some of the core packages, like
bookmarks, to see how we've switched to marker layers):You can also optionally pass a
maintainHistoryparameter toaddMarkerLayerwhich, whentrue, makes sure to restore your markers when undo or redos are performed.t9md commentedon May 6, 2016
Thanks, understood.
So this api doc has to be updated, it says accept persistent options, but
@defaultMarkerLayeris created without any options(@defaultMarkerLayer = @displayLayer.addMarkerLayer())https://github.com/atom/atom/blob/master/src/text-editor.coffee#L1691-L1724
Also
TextEditor::markScreenRangehas to be updated.as-cii commentedon May 6, 2016
Thanks for the heads-up, @t9md! 🙇 I'll make sure to update those docs as soon as possible. 📜
as-cii commentedon May 6, 2016
Updated in atom/atom@e3790b8.
t9md commentedon May 6, 2016
Thanks! Not only for this, all your heavy effort to improve Atom at very fundamental layer!!