Skip to content

Commit

Permalink
Merge pull request #1241 from weather-gov/lmm/content-dashboard-updates
Browse files Browse the repository at this point in the history
remove workbench and add content filters
  • Loading branch information
loganmcdonald-noaa authored May 22, 2024
2 parents f60427f + 1a7dd05 commit d6fa9eb
Show file tree
Hide file tree
Showing 19 changed files with 201 additions and 139 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,11 @@ zap-containers:
docker compose stop
docker compose rm -f

scorched-earth:
scorched-earth: ## A tool to reset your Docker Desktop.
docker stop $$(docker ps -a -q)
docker rm $$(docker ps -a -q)
docker system prune -f
docker volume rm $(docker volume ls -qf dangling=true)

### CSS
build-css: # Build CSS
Expand Down
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
"drupal/single_content_sync": "^1.3",
"drupal/token": "^1.13",
"drupal/twig_tweak": "^3.2",
"drupal/workbench": "^1.4",
"drupal/workbench_access": "^2.0",
"drush/drush": "^12.4"
},
Expand Down
70 changes: 1 addition & 69 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/dev/contributed-modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,11 @@ _Added in January 2024_

This module adds a lot of helper functions and filters, such as the ability to pull in an arbitrary block. We added it when setting up some of our initial twig templates.

### [`workbench`](https://www.drupal.org/project/workbench) and [`workbench_access`](https://www.drupal.org/project/workbench_access)
### [`workbench_access`](https://www.drupal.org/project/workbench_access)

_Added in January 2024_

