diff --git a/docs/content_block_manager.md b/docs/content_block_manager.md index 5f8a722ef0f..8203ff78d72 100644 --- a/docs/content_block_manager.md +++ b/docs/content_block_manager.md @@ -4,36 +4,4 @@ The Content Block Manager is a "mini application" within Whitehall, packaged as a Rails Engine. -## Where is it? - -All the code (including tests) for the engine is located at [`lib/engines/content_block_manager`](https://github.com/alphagov/whitehall/tree/main/lib/engines/content_block_manager). - -## Why is is packaged this way? - -The rationale for packaging the code in this way can be found in [ADR-0004](https://github.com/alphagov/whitehall/blob/main/docs/adr/0004-content-object-store-added-with-a-rails-engine.md) - -## How to access the Content Block Manager - -The Content Block Manager is listed as an app within Signon, separate from Whitehall. - -The Content Block Manager link on signon integration was generated by running the below command in signon kubernetes -(refer to the [signon usage documentation for details](https://docs.publishing.service.gov.uk/repos/signon/usage.html)). - -``` -rake applications:create name="Content block manager" description="Create, edit and use modular content" \ - home_uri="https://whitehall-admin.integration.publishing.service.gov.uk/content-block-manager" \ - redirect_uri="https://whitehall-admin.integration.publishing.service.gov.uk/content-block-manager/auth/gds/callback" -``` - -This was inspired by the [Mainstream team's work on the Homepage app within Publisher](https://github.com/alphagov/publisher/blob/main/docs/homepage.md). -As with the Homepage app, permissions are managed through the Whitehall app, rather than the "app" itself. - -## Why is this being added directly to the Signon landing page? - -The functionality itself will sit within Whitehall. However, we’ve made the decision to make the Content Block Manager -behave as a seperate app, because we (like the Mainstream team) believe that users should simply be able to select what -action they want to perform, rather than having to understand what app they need to use to accomplish a task. -Additionally, the navigation within Whitehall is already very crowded with a lot of functionality buried underneath the -"More" menu, and we don't want to add to this noise - -We have already done some light touch testing with users, and we believe this approach is widely understood and agreed. +All the documentation can be found [within the Engine](https://github.com/alphagov/whitehall/blob/main/lib/engines/content_block_manager/README.md) diff --git a/lib/engines/content_block_manager/README.md b/lib/engines/content_block_manager/README.md new file mode 100644 index 00000000000..66667b29b9c --- /dev/null +++ b/lib/engines/content_block_manager/README.md @@ -0,0 +1,49 @@ +# Content Block Manager + +Content Block Manager is used by publishers to create and manage "blocks" on content +that can be reused and kept up to date across various pieces of content. + +## Where is it? + +Content Block Manager is a "mini application" within [Whitehall](https://github.com/alphagov/whitehall), +packaged as a Rails Engine. + +All the code for Content Block Manager is is located at +[lib/engines/content_block_manager](https://github.com/alphagov/whitehall/tree/main/lib/engines/content_block_manager) +within Whitehall. + +## Running the Application + +As the application is contained within Whitehall, the app can be run by [following the +same instructions to run Whitehall](https://github.com/alphagov/whitehall?tab=readme-ov-file#running-the-application). + +Once the application is up and running, Content Block Manager will be available at http://whitehall-admin.dev.gov.uk/content-block-manager. + +## Running the test suite + +The test suite runs within the main Whitehall test suite, but if you want to run Content Block Manager +tests on their own, you can run the following: + +### Unit tests + +```bash +govuk-docker-run bundle exec rails test lib/engines/content_block_manager/test/**/* +``` + +### Cucumber tests + +```bash +govuk-docker-run env RAILS_ENV=test bundle exec cucumber lib/engines/content_block_manager/features/ +``` + +### Jasmine tests + +Currently not possible + +## Why is is packaged this way? + +The rationale for packaging the code in this way can be found in the Whitehall ADR - [ADR-0004](https://github.com/alphagov/whitehall/blob/main/docs/adr/0004-content-object-store-added-with-a-rails-engine.md) + +### Further documentation + +See the [`docs/`](https://github.com/alphagov/whitehall/blob/main/lib/engines/content_block_manager/docs) directory. diff --git a/lib/engines/content_block_manager/doc/access.md b/lib/engines/content_block_manager/doc/access.md new file mode 100644 index 00000000000..e7b62ab4f6b --- /dev/null +++ b/lib/engines/content_block_manager/doc/access.md @@ -0,0 +1,25 @@ +## How to access the Content Block Manager + +The Content Block Manager is listed as an app within Signon, separate from Whitehall. + +The Content Block Manager link on signon integration was generated by running the below command in signon kubernetes +(refer to the [signon usage documentation for details](https://docs.publishing.service.gov.uk/repos/signon/usage.html)). + +``` +rake applications:create name="Content block manager" description="Create, edit and use modular content" \ + home_uri="https://whitehall-admin.integration.publishing.service.gov.uk/content-block-manager" \ + redirect_uri="https://whitehall-admin.integration.publishing.service.gov.uk/content-block-manager/auth/gds/callback" +``` + +This was inspired by the [Mainstream team's work on the Homepage app within Publisher](https://github.com/alphagov/publisher/blob/main/docs/homepage.md). +As with the Homepage app, permissions are managed through the Whitehall app, rather than the "app" itself. + +## Why is this being added directly to the Signon landing page? + +The functionality itself will sit within Whitehall. However, we’ve made the decision to make the Content Block Manager +behave as a seperate app, because we (like the Mainstream team) believe that users should simply be able to select what +action they want to perform, rather than having to understand what app they need to use to accomplish a task. +Additionally, the navigation within Whitehall is already very crowded with a lot of functionality buried underneath the +"More" menu, and we don't want to add to this noise + +We have already done some light touch testing with users, and we believe this approach is widely understood and agreed. diff --git a/lib/engines/content_block_manager/app/doc/adr/0001-document-use-of-services.md b/lib/engines/content_block_manager/doc/adr/0001-document-use-of-services.md similarity index 100% rename from lib/engines/content_block_manager/app/doc/adr/0001-document-use-of-services.md rename to lib/engines/content_block_manager/doc/adr/0001-document-use-of-services.md