-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjust avatar component according to Zoe's design (#1615)
* refactor: adjust avatar according to Zoes design * chore: add changeset * refactor: use parameters for signup * refactor: use designsystem props * fix: tests * refactor: use correct spacing between signup button and search box * fix: tests * refactor: remove unused dependencies * Toggle login/logout buttons over the `hideLogin` flag in the sso plugin config (#1622) * feat: hide login buttons in the top bar with a flag in the config * chore: add changeset * chore: remove changeset for this PR * chore: fix tests * chore: adjust tests * chore: toggle login buttons via new plugin config parameter * feat: enhance quiz login button + restructure buttons * refactor: rename override components + move hideLogin evaluation to top lvl * chore: change data-test-id in e2e test * chore: add gatsby-ssr.js to sso plugin * refactor: use right test id to identify login button * fix: lint test * chore: adjust e2e common steps * fix: last e2e test * refactor: logout e2e test * chore: add appState/returnTo parameter to signup button
- Loading branch information
Showing
28 changed files
with
277 additions
and
384 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@commercetools-docs/gatsby-theme-sso-ui-kit': minor | ||
--- | ||
|
||
The avatar component was reimplemented and a signup button was introduced. The design of the buttons have changed as well. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...gatsby-theme-docs/src/overrides/avatar.js → ...e-docs/src/overrides/topbar-login-info.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
// A React component to be rendered in the top bar next to the top menu toggle button | ||
const Avatar = () => null; | ||
export default Avatar; | ||
const LoginInfo = () => null; | ||
export default LoginInfo; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import ConfigContext from './src/components/config-context'; | ||
|
||
export const wrapRootElement = ({ element }, pluginOptions) => { | ||
const isPluginEnabled = | ||
pluginOptions.auth0Domain && pluginOptions.auth0ClientId; | ||
|
||
return isPluginEnabled ? ( | ||
<ConfigContext.Provider | ||
value={{ | ||
learnApiBaseUrl: pluginOptions.learnApiBaseUrl, | ||
auth0Domain: pluginOptions.auth0Domain, | ||
auth0ClientId: pluginOptions.auth0ClientId, | ||
hideLogin: pluginOptions.hideLogin || false, | ||
}} | ||
> | ||
{element} | ||
</ConfigContext.Provider> | ||
) : ( | ||
<>{element}</> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.