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

pkp/pkp-lib#10444 Improve dialog component design #89

Open
wants to merge 5 commits into
base: main
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
2 changes: 1 addition & 1 deletion CustomBlockManagerPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public function getActions($request, $actionArgs): array
'category' => $this->getCategory(),
'action' => 'index'
]),
$this->getDisplayName()
$this->getDisplayName(),
);
return array_merge([new LinkAction('settings', $ajaxModal, __('plugins.generic.customBlockManager.manage'))], $actions);
}
Expand Down
1 change: 0 additions & 1 deletion controllers/grid/CustomBlockGridHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ public function initialize($request, $args = null)
new AjaxModal(
$router->url($request, null, null, 'addCustomBlock'),
__('plugins.generic.customBlockManager.addBlock'),
'modal_add_item'
),
__('plugins.generic.customBlockManager.addBlock'),
'add_item'
Expand Down
4 changes: 2 additions & 2 deletions controllers/grid/CustomBlockGridRow.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function initialize($request, $template = null)
new AjaxModal(
$router->url($request, null, null, 'editCustomBlock', null, ['blockName' => $blockName]),
__('grid.action.edit'),
'modal_edit',
null,
true
),
__('grid.action.edit'),
Expand All @@ -63,7 +63,7 @@ public function initialize($request, $template = null)
__('common.confirmDelete'),
__('grid.action.delete'),
$router->url($request, null, null, 'deleteCustomBlock', null, ['blockName' => $blockName]),
'modal_delete'
'negative'
),
__('grid.action.delete'),
'delete'
Expand Down
11 changes: 5 additions & 6 deletions cypress/tests/functional/CustomBlocks.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,11 @@ describe('Custom Block Manager plugin tests', function() {
cy.wait(500); // Make sure the form has closed
cy.get('[role="dialog"] button:contains(\'Close\')').click();

// FIXME: The settings area has to be reloaded before the new block will appear.a
// This click should be unnecessary.
cy.get('nav').contains('Settings').click();
// Ensure submenu item click despite animation
cy.get('nav').contains('Website').click({ force: true });
cy.get('#appearance > .pkpTabs > .pkpTabs__buttons > #appearance-setup-button').click();
cy.reload();
cy.waitJQuery();

cy.get('button[id="appearance-button"]').click();
cy.get('#appearance-setup-button').click();
cy.get('#appearance-setup span:contains("test-custom-block"):first').click();
cy.get('#appearance-setup button:contains("Save")').click();
cy.waitJQuery();
Expand Down