Coder Social home page Coder Social logo

belter's People

Contributors

amyegan avatar anthonykhoa avatar bluepnume avatar briceshatzer avatar daniel-shuy avatar doublemarked avatar dtjones404 avatar ebenpack-cs avatar elizabethmv avatar gabrielo91 avatar gregjopa avatar jiwoo22 avatar jshawl avatar leogedler avatar mnicpt avatar mstuart avatar prashantjagasia avatar pushpinder107 avatar ravishekhar avatar remotevision avatar slybouhafs avatar spencersablan avatar tnuzzi avatar vishakha94 avatar westeezy avatar wildlingjill avatar wsbrunson avatar xuanwan05 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

belter's Issues

isSafari allows Chromium browser Yandex through

User agent for Yandex Chromium Browser is being recognized as a Safari browser.

Mozilla/5.0 (iPad; CPU OS 14_8 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 YaBrowser/21.11.1.882.11 Mobile/15E148 Safari/604.1

Need to add an isYandex and check that it doesn't exist in isSafari check.

Create TypeScript typings

This project isn't written in TypeScript, but many TypeScript users would like to use published typings. For this issue, create TypeScript typings that cover the exported functions, and contribute it back to DefinitelyTyped!

This issue is great for someone who wants to learn more about TypeScript!

chai, sinon, and sinon-chai should be included in dependencies

Screen Shot 2020-10-16 at 12 15 55 AM

Does any line of code require mocking in order to be tested? If so, then Chai, Sinon, and Sinon-chai should be installed as dependencies, or else karma-sinon-chai won't be providing any use.

I see here that this is the commit in which chai, sinon, and sinon-chai were replaced with grumbler-scripts.

You can see here that grumbler-scripts does not have chai, sinon, nor sinon-chai as dependencies. Instead, it has karma-sinon-chai

It seems to me that this repo is being functionally tested rather than unit tested, so I'm not sure sinon and chai are needed at all. Is that why they were removed in the first place? Some one please confirm!

Create a CHANGELOG.md file

  • Create a Changelog based on the keep a Changelog format
  • Update the Changelog with at least the last five commits.
  • Keep the Changelog updated when a new version gets released.
  • Use the Unreleased section to track unreleased changes.

consider not rounding dimensions in onResize method

The onResize method in dom.js currently uses offsetWidth and offsetHeight to get the elements dimensions.

These two attributes always return integer values--disregarding the fractional part

As some elements can have subpixel values, perhaps its worth it considering not to round the width and height to achieve a better precision.

I believe this is also causing the zoid library to sometimes generate slightly wrong iframe sizes, since the method seems to be used here

  • this can cause scrollbars to appear in the iframes if the dimensions generated are smaller than the element dimensions

In case you are interested, I opened a draft PR with a suggested approach:

[Bug] Conflicting line of code in src/dom.js causing infinte loop. (waitForDocumentBody)

The function checks if the document body is present. If the document is not ready, it waits for the window to be ready and checks again if the document body is present. If the body is present, it returns the body. If not throws an error. This is the code:

 return waitForDocumentReady().then(() => {
            if (document.body) {
                return document.body;
            }

            throw new Error('Document ready but document.body not present');
        });

But, waitForDocumentReady calls isDocumentReady which in turn checks:

if (document.body && document.readyState === 'complete) return true`

That means the document cannot be ready without the body being ready. This causes an error while testing, when I mocked document.body = null. Also leads to throw being unreachable.

Structure of tests are confusing

Are there any other ways the testing structure could improve?

I notice that each folder in the tests folder has an index.js file in it. Is there a clean way to make it such that we do not have to use an index.js file inside every folder of the tests folder?

Every single time a person adds a new folder inside tests, there are two index.js file that has to be updated, and then another to be created. The created index.js would then have to be updated every time someone makes a new testing file, and also must be created in the new folder that the person added to tests.

It would be less confusing if we did not have to use so many index.js, while still maintaining an organized structure. My preliminary thoughts are to make a single script that replaces the need to make a lot of index.js files.

Add unit tests that test exported functions in src/

There are a LOT of useful utilities in belter, however there aren't any unit tests in this repo! ๐Ÿ˜ฌ If anyone's interested in picking this up, can you write unit tests for at least two files in src/? ๐Ÿ˜„

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.