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

feat: add ixlib url parameter to help Imgix support and analytics #145

Merged
merged 5 commits into from Jun 27, 2018

Conversation

frederickfogerty
Copy link
Contributor

Description

This PR adds an ixlib parameter to urls generated by this component. The url parameter is in the form ixlib=react-7.1.1. There are two reasons to add this parameter: a) it helps Imgix support see what versions of libraries that customers are using, and b) it help Imgix to see how many people overall are using the react library, and the specific versions.

This functionality is enabled by default but can be turned off by passing the prop disableLibraryParam.

This closes #142.

New Feature

  • If this is a big feature with breaking changes, consider [opening an issue][issues] to discuss first. This is completely up to you, but please keep in mind that your PR might not be accepted.
  • Run unit tests to ensure all existing tests are still passing
  • Add new passing unit tests to cover the code introduced by your PR
  • Update the readme
  • Add some steps so we can test your cool new feature!
  • The PR title is in the conventional commit format: e.g. feat(<area>): added new way to do this cool thing #issue-number
  • Add your info to the contributors array in package.json!

Steps to Test

Either review the unit tests in test/unit/react-imgix.test.js or set-up a new app and inspect the generated URLs.

Copy link

@jayeb jayeb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Branding nit in the documentation, but otherwise looks great 👍.

README.md Outdated
@@ -108,6 +108,10 @@ Fallback width for images, useful for SSR or static site generation

Generate `2x` and `3x` src sets when using an `<img>` tag. Defaults to `true`

#### disableLibraryParam :: bool

By default this component adds a parameter to the generated url to help Imgix with analytics and support for this library. This can be disabled by setting this prop to `true`.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/Imgix/imgix

@@ -6,6 +6,8 @@ import PropTypes from "prop-types";

import processImage from "./support.js";

const PACKAGE_VERSION = require("../package.json").version;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noice 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 😄

@frederickfogerty frederickfogerty merged commit 44f3d32 into master Jun 27, 2018
@frederickfogerty frederickfogerty deleted the fred/ixlib-param branch June 27, 2018 03:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ixlib parameter to URLs to support debugging from Imgix team
2 participants