Commit Graph

319 Commits

Author SHA1 Message Date
Hannah Wolfe
6161f94910
Updated to use assert/strict everywhere (#17047)
refs: https://github.com/TryGhost/Toolbox/issues/595

We're rolling out new rules around the node assert library, the first of which is enforcing the use of assert/strict. This means we don't need to use the strict version of methods, as the standard version will work that way by default.

This caught some gotchas in our existing usage of assert where the lack of strict mode had unexpected results:
- Url matching needs to be done on `url.href` see aa58b354a4
- Null and undefined are not the same thing,  there were a few cases of this being confused
- Particularly questionable changes in [PostExporter tests](c1a468744b) tracked [here](https://github.com/TryGhost/Team/issues/3505).
- A typo see eaac9c293a

Moving forward, using assert strict should help us to catch unexpected behaviour, particularly around nulls and undefineds during implementation.
2023-06-21 09:56:59 +01:00
renovate[bot]
e3c9af380c Update dependency @storybook/testing-library to v0.2.0 2023-06-21 08:12:26 +02:00
Daniel Lockyer
5c4ef092b6 Updated vitest to v0.32
refs https://github.com/TryGhost/Ghost/pull/16949
refs https://github.com/vitest-dev/vitest/releases/tag/v0.32.0

- contains a switch from `@vitest/coverage-c8` to `@vitest/coverage-v8`
  as this is now required in 0.32
2023-06-20 14:54:04 +02:00
Jono Mingard
384b468cbb Improved naming in AdminX dirty state handling
refs https://github.com/TryGhost/Team/issues/3349
2023-06-20 19:59:47 +10:00
Jono Mingard
5a6421c8bb Updated add navigation button to validate the new item
refs https://github.com/TryGhost/Team/issues/3433
2023-06-20 19:58:27 +10:00
renovate[bot]
ea3ab6beb6 Update dependency @vitejs/plugin-react to v4.0.1 2023-06-20 08:09:23 +02:00
Jono Mingard
f084fbd025 Added dirty state navigation blocking to AdminX settings
refs https://github.com/TryGhost/Team/issues/3349
2023-06-20 12:58:44 +10:00
Jono Mingard
4fd0473f1b Updated URL editing to not automatically force everything to URLs
refs https://github.com/TryGhost/Team/issues/3433
2023-06-20 12:01:34 +10:00
renovate[bot]
14c22a9b6f Update storybook monorepo to v7.0.22 2023-06-19 07:34:10 +02:00
Jono Mingard
5331cc90e2 Added errors and improved behaviour of the navigation editor
refs https://github.com/TryGhost/Team/issues/3432
2023-06-19 16:48:42 +12:00
Rishabh
fce6b52bbd Released Admin-x-settings v0.0.8 2023-06-18 18:48:06 +05:30
Peter Zimon
78aa31973c Updated installed theme list
refs. https://github.com/TryGhost/Team/issues/3432
2023-06-16 15:44:02 +02:00
Rishabh
eeabce2473 Fixed official theme image assets not loading in adminX
refs https://github.com/TryGhost/Team/issues/3432

The admin assets url are modified by ember build process by adding cache busting, so the original urls can't be used directly in adminX. This change passes the image assets from ember admin, causing the right image urls to be passed to adminX and for loading images.
2023-06-16 17:06:22 +05:30
Peter Zimon
0f9417456a Added optional confirmation for modals in AdminX
refs. https://github.com/TryGhost/Team/issues/3432
2023-06-16 12:35:27 +02:00
Peter Zimon
f4e015d2c5 Added back button to theme preview in AdminX
refs. https://github.com/TryGhost/Team/issues/3432
2023-06-16 12:35:27 +02:00
Rishabh
997cd3687e Removed eslint-plugin-react from AdminX
The `eslint-config-react-app` already covers all necessary rules from `eslint-plugin-react` and using it separately causes conflicts across projects in eslint config
2023-06-16 15:21:19 +05:30
Jono Mingard
c71d245b1d Show descriptions from theme settings if set
refs https://github.com/TryGhost/Team/issues/3354
2023-06-16 15:43:48 +12:00
Peter Zimon
005a488eed Changed button color in nav settings in AdminX
refs. https://github.com/TryGhost/Team/issues/3432
2023-06-15 20:46:51 +02:00
Peter Zimon
5bfbd5a7a0 Refined navigation design in AdminX
refs. https://github.com/TryGhost/Team/issues/3432
2023-06-15 20:42:33 +02:00
Rishabh
5559b2234e Released Admin-x-settings v0.0.7 2023-06-15 23:09:19 +05:30
Rishabh
e19c1e905d Removed theme images from adminX
refs https://github.com/TryGhost/Team/issues/3432

The theme images are used directly from admin assets using the admin assets url in AdminX, so these are redundant and not used.
2023-06-15 22:55:27 +05:30
Rishabh
7400937f52 Added delete and upload confirmation for themes in adminX
refs https://github.com/TryGhost/Team/issues/3432

- shows user confirmation popup on deleting a theme
- shows user confirmation popup to activate an uploaded theme
- shows user confirmation popup to overwrite an existing theme
2023-06-15 21:00:51 +05:30
Rishabh
44a07e04e2 Fixed file upload not triggering for same file selection
refs https://github.com/TryGhost/Team/issues/3432

File upload component was not firing `onChange` when user attempts to upload the same again, which is a side-effect of `input` field behavior. This change resets the file input on every upload with a new key so that the upload always fires
2023-06-15 21:00:51 +05:30
renovate[bot]
8ccb0f37ad Update storybook monorepo to v7.0.21 2023-06-15 13:04:31 +02:00
Jono Mingard
63a6b20b18 Added navigation settings logic to AdminX
refs https://github.com/TryGhost/Team/issues/3433
2023-06-15 15:39:11 +12:00
Peter Zimon
010be7fd3d Updated theme preview in AdminX
refs. https://github.com/TryGhost/Team/issues/3432
2023-06-14 10:57:22 +02:00
Peter Zimon
5c229ce543 Added Breadcrumbs component to AdminX
refs. https://github.com/TryGhost/Team/issues/3432
2023-06-14 09:40:27 +02:00
Peter Zimon
15ec9f0d14 Added page header component in AdminX
refs. https://github.com/TryGhost/Team/issues/3432
2023-06-14 09:13:00 +02:00
renovate[bot]
77cc3aa2c0 Update dependency @storybook/addon-styling to v1.3.0 2023-06-14 08:55:26 +02:00
Peter Zimon
8820efa80b AdminX Design System component structure cleanup
refs. https://github.com/TryGhost/Team/issues/3432
2023-06-14 08:35:51 +02:00
renovate[bot]
e7289e755a Update storybook monorepo to v7.0.20 2023-06-14 08:24:23 +02:00
Peter Zimon
d2c78b0129 Refined official theme list in AdminX
refs. https://github.com/TryGhost/Team/issues/3432
2023-06-14 08:04:57 +02:00
Jono Mingard
899fd4d29c Updated official themes to show installed/activated in AdminX
refs https://github.com/TryGhost/Team/issues/3432
2023-06-14 15:59:42 +12:00
Jono Mingard
ae0989ebea Added a basic theme install API call in AdminX settings
refs https://github.com/TryGhost/Team/issues/3432
2023-06-14 15:52:41 +12:00
Jono Mingard
7832f5c685 Added tier selection for default post access in AdminX
refs https://github.com/TryGhost/Team/issues/3151
2023-06-14 12:29:11 +12:00
Rishabh
902fb999a2 Updated official themes view in adminX
refs https://github.com/TryGhost/Team/issues/3432

- updated theme preview urls to use admin assets
- updated theme selection preview to include full theme info
2023-06-13 22:36:54 +05:30
Rishabh
36ced958f8 Wired theme change UI in adminX
refs https://github.com/TryGhost/Team/issues/3432

- wires list of installed themes
- allows actions on themes like upload, activate, delete and download
- cleans up theme modal content and toolbar into granular components
2023-06-13 22:00:49 +05:30
Rishabh
3dbc2ee507 Added theme management hooks in adminX
refs https://github.com/TryGhost/Team/issues/3432

- adds new `useRequest` hook to manage API requests
- adds new `useThemes` hook that allows fetching and updating themes
- adds models pattern to store specific type and helper info for themes
2023-06-13 22:00:49 +05:30
Peter Zimon
6023bddafc Replaced tab component in themes (AdminX)
refs. https://github.com/TryGhost/Team/issues/3432
2023-06-13 13:11:44 +02:00
Peter Zimon
1071d4437c Updated 'upload theme' component in AdminX
refs. https://github.com/TryGhost/Team/issues/3432
2023-06-13 13:11:44 +02:00
Peter Zimon
db1c4e6381 Restructured components for theme mngmt in AdminX
refs. https://github.com/TryGhost/Team/issues/3432
2023-06-13 12:20:29 +02:00
Peter Zimon
09b404acd2 Fixed modal footer bug in AdminX
refs. https://github.com/TryGhost/Team/issues/3432
2023-06-13 12:16:19 +02:00
Peter Zimon
58f51a1838 Updated theme setting copy in AdminX
refs. https://github.com/TryGhost/Team/issues/3432
2023-06-13 12:05:52 +02:00
Rishabh Garg
b697ca2768
Added basic theme settings design in AdminX (#17000)
refs https://github.com/TryGhost/Team/issues/3432

- adds basic design structure for theme settings/management in adminX

---------

Co-authored-by: Peter Zimon <peter.zimon@gmail.com>
2023-06-13 14:27:29 +05:30
Rishabh
5cc1c43257 Added theme management apis in adminX
refs https://github.com/TryGhost/Team/issues/3432
2023-06-13 13:24:47 +05:30
Jono Mingard
778e9a5f96 Added offers support in default recipients 2023-06-13 18:48:45 +12:00
Jono Mingard
731858e9e0 Added tier and label selection in default recipients
refs https://github.com/TryGhost/Team/issues/3151
2023-06-13 18:48:45 +12:00
Jono Mingard
345d90bbba Added homepage/post URL selection in AdminX design settings
refs https://github.com/TryGhost/Team/issues/3354
2023-06-12 13:46:14 +12:00
Jono Mingard
ba2436e834 Fixed type errors in storybook 2023-06-12 11:10:53 +12:00
Jono Mingard
c3f6d77fd9 Added simple tests for design modal
refs https://github.com/TryGhost/Team/issues/3354
2023-06-12 11:04:19 +12:00