-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Google Apps: Show Current User #3584
Conversation
}; | ||
|
||
Undocumented.prototype.googleAppsFilterBySiteId = function( siteId, fn ) { | ||
debug( '/sites/:siteId/google-apps/site' ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be /sites/:siteId/google-apps
(without /site
at the end).
Stupid nitpick, but someone might get confused by this print and search for a non-existing endpoint.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
I've encountered an error in weird place - when navigating away from the
|
5ed15a6
to
445f9d4
Compare
Weird bug indeed. During a navigation we unset the selected site before unmounting the component and this led to passing |
background: url('/calypso/images/upgrades/google-apps-logo.png'); | ||
background-position: left center; | ||
background-repeat: no-repeat; | ||
//noinspection CssUnknownTarget |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like a weird comment creeped in ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It stops Webstorm from complaining about unknown target. But I guess we're not using anything to supress Webstorm errors and it might be best to remove it actually
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Thanks, @umurkontaci - the issue I've reported has indeed been fixed 👍 I've tested the "no domains" situation:
I actually do see an
This scenario shows a "You don't have any domains yet." screen when I do have a domain, it's just a mapped domain. This wording could lead to some confusion - maybe we could show a more informative message when the user has domains, but none of them are eligible? |
@umurkontaci I would change the notice for mapped domains slightly:
|
445f9d4
to
a10deea
Compare
+1 to tests from me as well. Would appreciate some function docs too. Nice-to-haves, but go a long way to help others looking over the code. |
cf00a31
to
56ece0b
Compare
} ); | ||
|
||
it( 'should not have duplicate items', () => { | ||
const state = items( [ { email: '[email protected]' } ], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the reducer tests, we also like to use deepFreeze to make sure we don't accidentally mutate current state. Usage looks a bit like:
import deepFreeze from 'deep-freeze';
const originalState = deepFreeze( [ { email: '[email protected]' } ] );
const state = items( originalState, ...
👍 Thanks for adding tests! ⭐ This redux subtree is good to 🚢 after adding |
56ece0b
to
5cb59e4
Compare
@gwwar Thank you for the review! Added |
👍 Redux changes are good to 🚢 I ran into some trouble testing the full flow due to my domain missing WWD info atm, but if @klimeryk has already verified behavior I'm fine with that. Looks like you'll want to rebase, before |
…ase and enable mapped domains to use email forwarding
5cb59e4
to
492692a
Compare
Tested again, after the rebase and resolving conflicts - looks A-OK. |
Google Apps: Show Current User
Fixes #603.
Requires D1179-code
This changes enables the users to see the current list of Google Apps users per domain and per site.
There quite some changes in this PR, namely I moved the Google Apps store to Redux. Since this component also needs non-Redux data as well, they are glued in the data component.
Screenshots
Sitewide - Has Google Apps
Per domain - Has Google Apps
Sitewide - No domains
Sitewide - Only mapped domains
Per domain - Not eligible
Testing
/cc: @klimeryk @stephanethomas @mtias for code review (first attempt at Redux – extra eyes welcome)
/cc: @breezyskies for design
/cc: @ranh for copy