Commit Graph

1212 Commits

Author SHA1 Message Date
Rish
bab35b3637 Added util to handle members-api/ssr requests
refs https://github.com/TryGhost/membersjs/issues/2

We need to make requests to members Admin API and SSR endpoints to handle member's session on theme, send magic-link on email and also for using stripe checkout. This adds a small util that wraps all such external requests for use in CRA UI based on user action

Note: The util setup needs `blogUrl` and `adminUrl` values to setup the API endpoints, which we currently pass from the theme. This might change in immediate future based on how we decide to get these values in CRA script.
2020-04-08 22:32:58 +05:30
Peter Zimon
93a634ce5f Added basic styles
no refs.
- added icon for trigger button open/close state to indicate account menu
- updated style of trigger button for better contrast
- updated base font style and size for html and body to access global typographic styles
2020-04-06 11:25:04 +02:00
Rish
b782048421 Added default initialization for local development
no issue
2020-04-02 17:06:22 +05:30
Rish
f4f5a8331d Updated app flow to use external members data
no issue

- Wraps the react rendering initialisation in a function which is accessed by theme to render the members UI as needed
- Uses site logo and logged in member email for rendering
2020-04-02 13:48:54 +05:30
Rish
ee3fd5a18e Updated Frame component to a simpler version
no issue

Makes frame component more efficient and easier to understand
2020-04-02 13:48:54 +05:30
Hannah Wolfe
4ddddabe85 Added linting scripts
- Incorrectly assumed this was automatically part of `react-scripts test`.
2020-04-01 12:43:42 +01:00
Rish
31b80d8270 Added new Frame Component for iframe encapsulation
no issue

- Adds new FrameComponent which allows encapsulating any React Component inside Iframe directly
- Wraps the Popup and Trigger components inside frame components to be rendered inside iframe
2020-03-31 13:51:48 +05:30
Rish
3dca602545 Added trigger and popup UI components - v1
no issue

- Adds new components for membersJs trigger button and popup menu with style
- Adds basic trigger interaction between trigger button and popup menu
- Uses hardcoded member values
- Adds `prop-types` dependency
2020-03-30 19:05:35 +05:30
Rish
f761672e32 Updated Readme 2020-03-30 19:02:19 +05:30
Rish
c23a80e6f0 Updated build process for single minified script
no issue

By default, CRAs build process creates chunked script files and adds them to default index.html. The updated build process uses `rewire` and `webpack` to -

- Tweak CRAs default behavior by switching off chunking, which leads to a single script
- Uses webpack locally to combine JS and CSS built by above step into a single `bundle.min.js`
2020-03-24 18:49:04 +05:30
Rish
1b91730c48 Initial commit 2020-03-24 18:37:38 +05:30
Rish
4ff29d2735 Initialize project using Create React App 2020-03-24 18:37:04 +05:30