The original impetus for adding Workbench, was actually Workbench Access, the comparatively smaller module in the ecosystem. We needed a way to associate user accounts with WFO taxonomy with a regional hierarchy. We evaluated several options ([group](https://www.drupal.org/project/group), [permissions_by_term](https://www.drupal.org/project/permissions_by_term)) for this authorization schema and settled on WA for its simple model and user-friendly interface. Since we had enabled WA we decided to go ahead and also enable Workbench, since it ticked off several boxes in our user needs for the CMS. At the time we added it, full design of the CMS user interface was not complete, so time will tell if we continue to use Workbench as the guiding design for CMS user experience.
We added Workbench Access because we needed a way to associate user accounts with WFO taxonomy with a regional hierarchy. We evaluated several options ([group](https://www.drupal.org/project/group), [permissions_by_term](https://www.drupal.org/project/permissions_by_term)) for this authorization schema and settled on WA for its simple model and user-friendly interface.

### (dev only) [`coder`](https://www.drupal.org/project/coder)

Expand Down
2 changes: 1 addition & 1 deletion web/config/cloudgov/samlauth.authentication.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ _core:
default_config_hash: oDGEkhP0h5rXXqlDplxeBDre0goLigOJupHKMDMwcqM
login_menu_item_title: ''
logout_menu_item_title: ''
login_redirect_url: '/admin/workbench'
login_redirect_url: '/admin/content'
logout_redirect_url: '/user/login'
error_redirect_url: ''
error_throw: false
Expand Down
32 changes: 18 additions & 14 deletions web/config/sync/core.entity_form_display.user.user.default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ langcode: en
status: true
dependencies:
config:
- field.field.user.user.field_primary_wfo
- field.field.user.user.user_picture
- image.style.thumbnail
module:
- image
- user
_core:
default_config_hash: FaQ9Ptcpxpg30AtiqRDtl_8zbJArHP1LPfug_s59TOA
Expand All @@ -16,23 +15,28 @@ bundle: user
mode: default
content:
account:
weight: -10
weight: 2
region: content
settings: { }
third_party_settings: { }
contact:
weight: 5
region: content
language:
weight: 0
field_primary_wfo:
type: entity_reference_autocomplete
weight: 1
region: content
settings:
match_operator: CONTAINS
match_limit: 10
size: 60
placeholder: ''
third_party_settings: { }
timezone:
weight: 6
region: content
user_picture:
type: image_image
weight: -1
weight: 0
region: content
settings:
progress_indicator: throbber
preview_image_style: thumbnail
settings: { }
third_party_settings: { }
hidden: { }
hidden:
language: true
user_picture: true
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ status: true
dependencies:
config:
- core.entity_view_mode.user.compact
- field.field.user.user.field_primary_wfo
- field.field.user.user.user_picture
- image.style.thumbnail
module:
Expand All @@ -28,4 +29,5 @@ content:
weight: 0
region: content
hidden:
field_primary_wfo: true
member_for: true
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ langcode: en
status: true
dependencies:
config:
- field.field.user.user.field_primary_wfo
- field.field.user.user.user_picture
- image.style.thumbnail
module:
Expand All @@ -15,6 +16,14 @@ targetEntityType: user
bundle: user
mode: default
content:
field_primary_wfo:
type: entity_reference_label
label: above
settings:
link: true
third_party_settings: { }
weight: 6
region: content
member_for:
weight: 5
region: content
Expand Down
1 change: 0 additions & 1 deletion web/config/sync/core.extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ module:
weather_data: 0
weather_login: 0
weather_routes: 0
workbench: 0
workbench_access: 0
externalauth: 10
views: 10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ entity_type: node
bundle: weather_story
label: WFO
description: ''
required: false
required: true
translatable: false
default_value: { }
default_value_callback: ''
Expand Down
30 changes: 30 additions & 0 deletions web/config/sync/field.field.user.user.field_primary_wfo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
uuid: 0c3318be-917d-433b-b244-f2df643dc3df
langcode: en
status: true
dependencies:
config:
- field.storage.user.field_primary_wfo
- taxonomy.vocabulary.weather_forecast_offices
module:
- user
id: user.user.field_primary_wfo
field_name: field_primary_wfo
entity_type: user
bundle: user
label: 'Primary WFO'
description: 'Enter your primary WFO to help organize your content dashboard.'
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings:
handler: 'default:taxonomy_term'
handler_settings:
target_bundles:
weather_forecast_offices: weather_forecast_offices
sort:
field: name
direction: asc
auto_create: false
auto_create_bundle: ''
field_type: entity_reference
20 changes: 20 additions & 0 deletions web/config/sync/field.storage.user.field_primary_wfo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
uuid: 3b7a250c-f6c8-4b21-a84f-5c017853591d
langcode: en
status: true
dependencies:
module:
- taxonomy
- user
id: user.field_primary_wfo
field_name: field_primary_wfo
entity_type: user
type: entity_reference
settings:
target_type: taxonomy_term
module: core
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false
10 changes: 0 additions & 10 deletions web/config/sync/system.menu.workbench.yml

This file was deleted.

2 changes: 0 additions & 2 deletions web/config/sync/user.role.authenticated.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ dependencies:
- system
- taxonomy
- toolbar
- workbench
_core:
default_config_hash: cFrlqjtkTfvY3RGccjJkPf1SGIfJ942IrxTLWAO4mgA
id: authenticated
Expand All @@ -33,7 +32,6 @@ permissions:
- 'access help pages'
- 'access taxonomy overview'
- 'access toolbar'
- 'access workbench'
- 'view all revisions'
- 'view any basic block content history'
- 'view any no_title_block block content history'
Expand Down
2 changes: 0 additions & 2 deletions web/config/sync/user.role.content_admin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ dependencies:
- system
- taxonomy
- toolbar
- workbench
- workbench_access
id: content_admin
label: 'Content admin'
Expand All @@ -40,7 +39,6 @@ permissions:
- 'access taxonomy overview'
- 'access toolbar'
- 'access user profiles'
- 'access workbench'
- 'assign selected workbench access'
- 'create basic block content'
- 'create dynamic_safety_information content'
Expand Down
3 changes: 1 addition & 2 deletions web/config/sync/user.role.content_editor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ dependencies:
- system
- taxonomy
- toolbar
- workbench
- workbench_access
_core:
default_config_hash: NtMgnXp0miNtJhag07NSjwdCm4zpJwhlDFs1HgyL4wI
Expand All @@ -41,8 +40,8 @@ permissions:
- 'access taxonomy overview'
- 'access toolbar'
- 'access user profiles'
- 'access workbench'
- 'assign selected workbench access'
- 'create weather_story content'
- 'edit any basic block content'
- 'edit any dynamic_safety_information content'
- 'edit any no_title_block block content'
Expand Down
Loading

0 comments on commit d6fa9eb

Please sign in to comment.