-
Notifications
You must be signed in to change notification settings - Fork 56
Add Selection API #81
base: master
Are you sure you want to change the base?
Add Selection API #81
Conversation
I think this looks great. Re: |
I fixed the conflicts with [1/1 ScopeConflict] bower_components/purescript-eff/src/Control/Monad/Eff.purs:36:1
36 foreign import data Eff :: # Effect -> Type -> Type
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Conflicting definitions are in scope for kind Effect from the following modules:
Control.Monad.Eff
Prim |
Travis is OK with this so not sure what's happening locally. |
That's the error you get if you try and compile 0.11 libraries with 0.10 - maybe old compiler in |
@garyb I just fixed the latest conflicts. Please let me know if you think anything else needs to change here. |
@garyb would you mind taking another look at this please? |
-> Node | ||
-> Int | ||
-> Selection | ||
-> Eff (selection :: SELECTION | eff) Unit |
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.
I think all of these latter functions should perhaps have the Selection
argument first for "normal" PS argument ordering?
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.
Wait, disregard that, I think it probably is the right way around now.
I'll let you comment on that either way and then will merge :)
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.
Now you've got me wondering!
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.
I think it's tricky with this one, as it's usually "the thing that is being operated on goes last" - but due to the nature of this API, the selection is acting on a thing - that's what tripped me up.
I'm fine with it either way, just let me know what you want to do, now I've sown the seeds of doubt 😆
I was a little apprehensive about adding this, since it is still experimental and the spec is just a working draft... but at least there is a spec! And it's decently supported as you point out. Sorry I ignored it for ages! |
This adds the
Selection
API as documented on MDN. Non-standard features such asmodify
are not included.Support for this API seems very good according to Can I use.
I would appreciate as much feedback as possible on this, particularly on the introduction of the
SELECTION
effect, and around the effects used in general.Some feedback on the approach used for
type
would also be great.I think it also makes sense to add more on the
Range
data type. I'd like to do this in accordance with the documentation on MDN but I'm not sure what the appropriate effect should be.Thanks in advance.