Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace admin_toolbar by core navigation module #813

Open
wants to merge 10 commits into
base: 8.0.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ jobs:
composer require "drupal/responsive_preview" --no-update
composer require "drupal/slick:^2.7" --no-update
composer require "drupal/blazy:^2.14" --no-update
composer require "drupal/admin_toolbar:^3.4" --no-update
composer require "drupal/core-dev:~10.3.0" --no-update

composer update
Expand Down
7 changes: 6 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,19 @@
},
"drupal/diff": {
"Back button for comparison page": "https://www.drupal.org/files/issues/back_button_for-2853193-4.patch"
},
"drupal/gin_toolbar": {
"Secondary toolbar does not show on the front end when core navigation enabled": "https://www.drupal.org/files/issues/2024-07-10/3460333-gin-toolbar-2.patch"
},
"drupal/gin": {
"Secondary toolbar does not show on the front end when core navigation enabled": "https://git.drupalcode.org/project/gin/-/merge_requests/464.diff"
}
}
},
"require": {
"php": ">=8.3",
"cweagans/composer-patches": "^1.6.5",
"drupal/access_unpublished": "^1.5",
"drupal/admin_toolbar": "^3.4",
"drupal/autofill": "^1.1",
"drupal/autosave_form": "^1.6",
"drupal/checklistapi": "^2.1.3",
Expand Down
2 changes: 2 additions & 0 deletions config/install/user.role.editor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ dependencies:
- file
- filter
- media
- navigation
- node
- path
- scheduler
Expand All @@ -36,6 +37,7 @@ permissions:
- 'access contextual links'
- 'access files overview'
- 'access media overview'
- 'access navigation'
- 'access tokens overview'
- 'access toolbar'
- 'administer menu'
Expand Down
2 changes: 2 additions & 0 deletions config/install/user.role.restricted_editor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ dependencies:
- file
- filter
- media
- navigation
- node
- path
- scheduler
Expand All @@ -34,6 +35,7 @@ permissions:
- 'access contextual links'
- 'access files overview'
- 'access media overview'
- 'access navigation'
- 'access tokens overview'
- 'access toolbar'
- 'break content lock'
Expand Down
2 changes: 2 additions & 0 deletions config/install/user.role.seo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ dependencies:
- filter
- media
- metatag
- navigation
- node
- path
- redirect
Expand All @@ -39,6 +40,7 @@ permissions:
- 'access contextual links'
- 'access files overview'
- 'access media overview'
- 'access navigation'
- 'access tokens overview'
- 'access toolbar'
- 'administer menu'
Expand Down
4 changes: 0 additions & 4 deletions css/toolbar.css

This file was deleted.

8 changes: 4 additions & 4 deletions docs/developer-guide/migration/migrate-7-8.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ drush updb
You should at least see the Thunder XXXX schema update. If not, double check that the correct version of Thunder
is installed, and that `drush updb` did not throw any errors.

Before you start with the code and database update please add the Slick module, the Blazy module and the Responsive
Preview module to your own composer.json. Both are no longer part of Thunder and can be removed after the update
was successfully executed.
Before you start with the code and database update please add the Slick module, the Blazy module, Admin Toolbar and the
Responsive Preview module to your own composer.json. All are no longer part of Thunder and can be removed after the
update was successfully executed.

```bash
composer require drupal/blazy drupal/slick drupal/responsive_preview
composer require drupal/blazy drupal/slick drupal/responsive_preview drupal/admin_toolbar
```

Also, if you have jquery_ui, jquery_ui_draggable or default_content enabled, you have to
Expand Down
2 changes: 1 addition & 1 deletion tests/src/Functional/Integration/AdminToolbarTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function testEmptyMenuEntriesAreGone(): void {
$this->assertSession()->elementNotExists('css', 'nav a[href="/admin/config/development"]');
$this->assertSession()->elementNotExists('css', 'nav a[href="/admin/config/media"]');

$this->assertSession()->elementExists('css', 'nav a[href="/admin/config/search"]');
$this->assertSession()->elementExists('css', 'nav a[href="/admin/config/search/redirect"]');
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public function testGalleryCollapse(): void {
// Test saving inline entity form when collapsing paragraph form.
$node = $this->loadNodeByUuid('36b2e2b2-3df0-43eb-a282-d792b0999c07');
$this->drupalGet($node->toUrl('edit-form'));
$this->getSession()->getPage()->find('css', '[data-drupal-selector="edit-actions"] .meta-sidebar__trigger')->click();

// Edit gallery paragraph.
$this->clickDrupalSelector('field-paragraphs-0-edit-2');
Expand Down
3 changes: 1 addition & 2 deletions thunder.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ install:
- drupal:inline_form_errors
- drupal:media_library
- drupal:menu_ui
- drupal:navigation
- drupal:language
- drupal:options
- drupal:path
Expand All @@ -45,8 +46,6 @@ install:
- drupal:views_ui
# contrib
- access_unpublished:access_unpublished
- admin_toolbar:admin_toolbar_tools
- admin_toolbar:admin_toolbar_links_access_filter
- autosave_form:autosave_form
- autofill:autofill
- content_lock:content_lock
Expand Down
5 changes: 0 additions & 5 deletions thunder.libraries.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
toolbar.icon:
css:
theme:
css/toolbar.css: {}

module.configure.form:
css:
theme:
Expand Down
9 changes: 0 additions & 9 deletions thunder.profile
Original file line number Diff line number Diff line change
Expand Up @@ -154,15 +154,6 @@ function thunder_page_attachments(array &$attachments): void {
}
}

/**
* Implements hook_library_info_alter().
*/
function thunder_toolbar_alter(array &$items): void {
if (!empty($items['admin_toolbar_tools'])) {
$items['admin_toolbar_tools']['#attached']['library'][] = 'thunder/toolbar.icon';
}
}

/**
* Implements hook_field_widget_info_alter().
*/
Expand Down
Loading