refs https://github.com/TryGhost/Product/issues/3349
- When updating certain states, eg the branding colour using or a typing
in a text box, we want it display on the preview almost immediately.
However this comes with a drawback of sending a ton of requests to the
server.
- This fix adds debouncing which essentially adds a small delay of
500ms, to wait for the user to finish typing / selecting colour before
making a request.
---
<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 4e623ff</samp>
Improved the performance and user experience of the site description and
accent color settings by debouncing the backend updates. Added a
`debounce` utility function in `debounce.ts`.
refs. https://github.com/TryGhost/Product/issues/3349
- added static Preview button to Tips and Donations
- updated modal buttons in Design settigns, so it doesn't close on save
and easier to play around with various settings
refs https://github.com/TryGhost/Product/issues/3349
- Simplified a few more places after switching to react-query
- Improved how mocking works in specs to be more scalable as the number
of queries increases
refs https://github.com/TryGhost/Team/issues/3349
Tidies up the remaining major pieces which were not covered by tests.
Extends the existing test patterns, although the API mocks are getting a
bit unmanageable.