Code Monkey home page Code Monkey logo

vip-jetpack's People

Contributors

ethitter avatar joshbetz avatar kovshenin avatar mjangda avatar nickdaugherty avatar pmaiorana avatar scottsweb avatar simonwheatley avatar

Stargazers

 avatar  avatar

Watchers

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

Forkers

isabella232

vip-jetpack's Issues

VIP Go file service and Photon JS

Right now we are using Photon hooks to re-write images to use the VIP Go file service (https://github.com/Automattic/vip-jetpack/blob/master/jetpack-misc.php#L22). The hope was the Photon JavaScript for detecting device resolution and scale would continue to work and provide the correct image query parameters. Unfortunately the JS has a number of checks that fail.

The two Photon JS files used for modifying images are:

https://s0.wp.com/wp-content/js/devicepx-jetpack.js?ver=201607 (which contains a number of URL checks e.g. img.src.match(/^https?:\/\/([^\/]+)\.files\.wordpress\.com\/.+[?&][wh]=/)).

and

https://tumbleweed.simonwheatley.co.uk/wp-content/mu-plugins/jetpack/modules/photon/photon.js?m=1432675342g (which may be completely unnecessary).

Our solution to this should be to completely disable Photon and to re-write devicepx-jetpack.js to correctly support the VIP Go file service. This may require us to pass in the current URL into the JavaScript (via variable in the head or a data-attribute) to ensure we are only modifying images served from the current site domain.

Whilst the VIP Go file service only supports one single query parameter we may also be able to prioritise the order in which the query parameters are added to ensure we are giving the best image we can. In future we will be able support multiple query parameters.

Update UI to match new Jetpack UI

We need to update the UI around forced modules to match the new Jetpack UI. After the redesign, the logic to disable checkboxes for forced or unavailable modules doesn't work. If you try to disable a forced module, you even see a message that says it was successfully disabled even though that's not true.

Unable to "Activate recommended features" during Jetpack setup

When activating the default set of recommended features in Jetpack a console error is thrown:

Fetch API cannot load https://site.go-vip.co/wp-json/jetpack/v4/site. Request header field x-wp-nonce is not allowed by Access-Control-Allow-Headers in preflight response.

It would seem that the x-wp-nonce header is being blocked. I am hoping we can fix it here, or perhaps we need to go make some changes to our nginx configs?

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.