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

Domain Management: Email: Select site redirects to manage domains #3324

Merged
merged 4 commits into from
Feb 22, 2016

Conversation

umurkontaci
Copy link
Contributor

This PR fixes #855: If you go to /domains/manage/email it will not redirect you to /domains/manage but will show all sites under /domains/manage/email, so that once you select a site, you will land on the email page.

I also did some refactoring for the routes to reduce duplicate code.

/cc: @klimeryk for review
/cc2: @breezyskies for reporting the original issue and @mtias since he suggested the solution

@umurkontaci umurkontaci added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. [Feature Group] Emails & Domains Features related to email integrations and domain management. labels Feb 15, 2016
@umurkontaci umurkontaci self-assigned this Feb 15, 2016
@breezyskies
Copy link
Contributor

Seeing the following error when I go to /domains/manage/email:

Uncaught TypeError: Cannot read property 'noSitePath' of undefined

@umurkontaci
Copy link
Contributor Author

@breezyskies You're right, there was a slightly weird ES6 issue there. Should be fixed now. (Requires a full restart of the server)

@breezyskies
Copy link
Contributor

Working for me now. 👍 I'll leave the code review to @klimeryk. :)

module.exports = function() {
SiftScience.recordUser();
function registerMultiPage( { routes, handlers } ) {
routes.forEach( path => page( path, ...handlers ) );
Copy link
Contributor

Choose a reason for hiding this comment

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

It might be the lovely fewer I'm experiencing right now, but it took me a second to realize that path comes from iterating routes. I think it'd be better to keep the naming more uniform - iterating routes gives you a route, not a path. Or better yet go paths -> path, because that's usually how it's referenced.

Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@klimeryk
Copy link
Contributor

Other than keeping the naming uniform, everything looks good. Actually, it looks great - awesome refactor! 👍

@klimeryk klimeryk 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 Feb 18, 2016
@umurkontaci umurkontaci force-pushed the fix/855-email-routing branch from 3214dd1 to a662efb Compare February 19, 2016 22:59
@umurkontaci umurkontaci 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 Feb 19, 2016
@umurkontaci
Copy link
Contributor Author

@klimeryk or @stephanethomas I've renamed it to paths. Should be good to go now.

@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 Feb 22, 2016
umurkontaci added a commit that referenced this pull request Feb 22, 2016
Domain Management: Email: Select site redirects to manage domains
@umurkontaci umurkontaci merged commit 4169de9 into master Feb 22, 2016
@umurkontaci umurkontaci deleted the fix/855-email-routing branch February 22, 2016 10:17
@mtias
Copy link
Member

mtias commented Feb 22, 2016

Nice, much simpler. Glad it worked well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature Group] Emails & Domains Features related to email integrations and domain management.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Domain Management: Email: Select site redirects to manage domains
6 participants