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

Replace Polldaddy embed block with Crowdsignal #12854

Merged
merged 5 commits into from
Jan 29, 2019

Conversation

ice9js
Copy link
Contributor

@ice9js ice9js commented Dec 13, 2018

Description

Given the recent rebranding of Polldaddy to Crowdsignal, this change replaces the existing Polldaddy embed type with Crowdsignal and updates the pattern to match Crowdsignal's updated URLs for polls and surveys.

Solves #11517.

How has this been tested?

Before applying my changes, add a post with the current Polldaddy embed block.
After the changes have been applied the block should be automatically upgraded to Crowdsignal.

There should now also be a new Crowdsignal embed block available from the menu.

All current poll and survey links from Crowdsignal should trigger the Crowdsignal embed block when pasted directly into the editor, for example:

I have tested this locally.

Screenshots

screen shot 2018-12-13 at 21 38 58

Types of changes

New feature: Added a Crowdsignal embed block

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.

@gziolo gziolo added the [Block] Embed Affects the Embed Block label Dec 14, 2018
@@ -227,13 +245,14 @@ export const others = [
patterns: [ /^http:\/\/g?i*\.photobucket\.com\/.+/i ],
},
{
// Deprecated in favour of the core-embed/crowdsignal block
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure if we can remove the pattern because of backward compatibility. However we can hide the deprecated version from the inserter. We did that for subheading block and the old version of columns block.

Copy link
Member

Choose a reason for hiding this comment

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

Removing the patterns here is fine, they're only used to resolve URLs into the correct block, so existing blocks are loaded, and converted to the Crowdsignal block without a problem.

I'm not sure we should hide the old block either. It's useful for people who still have the polldaddy name in their minds, and if they use the polldaddy block, it'll convert to a crowdsignal block automatically.

Copy link
Member

Choose a reason for hiding this comment

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

You can resolve it by adding a keyword to the new block.

Copy link
Member

Choose a reason for hiding this comment

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

That doesn't help people scrolling through the list instead of typing to search though.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, true. That’s the broader issue with rebranding 😅 I will leave it up to you. We should have some consistent strategy for depreciations.

Copy link
Member

Choose a reason for hiding this comment

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

I think it's fine to remove it from the inserter, check the deprecation of core-embed/speaker in favour of core-embed/speaker-deck.

For people still looking for "Polldaddy", perhaps add "formerly Polldaddy" to the description of the new Crowdsignal block, and maybe to the name, too.

Copy link
Member

Choose a reason for hiding this comment

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

ac09b7c - removed from the inserter similar to core-embed/speaker as suggested

Copy link
Member

@gziolo gziolo Jan 29, 2019

Choose a reason for hiding this comment

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

b9584b6 - added formerly Polldaddy to the description

Copy link
Member

Choose a reason for hiding this comment

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

d0b2233 - added polldaddy keyword for better discoverability of the new block

Copy link
Member

@notnownikki notnownikki left a comment

Choose a reason for hiding this comment

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

Looks good! I think we should revisit it in a while to remove the polldaddy block from the inserter, once enough time has passed that people are used to the Crowdsignal rebrand.

🚢

@aduth aduth mentioned this pull request Jan 4, 2019
5 tasks
@pento
Copy link
Member

pento commented Jan 8, 2019

Note that the renaming has been done in Core already, so this PR needs to be finished/merged in time for WordPress 5.1.

https://core.trac.wordpress.org/ticket/45036

@ice9js
Copy link
Contributor Author

ice9js commented Jan 9, 2019

I rebased the branch and resolved conflicts.

@gziolo gziolo added this to the 5.0 (Gutenberg) milestone Jan 25, 2019
@gziolo
Copy link
Member

gziolo commented Jan 25, 2019

@youknowriad and @pento - it looks like it wasn’t included in WordPress 5.1 beta, is it something that needs to be fixed?

@pento
Copy link
Member

pento commented Jan 29, 2019

@gziolo: Thanks for finding this one. Yes, it would be best if this were included in WordPress 5.1, so everything matches. I've moved #11517 to the WP 5.1 milestone.

@youknowriad
Copy link
Contributor

Sanity check, is this ready to land? I'm planning to update Core today, so this needs to lands ASAP :)

Copy link
Member

@gziolo gziolo left a comment

Choose a reason for hiding this comment

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

It tests well, I can see how old embed blocks are transformed from Polldaddy to Crowdsignal when the editor is loaded. It is possible to type polldaddy and you will get new Crowdsignal block, the old one no longer appears in search results.

@gziolo
Copy link
Member

gziolo commented Jan 29, 2019

@ice9js congratulations on your first contribution to Gutenberg 🎉 💯

I will merge this PR as soon as Travis CI will turn green.

@gziolo gziolo merged commit b35774d into WordPress:master Jan 29, 2019
youknowriad pushed a commit that referenced this pull request Jan 29, 2019
* Replace Polldaddy embed block with Crowdsignal

* Remove Polldaddy from the inserter

* Update core-embeds.js

* Update core-embeds.js

* Update core-embeds.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Embed Affects the Embed Block
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants