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

Signup: Replace usage of ThemeThumbnail for ThemesList component on Theme Selection Signup Step #1079

Merged
merged 3 commits into from
Dec 2, 2015

Conversation

oskosk
Copy link
Contributor

@oskosk oskosk commented Dec 1, 2015

ThemesList is a reusable component appropriate for the function that ThemeSelection Step is providing.

ThemeThumbnail will no longer be necessary. The theme selection step still handles a headStart flow providing {theme: 'pub/twentyfifteen'} as a default dependency.

See #256 and #674 .

cc @scruffian

Testing instructions

Regular theme selection

  • Load http://calypso.localhost:3000/start (you'll be redirected to /start/themes)
  • Select a theme.
  • Follow domain registration (and user signup if testing anonymously).
  • After completing registration, go to switch sites, find your new site.
  • Go to themes and check the theme you selected is the one active for your new site.

Headstart flow

  • Load http://calypso.localhost:3000/start/headstart (you'll be redirected to /start/themes)
  • Don't select any theme and click the Skip button. (This way, theme twentyfifteen will be selected by default.
  • Follow domain registration (and user signup if testing anonymously).
  • After completing registration, go to switch sites, find your new site.
  • Go to themes and check the active theme for your new site is Twenty Fifteen.

/design theme selection for existing sites

  • Once logged in, go to switch sites, find one of your sites.
  • On sidebar, click Themes under Personalize.
  • The new theme gallery is using ThemesList and thus, the updated Theme component. There shouldn't be any differences with its current behaviour and appearance as the default Theme behaviour is used here.

@oskosk oskosk added [Status] In Progress [Feature] Signup & Account Creation All screens and flows for making a new WordPress.com account. labels Dec 1, 2015
@oskosk oskosk added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. and removed [Status] In Progress labels Dec 1, 2015
padding: 12px 0;
text-align: center;
.themes-list .theme__active-focus {
opacity: 0.0;
Copy link
Member

Choose a reason for hiding this comment

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

Two things. Firstly we shouldn't use opacity to hide stuff, secondly, we don't need the .0.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, will proceed to update the Theme component to show the preview depending on a boolean .prop

Copy link
Contributor

Choose a reason for hiding this comment

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

Third, any CSS change needs to be namespaced properly for the context it's being used on: this change is being applied everywhere! :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Mhh, sorry for that! This css rule won't stay there as I'll update the Theme component to do what this line was supposed to do. Thanks

@scruffian
Copy link
Member

cc @folletto - this changes the theme thumbnails from this:
screenshot 2015-12-01 11 17 49

to:
screenshot 2015-12-01 11 17 56

Does that look ok to you?

@@ -30,28 +34,55 @@ module.exports = React.createClass( {
};
},

renderThemes: function() {
handleScreenshotClick: function( theme ) {
Copy link
Member

Choose a reason for hiding this comment

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

I assume this code is from the old theme thumbnail component? Can we remove that at the same time?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't fully get what you meant. handlScreenshotClick is passed as prop to ThemesList and forwarded to Theme in order to instruct what to do when a screenshot is clicked. In this case this method submits the step.

@scruffian
Copy link
Member

Looking good!

@scruffian scruffian added [Status] Needs Author Reply and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Dec 1, 2015
@folletto
Copy link
Contributor

folletto commented Dec 1, 2015

Heya!

Yes, style wise it's correct, however there are two issues:

  1. The overlay has disappeared (see the opacity: 0.0 note above). No CSS should be added at the general namespacing level if it's to be used only in a specific section (in this case, the funnel).
  2. The overlay should thus stay there, with just a change of label. As a first proposal for the label, I'd go for: "Pick".

screen shot 2015-12-01 at 11 52 53

@oskosk
Copy link
Contributor Author

oskosk commented Dec 1, 2015

Awesome @folletto, thanks! @scruffian I'll make the Theme component overlay text depend on a prop instead of hiding/showing it depending on a boolean prop. Defaulting to 'preview'.

@oskosk
Copy link
Contributor Author

oskosk commented Dec 1, 2015

  • Updated Theme component to let you choose the actionLabel text
  • Updated theme-selection to use 'Pick' text for the label.

cc @scruffian @folletto

Before this pull request:
screenshot 2015-12-01 11 17 49

After
screen shot 2015-12-01 at 10 08 57 am

@oskosk oskosk added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. and removed [Status] Needs Author Reply labels Dec 1, 2015
@folletto
Copy link
Contributor

folletto commented Dec 1, 2015

Design wise 👍

@scruffian scruffian force-pushed the update/theme-step-using-theme-list-component branch from 070988e to 2b6f645 Compare December 1, 2015 15:29
@scruffian
Copy link
Member

LGTM 👍

@scruffian scruffian added [Status] Ready to Merge and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Dec 1, 2015
@scruffian
Copy link
Member

As a followup it would be good to use the same component in the DSS flow...

ThemesList is a reusable component appropriate for the function that ThemeSelection Step is providing.

ThemeThumbnail will no longer be necessary. The theme selection step still handles a headStart flow providing
{theme: 'pub/twentyfifteen'} as a default dependency.
…s.actionLabel if theme is not active.

The default label text if .props.active is falsey is the translated 'Preview' string.

For a Theme instance having .props.active with a truthy value, the label text is the translated string 'Customize'.
The scss file for theme-selection is no longer needed and is also removed by this commit.
@scruffian scruffian force-pushed the update/theme-step-using-theme-list-component branch from 2b6f645 to 6c9f84c Compare December 2, 2015 11:00
scruffian added a commit that referenced this pull request Dec 2, 2015
…e-list-component

Signup: Replace usage of ThemeThumbnail for ThemesList component on Theme Selection Signup Step
@scruffian scruffian merged commit f1bf71d into master Dec 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Signup & Account Creation All screens and flows for making a new WordPress.com account.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants