-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
feature: Detect parent resize #1365
Conversation
It appears that TravisCI doesn't install dependencies before running tests? |
Yeah, we don't want any external dependencies for the project. So please put a copy of what you need in the |
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.
This is nice, thank you for this PR.
A few comments on the code, and two general points:
- Could you run 'npm run lint' and fix the whitespace issues?
- Remove the 'yarn.lock' please
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.
There are loads of unrelated whitespace changes to core/rfb.js, please remove these from the PR.
Also, could you update LICENSE.txt?
After that I think we'll be getting close to merging this, I'll try to find time for some testing soon as well.
c92ff46
to
d0065fd
Compare
032c73e
to
12cbfb1
Compare
This looks like it is pretty much ready to be merged. What browsers have been tested? |
I've tested in Chrome, Firefox, and Safari. I haven't looked at IE or Edge, but according to the polyfill docs, IE 11 is supported, along with all versions of Edge. |
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.
Looks good! Thanks
I'll help out with some testing on IE and Edge tomorrow. |
Hi @samhed, did you get a chance to test on IE? |
Shit.. sorry @baleeds, I totally forgot about this. When I checkout your branch I can't even get things going however. First I get:
If I add ".js" to the filename in the import I get the following error:
|
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.
We need ES6 modules, but it looks like you copied the folder from node_modules?
Ping @baleeds |
Hi sorry! I don't know how to do it differently. Is there a process that I should be taking for importing the library as an ES6 module? |
Your import right now seems to be geared towards NodeJS. Are you testing this code directly in a browser without any modifiction? I.e. no browserify, babel or anything like it. First you need to have an ES6 version of the code, which seems to already exist in the form of |
Do you think you will get a chance to fix this @baleeds? |
Hi Samhed, sorry I've been non-responsive. Our project went in a different direction in terms of technology. I do think this change is worthwhile, but I don't have time to look at it now. It was only a few lines of code, and then adding in the library, if you wanted to make it happen. |
We've dropped support for Internet Explorer so this should be possible to merge without the polyfill now. |
12cbfb1
to
a5bc327
Compare
I have removed the polyfill, removed unrelated changes and rebased on master. I have manually tested on: Windows 10
macOS 11
iOS 14.4
Android 11
What remains is to modify the unit tests, they rely on the |
Fixes an issue where if the screen div resizes for a reason other than window resize, the canvas wouldn't redraw.
Now that we use ResizeObserver we know that we require more modern browsers. The most notable ones here are Firefox and Safari. With regards to Firefox, while the desktop version has had support since 69, the Android app requires 79. At the time of writing the current ESR of Firefox is 78, but the concept of ESR doesn't seem to exist for Android. The Safari 13 requirement means we no longer support for example iPhone 5S or the 4th generation of the iPad. These are devices from 2013~2014.
a5bc327
to
1afa18f
Compare
Unit tests have now been added and the change is merged. |
Fixes an issue where if the screen div resizes for a reason other than window resize, the canvas wouldn't redraw.
#1364