Commit Graph

11 Commits

Author SHA1 Message Date
Rish
2e8eea05ff Replaced membersjs titles to portal
no refs
2021-03-19 12:35:57 +05:30
Rish
8746acd87a Fixed Lint 2020-09-23 23:29:16 +05:30
Rish
965959c964 Cleared timeouts in App on unmount
no issue

- Clears any timeout on unmount in main App and components to avoid unexpected unmount behaviors
2020-09-23 20:49:16 +05:30
Rishabh Garg
fb6a2c950f Added links page and look feel settings handling (#64)
no issue

- Handles new look feel settings for portal icon button
- Adds auto width calculation for portal button based on text
- Adds new link page for portal links and data attributes
- Added contrast color calculation for accent color complimentary text
- Added copy text utility for allowing copy to clipboard
2020-07-07 19:53:26 +05:30
Rish
8df822d317 Refactered App structure and naming
no issue

- Moved `ParentContainer.js` to redundant empty top level `App.js` to remove extra nesting and improved naming
- Renamed `ParentContext` to `AppContext` and exported as default
- Fixed imports in all the components and test-utils with new structure
- Passed `siteUrl` to api setup from main App to allow easier configuration
- Updated App tests
2020-06-12 14:19:08 +05:30
Rish
2aef0d57f8 Refactored app initialization to remove admin url dependency
closes https://github.com/TryGhost/members.js/issues/25

- Remove dependency on admin url for initialization as member endpoints now exist on site directly
- Auto initializes the script on load as need not wait on any external dependency
- API fetch cleanup in parent container
- Updates tests
2020-05-01 17:06:58 +05:30
Rish
487bea51b2 Refactored code structure using react context
ref https://github.com/TryGhost/members.js/issues/5

React context allows us cleaner setup in codebase with shared data and methods across components at different nesting levels. This should allow faster iteration and easier development going forward.

- Uses Parent context for shared data and methods across different components instead of passed down props
- Uses new `init` method in API for data initialization
- Removes `PopupMenu` component in favor of `PopupModal`
- Adds new test util for custom render for easier base setup - https://testing-library.com/docs/react-testing-library/setup#custom-render
- Updates tests to use new test util for easier test setup
2020-04-28 01:10:08 +05:30
Rish
117a27f86b Setup render tests for components
Adds basic rendering test for all components/pages for expected outputs
2020-04-16 12:21:49 +05:30
Rish
909eb16ced Fixed basic top-level App test 2020-04-15 21:15:56 +05:30
Hannah Wolfe
4c358d2cec Added ghost browser ESLint config and fixed errors
- added eslint-plugin-ghost, extended ghost/browser config & fixed all the issues
- did this because basic things like indent, quotes and semi-colons weren't being enforced resulting in inconsistencies
- we can customise this or create a ghost/react if desired
2020-04-10 16:32:37 +01:00
Rish
4ff29d2735 Initialize project using Create React App 2020-03-24 18:37:04 +05:30