Skip to content
This repository has been archived by the owner on Dec 6, 2022. It is now read-only.

Don't show bookmark button by default #9

Merged

Conversation

MichaelDeBoey
Copy link
Contributor

Closes #4
Closes #5

BREAKING CHANGE: Bookmark button isn't enabled by default anymore

Closes #4
Closes #5

BREAKING CHANGE: Bookmark button isn't enabled by default anymore
@robinmetral
Copy link
Contributor

robinmetral commented Feb 28, 2020

Great! Just for the sake of doing things right, let's add a small deprecation notice that is logged if users attempt to pass any of the legacy plugin options 🙂

It's fairly straightforward: we need to create a gatsby-node.js file and add something like this:

const deprecationWarning = `From now on, you can use the gatsby-plugin-pinterest 'saveButton' option to show the Pinterest Save button on images.
See https://github.com/robinmetral/gatsby-plugin-pinterest#usage`;

exports.onPreInit = ({ reporter }, options) => {
  if (options.tall || options.round) {
    reporter.warn(deprecationWarning);
  }
};

Inspired by gatsby-plugin-google-analytics

(edit: I found that the message must be broken into several lines, the console cannot handle line breaks)

@MichaelDeBoey MichaelDeBoey force-pushed the disable-bookmark-button-by-default branch from 2093fbe to 9e1dda1 Compare February 29, 2020 15:01
@robinmetral robinmetral merged commit c932d06 into gatsby-uc:master Mar 1, 2020
@robinmetral
Copy link
Contributor

🎉 This PR is included in version 2.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@MichaelDeBoey MichaelDeBoey deleted the disable-bookmark-button-by-default branch March 1, 2020 12:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't show bookmark button by default
2 participants