From afa93e94b5c563b1a654cb1c67e1fdfcfd6e3a4b Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Wed, 6 Apr 2022 00:01:08 -0400 Subject: [PATCH 1/2] docs: add example of actual authenticated state in example app --- example/index.js | 112 ++++++++++++++++++++++++++--------------------- 1 file changed, 63 insertions(+), 49 deletions(-) diff --git a/example/index.js b/example/index.js index cfec3546a..1c4c5d6e7 100644 --- a/example/index.js +++ b/example/index.js @@ -6,62 +6,76 @@ import ReactDOM from 'react-dom'; import { AppContext, AppProvider } from '@edx/frontend-platform/react'; import { initialize, getConfig, subscribe, APP_READY } from '@edx/frontend-platform'; import Header, { StudioHeader } from '@edx/frontend-component-header'; +import { Stack } from '@edx/paragon'; import './index.scss'; subscribe(APP_READY, () => { ReactDOM.render( - {/* We can fake out authentication by including another provider here with the data we want */} - -
- -
Logged out state
+ + {/* We can fake out authentication by including another provider here with the data we want, an unauthenticated user. */} +
+

Logged out state

+ +
+ +
- {/* We can fake out authentication by including another provider here with the data we want */} - -
- -
Logged in state
- - - -
Logged in state for Studio header
+ {/* We can fake out authentication by including another provider here with the data we want, an authenticated user. */} + + {/* Default header */} +
+

Logged in state

+
+
+ + {/* Studio header */} +
+

Logged in state for Studio header

+ +
+
+ + {/* Default header, using actual `AppContext` values */} +
+

Actual logged in state

+
+

+ If you are authenticated with the LMS (edx-platform), you will see the logged in state. Additionally, if + you are an enterprise learner, you should see a custom logo and Dashboard links + that direct you to http://localhost:8734 (frontend-app-learner-portal-enterprise). Otherwise, + you will see the logged out state. +

+
+ , document.getElementById('root'), ); From eb345823d28fc14a118c446514d1d6ad5f10d1eb Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Wed, 6 Apr 2022 00:02:31 -0400 Subject: [PATCH 2/2] build: adjust ci workflow --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 13bac4bde..eab6b7620 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,5 @@ name: Default CI -on: [push, pull_request] +on: [pull_request] jobs: tests: runs-on: ubuntu-latest