Commit Graph

27 Commits

Author SHA1 Message Date
Daniel Lockyer
03122cde77
Added support to yarn dev for --announcement-bar
refs https://github.com/TryGhost/Toolbox/issues/584

- we should strive to provide a good development experience by keeping
  the number of "other" setup steps to a minimum
- this adds support for the Announcement Bar app to the dev script so a
  simple flag spins up the dev server too
2023-05-22 15:31:28 +02:00
Fabien "egg" O'Carroll
104f84f252 Added eslint rule for file naming convention
As discussed with the product team we want to enforce kebab-case file names for
all files, with the exception of files which export a single class, in which
case they should be PascalCase and reflect the class which they export.

This will help find classes faster, and should push better naming for them too.

Some files and packages have been excluded from this linting, specifically when
a library or framework depends on the naming of a file for the functionality
e.g. Ember, knex-migrator, adapter-manager
2023-05-09 12:34:34 -04:00
Sodbileg Gansukh
e50bc87780 Added explicit rules to announcement bar styles
refs https://github.com/TryGhost/Team/issues/3143

- due to the reset, some default styles stopped working
- this adds those missing explicit styles
2023-05-05 18:22:30 +08:00
Sodbileg Gansukh
ffe6a472a9 Added a reset to the announcement bar styles
refs https://github.com/TryGhost/Team/issues/3143

- the reset was added to reduce the theme style conflict as much as possible
2023-05-05 17:58:37 +08:00
renovate[bot]
67abd6555b Update CSS preprocessors 2023-05-01 16:43:16 +02:00
Elena Baidakova
257e17c1ba Released Announcement-Bar v1.1.4 2023-04-27 17:23:37 +04:00
Elena Baidakova
f5446bea46 Released Announcement-Bar v1.1.3 2023-04-27 16:45:55 +04:00
Elena Baidakova
f69674ff9a
Fixed announcement bar preview (#16715)
refs TryGhost/Team#3122
- Fixed that preview takes data from user input before saving on
backend.

---

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 54d5b2d</samp>

This pull request adds the ability to preview the announcement bar in
the Ghost admin panel and the theme settings. It also adds a
confirmation dialog to discard or save unsaved changes before leaving
the announcement bar settings. It refactors some components and methods
to remove unnecessary or redundant calls to save the settings. It
modifies the `ghost_head` helper, the `theme-management` service, and
the `announcement-bar/src` files to support the preview feature.
2023-04-27 16:40:11 +04:00
Naz
15eca6020d Migrated announcement bar script to use Members API
https://github.com/TryGhost/Team/issues/3121

- The announcement bar data is now exposed through Members API `/members/api/announcement` instead of Content API.
2023-04-27 14:01:36 +02:00
Elena Baidakova
0adc81e192 Released Announcement-Bar v1.1.2 2023-04-21 17:00:47 +04:00
Elena Baidakova
bef618c975
Fixed announcement bar close button state (#16699)
refs TryGhost/Team#3095

We should show the announcement bar again in the following case:

- User closes the bar
- Publisher updates announcement content
- We show the bar again even if the user closed it previously in the
same session
2023-04-21 16:58:41 +04:00
Elena Baidakova
a46d837fbd Released Announcement-Bar v1.1.1 2023-04-21 16:49:13 +04:00
Elena Baidakova
b893ec13ab Fixed announcement bar insertion
no issue
- Checked if react root div was already inserted to avoid duplication.
2023-04-21 15:19:24 +04:00
Sodbileg Gansukh
0ecdd50d3b Refined the announcement bar frontend styles
refs https://github.com/TryGhost/Team/issues/3097
2023-04-21 11:50:08 +01:00
Elena Baidakova
53b2050c89 Released Announcement-Bar v1.1.0 2023-04-20 16:40:28 +04:00
Elena Baidakova
a282857379
Added announcement close button state storage to sessionStorage (#16683)
refs TryGhost/Team#3071
2023-04-20 16:39:44 +04:00
Elena Baidakova
5d3eed1eac Released Announcement-Bar v1.0.0 2023-04-20 14:24:49 +04:00
Elena Baidakova
4c4e5a9c95 Hide announcement bar script if announcement_content is empty
refs TryGhost/Team#3009
2023-04-20 14:05:37 +04:00
Sodbileg Gansukh
65ba464548 Show the announcement bar only when there is content 2023-04-20 14:05:37 +04:00
Sodbileg Gansukh
b1f60fd589 Update the light announcement bar background color 2023-04-20 14:05:37 +04:00
Naz
5421ab5ab0 Limited the keys pulled from Settings API
refs https://github.com/TryGhost/Team/issues/3009

- It's best to pull in as much data from the API as the app's state will ever use. Makes it explicit about what fields the app depends on instead of requesting a whole of "settings"
2023-04-20 14:05:37 +04:00
Naz
7270c17a1d Connected announcement bar to Settings API data
refs https://github.com/TryGhost/Team/issues/3009

- The change hooks up the announcement bar script to use "announcement" and "announcement_background" values coming from the Content Settings API
2023-04-20 14:05:37 +04:00
Sodbileg Gansukh
8e7a150237 Add closing logic 2023-04-20 14:05:37 +04:00
Sodbileg Gansukh
6e1cb2f8ad Add close button 2023-04-20 14:05:37 +04:00
Sodbileg Gansukh
af6b474e23 Add the default background color class 2023-04-20 14:05:37 +04:00
Sodbileg Gansukh
248d5833e4 Added basic styles 2023-04-20 14:05:37 +04:00
Elena Baidakova
725956bc8b Added script for announcement bar insertion
refs TryGhost/Team#3009
2023-04-20 14:05:37 +04:00