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

Finish porting rest of Rx-DOM #1223

Closed
9 tasks
trxcllnt opened this issue Jan 20, 2016 · 24 comments
Closed
9 tasks

Finish porting rest of Rx-DOM #1223

trxcllnt opened this issue Jan 20, 2016 · 24 comments
Assignees

Comments

@trxcllnt
Copy link
Member

from Reactive-Extensions/RxJS-DOM#105 (comment)

Here's what we've already ported from Rx-DOM:

Here's what we're missing:

cc: @Blesh @staltz @mattpodwysocki

@paulpdaniels
Copy link
Contributor

@trxcllnt I'd be willing take fromReader.

@benlesh
Copy link
Member

benlesh commented Jan 20, 2016

I'm unsure how much value events adds. We do need a path to allowing useCapture with fromEvent, though.

I think we should do something for requestIdleCallback. A Scheduler would be good, and/or perhaps an Observable creation method. It'll be really hard to polyfill well though. All of the polyfills I see wire events to mouse and keyboard activity and add some debouncing to it. I'm not sure that's really the best way to handle it, but maybe it is.

@mattpodwysocki
Copy link
Collaborator

@Blesh it adds quite a bit in terms of being less terse. It's kind of like you could specify $('#foo').on('click', fn) or better yet $('#foo').click(fn) so discoverability is key here. Not only that, but to, based upon environment, add things like Touch and Pointer events.

@PavelPZ
Copy link

PavelPZ commented Mar 22, 2016

I am very sorry for the following question:
I cannot find any rx-DOM code in bundles. I tried:

What is the future of rx-DOM deployment?

@benlesh
Copy link
Member

benlesh commented Mar 22, 2016

@PavelPZ we're going to break it out into it's own package. The work is underway, but there's a lot to that. For now, you can find everything under Rx.KitchenSink.

@PavelPZ
Copy link

PavelPZ commented Apr 26, 2016

@Blesh, is there any news please? I thing that including all already ported DOM parts (ajax,websocket, animation frame) to your build process will be huge benefit for developers.

@benlesh
Copy link
Member

benlesh commented Apr 28, 2016

@PavelPZ we haven't had the time to get to it. Pulling apart a build process into different parts is a bit time consuming.

@NedalKouissi
Copy link

come on ! even ready isn't there why things are slow ?

@benlesh
Copy link
Member

benlesh commented May 21, 2016

@IDSFN come on ! requests pull welcome are.

<3 <3 <3

@NedalKouissi
Copy link

@Blesh we don't need to make a request because everyone need rxjs DOM to be fully compatible with rxjs5 :D

@NedalKouissi
Copy link

NedalKouissi commented May 22, 2016

is this function enough to accomplish what ready do, or there is some bad behaviour that I may see ?
thanks.

function ready(fn) {
  if (document.readyState === 'complete')
    setTimeout(fn, 0);
  else
    Rx.Observable
      .fromEvent(document, 'DOMContentLoaded')
      .subscribe(fn);
}

ready(view.init);

@subhaze
Copy link

subhaze commented Jun 16, 2016

I've just ran into the issue of fromEvent not allowing the option/useCapture param. Is this still being looked into?

I can try and help get this in if I know the current direction (going into fromEvent direction, staying in Rx.DOM), though, not too familiar with the codebase, but willing to dig :)

@MrLoh
Copy link

MrLoh commented Nov 6, 2016

I'm new to RxJS and would like to call an external API, if I understand correctly, I would use RxJS DOM JSONP for that. But it seems that is not available in RxJS 5 yet? Having a very hard time to find examples and tutorials or even the right community to ask questions in. Could any one give me soe directions?

@jayphelps
Copy link
Member

@MrLoh there's a simple starting point for a JSONP observable here #2095 (comment)

@jayphelps
Copy link
Member

jayphelps commented Nov 15, 2016

Someone asked how to do geolocation.currentPosition() in v5 on gitter, so I whipped this up quick...might help others who stumble upon this:

class CurrentPositionObservable extends Observable {
  constructor(options) {
    super();

    this.options = options;
  }

  _subscribe(observer) {
    window.navigator.geolocation.getCurrentPosition(
      data => {
        observer.next(data);
        observer.complete();
      },
      e => observer.error(e),
      this.options
    );
  }
}

const geolocation = {
  currentPosition: options => new CurrentPositionObservable(options)
};

// use it how you would in v4 rx-dom
geolocation.currentPosition()
  .subscribe(value => console.log(value);

Hopefully this also sheds some light on how easy it is to make custom Observables 😄

@martinjirku
Copy link

@trxcllnt I'd like to work on jsonp, if possible and nobody already started.

@trxcllnt
Copy link
Member Author

trxcllnt commented Feb 6, 2017

@martinjirku it's all yours 👍

@kwonoj
Copy link
Member

kwonoj commented Apr 16, 2017

I remember last discussion on core meeting about fate of Rx DOM implementation, so assigning @benlesh here to track further updates on those.

@kwonoj
Copy link
Member

kwonoj commented Apr 16, 2017

@AlokBansal8
Copy link

@trxcllnt Is there a timeline to this thing? I am starting a project and I have to decide whether I can use RxJS 5 or not because I am going to use RxJS-DOM.

@trxcllnt
Copy link
Member Author

@AlokBansal8 which parts do you need?

@meticoeus
Copy link

I just came across a need for geolocation.watchPosition. In writing a first attempt at converting the RxJS 4 version I noticed that it does not seem to adhere to the spec. If I'm reading this correctly, watchPosition continues to emit values even if they are errors, but WatchPositionObservable unsubscribes on the first error. This seems like unexpected behavior per the spec.

For my use case, I do want to remain subscribed so I'm transforming the output and sending everything to next. Am I misinterpreting the spec here?

@benlesh
Copy link
Member

benlesh commented Mar 16, 2018

Closing as stale

@benlesh benlesh closed this as completed Mar 16, 2018
@lock
Copy link

lock bot commented Jun 5, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests