-
Notifications
You must be signed in to change notification settings - Fork 34
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 usages of jQuery #98
Remove usages of jQuery #98
Conversation
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.
When you do the change if you could verify locally that would be great.
Apparently we don't have a test that verifies that the scrollbar actually renders 😢
@alexander-alvarez So I went through and tried best I could to compare a lot of the measurements between the jquery/non-jqery version. This appears to work for me locally, although I'm really not sure why the tests were passing, because it seems like they shouldn't. |
addon/components/ember-scrollable.js
Outdated
@@ -228,8 +227,8 @@ export default Component.extend(InboundActionsMixin, DomMixin, { | |||
}, | |||
|
|||
resizeScrollContent() { | |||
const width = this.$().width(); | |||
const height = this.$().height(); | |||
const width = this.element.offsetWidth; |
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'm a little confused now, why did this one switch to offset
and why did https://github.com/alphasights/ember-scrollable/pull/98/files#diff-3fa203c13b3ee2249dcb66b55d4c297fR22 switch to getHeight
?
Is that simply what you needed to do to get it working?
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 wish I could say I sat down and did the math to figure out all the details of why and how each piece interacted, but I basically just put a few console logs across the critical paths and both this branch and master, and this is the measurement that worked.
If you could try it out too, that would be great, but it does seem like it's working.
I'd like to add another test to make sure the onScrolledToBottom
action gets called, because that should have been failing, but wasn't. However, I'm not 100% sure how to get the elements to scroll.
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 haven't forgotten about this, just haven't gotten around to it. Hopefully before or during this coming Thanksgiving holiday.
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.
so yeah... I forgot ....
Hey @alexander-alvarez I sort of lost track of this over the holidays and am now resuming my quest to remove jquery from Ember-light-table. What do you think we need to check to get those over the finish line? |
I think I'd want some reasoning or extensive testing on many browsers to make sure this is a.o.k given the discrepancy mentioned above. This space is filled with subtitles that I am pretty unfamiliar with that I'm hesitant to make changes to it without knowing it will be g2g for our downstream consumers |
You know, I don’t remember a single thing about this PR. Looking back through it, I’ll just redo everything with the getHeight replacement. I have an app that depends pretty heavily on ELT, so getting this done correctly is a high priority. |
Apologies for delaying you @donaldwasserman |
@alexander-alvarez no prob! I was really motivated to get rid of jQuery from my app in december, but then lost interest when i realized how much i depended on liquid fire, lol. I'll hopefully have some time this week to get this wrapped up. |
@donaldwasserman Is the only thing remaining here the more consistent use of the |
Hey @richard-viney - Thanks for the bump on this. I actually have this somewhat working locally. But the issue I'm having some outdated test dependencies. So I'm just trying to get that fixed up this morning and pushed up. |
a0f0416
to
81b97d7
Compare
@richard-viney, @alexander-alvarez another quick update, I switched up some various things:
If anyone has any suggestions or notices a quick fix, let me know. |
@donaldwasserman you accidentally changed All the ember tests succeed locally but somehow the tests in Travis are failing but I'm not sure what to do about that. |
@alexander-alvarez - Looks like this should be good to go now, but i don't see travis reporting anything on here anymore. I know this is sort of off the radar for you, but any ideas? It would be nice to get this wrapped up, and desipite it taking me a year plus on this project, i'd be happy to take this over for you and get the outstanding PR's fixed up. Or @alexander-alvarez, we could move this whole repo over to the adopted-ember-addons thing. |
@donaldwasserman not sure what is going on with travis will have to take a closer look. I agree it would be nice to get this wrapped up & thank you for your continued contributions. Also I'm in favor of moving this to an area where it gets more love. Unfortunately I'm not the project maintainer, and I don't know who is. It seems the listed maintainer left Alphasights a while ago @eugeniodepalo any ideas as to who succeeded you? |
7324124
to
83d04c2
Compare
@alexander-alvarez Not sure what the deal with Jenkins either, but it looks like there may be some random errors left: https://travis-ci.com/donaldwasserman/ember-scrollable |
@donaldwasserman @alexander-alvarez anything I can do to help with these efforts? Ember-light-table, which uses ember-scrollable, is pretty much the only thing left in our app using jQuery. |
So the only error left is on the latest ember versions, and I think it’s an issue in the dummy app itself, but that’s just a wild guess. I’ll set aside some time on Monday to investigate |
@donaldwasserman where can I see the errors? Happy to take a look. |
If you want to check it out it’s right here: https://travis-ci.com/donaldwasserman/ember-scrollable I don’t have access to this repo, so I don’t know why Travis has disappeared here I don’t have my computer in front of me, but basically the error is something like “cannot getOwner of undefined” |
@donaldwasserman ah, looks like it is saying the owner is undefined when it tries to use |
Thanks @rwwagner90. I was trying to not touch any of the test code (since i'm just dropping in on this...uh...2 years ago) I'll run the codemod on that see what happens |
b3962bc
to
9192acf
Compare
Thanks for the pointer @rwwagner90 - things are working on my machine ™️ . Here's travis: https://travis-ci.com/donaldwasserman/ember-scrollable/builds/144037283 (Note, I didn't actually wait around for this to build, but am going to bed. So it may or may not actually be passing by the time anyone looks at this) Narrator: It Didn't Work But this one may: https://travis-ci.com/donaldwasserman/ember-scrollable/builds/144037363 |
@donaldwasserman looks like everything is green! 🎉 |
Thanks for the bump @rwwagner90. @alexander-alvarez See #121 where i added github actions for tests I'll squash all the commits in here after that gets merged so we get a clean test run, then I think we can talk about pushing this out & cutting a release for downstream |
Thanks for all your work on this @donaldwasserman! |
fff38fe
to
5972cb2
Compare
Hey @alexander-alvarez can you take a second to review + merge + maybe cut a new release? |
@donaldwasserman I tried out the latest commit from your feature branch in a project that I'm working on, but it doesn't work correctly: the drag handle cannot be dragged, and clicking on the scrollbar works neither. I just ran the dummy app from that same commit and confirmed that this problem exists there as well. |
thanks @eelke - thanks for pointing it out should be fixed now. Must have missed it some of the rebasing i did. |
@donaldwasserman thanks for all the work on this, once the typo update is in and side scrolling should work, hence this PR should finally be G2G |
396d4fa
to
54a4f95
Compare
@alexander-alvarez sorry about that. TV + bug fixing don't mix. We shoudl figure out a way to add a test for that whole flow anyway... |
Now that this is merged, can we release a new version and update ember-light-table? |
We've released https://github.com/alphasights/ember-scrollable/releases/tag/v1.0.0 |
@alexander-alvarez Thanks a bunch! Glad we've finally got this across the finish line. |
note: I am waiting to update the tests because of