refs https://github.com/TryGhost/Ghost/issues/15502
- this commit migrates Portal from CRA to Vite, as it brings the
package more inline with the direction we're going in terms of tooling
for builds
- the bulk of the changes here are just config related to get things
working with Vite, and then cleaning up all the CRA boilerplate
- `compilerOptions.baseUrl` is nice but it means we end up with two
different styles of import paths for project files - relative and from
`src/`
- to fix this, we're going to standardize on relative imports and remove
the ability to import relative to the top-level project folder
- this removes the jsconfig line and fixes all existing imports
- we use ES6 `import` for all other imports so this standardizes the
React package to also use import vs require
- merged with other imports from the react package if present
fixes https://github.com/TryGhost/Toolbox/issues/480
- this is a bit tricky because the files are a mess but I think this
covers everything and deduplicates having multiple .gitignore files
across the repo so we can focus on keeping the definitions in one
refs https://github.com/TryGhost/Ghost/issues/15502
- in order to use the translations, strings must be wrapped in the `t`
function, which is passed through AppContext
- whilst I haven't instrumented all public strings, the vast majority
are done here and the strings have been brought into the JSON locale files using `yarn translate:generate`
refs https://github.com/TryGhost/Ghost/issues/15502
- this adds the package to Portal and integrates it into the state we
pass around
- note: I've currently left the detection of the language
(`site.locale`) commented for now until we flesh more of the
implementation out
Portal currently has a Globals.js file that spells out all the colors in use in Portal, which should make it easy to customize the portal colors to match the chosen theme. There are a bunch of hardcoded values and this PR deals with those. The final outcome of these changes is absolutely invisible.
Co-authored-by: Peter Zimon <zimo@ghost.org>
closes https://github.com/TryGhost/Team/issues/2276
Portal had died with an unintelligible error about portal plans/includes being undefined when there was missing site data in some extreme edge cases. This change catches any errors in site transformation and logs it to console instead of crashing portal unexpectedly
no refs.
Post feedback popups were not optimised for mobile usage at all. All the content was on top of the window which is really hard to reach using a single hand/thumb and it just looked like a scaled down version of a desktop modal.
closes https://github.com/TryGhost/Team/issues/2361
If a free trial tier existed on site and its set to 'Invite only' in membership settings, the free trial copy still showed on portal.
- removes free trial copy from portal if site is invite only
- adds playwright test to make sure free trial copy is not shown for invite only sites
closes https://github.com/TryGhost/Team/issues/2376#event-8026429598
- if an offer is expired/in past, we no longer show it in member account info against the price
- one-time offers are never showed in portal in member account detail, as the payment information shown to member in Portal points to charge at next payment
- if trial days are over for a subscription, portal doesn't show any offer data on member account detail