Skip to content

Commit

Permalink
Merge pull request #4465 from blesildaramirez/i10444
Browse files Browse the repository at this point in the history
pkp/pkp-lib#10444 [OJS] Improve dialog component design
  • Loading branch information
blesildaramirez authored Nov 17, 2024
2 parents 0345392 + 05ece37 commit 48841b4
Show file tree
Hide file tree
Showing 24 changed files with 32 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ public function initialize($request, $args = null)
new AjaxModal(
$request->getRouter()->url($request, null, null, 'addGalley', null, $this->getRequestArgs()),
__('submission.layout.newGalley'),
'modal_add_item'
),
__('grid.action.addGalley'),
'add_item'
Expand Down
3 changes: 1 addition & 2 deletions controllers/grid/articleGalleys/ArticleGalleyGridRow.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ public function initialize($request, $template = null)
new AjaxModal(
$router->url($request, null, null, 'editGalley', null, $actionArgs),
($this->_isEditable) ? __('submission.layout.editGalley') : __('submission.layout.viewGalley'),
'modal_edit'
),
($this->_isEditable) ? __('grid.action.edit') : __('grid.action.view'),
'edit'
Expand Down Expand Up @@ -108,7 +107,7 @@ public function initialize($request, $template = null)
__('common.confirmDelete'),
__('grid.action.delete'),
$router->url($request, null, null, 'deleteGalley', null, $actionArgs),
'modal_delete'
'negative'
),
__('grid.action.delete'),
'delete'
Expand Down
1 change: 0 additions & 1 deletion controllers/grid/issueGalleys/IssueGalleyGridHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ public function initialize($request, $args = null)
array_merge($this->getRequestArgs(), ['gridId' => $this->getId()])
),
__('grid.action.addIssueGalley'),
'modal_add'
),
__('grid.action.addIssueGalley'),
'add_category'
Expand Down
4 changes: 2 additions & 2 deletions controllers/grid/issueGalleys/IssueGalleyGridRow.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function initialize($request, $template = null)
array_merge($this->getRequestArgs(), ['issueGalleyId' => $issueGalleyId])
),
__('editor.issues.editIssueGalley'),
'modal_edit',
null,
true
),
__('grid.action.edit'),
Expand All @@ -94,7 +94,7 @@ public function initialize($request, $template = null)
null,
array_merge($this->getRequestArgs(), ['issueGalleyId' => $issueGalleyId])
),
'modal_delete'
'negative'
),
__('grid.action.delete'),
'delete'
Expand Down
1 change: 0 additions & 1 deletion controllers/grid/issues/FutureIssueGridHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ public function initialize($request, $args = null)
new AjaxModal(
$router->url($request, null, null, 'addIssue', null, ['gridId' => $this->getId()]),
__('grid.action.addIssue'),
'modal_manage'
),
__('grid.action.addIssue'),
'add_category'
Expand Down
2 changes: 1 addition & 1 deletion controllers/grid/issues/IssueGridCellProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function getCellActions($request, $row, $column, $position = GridHandler:
new AjaxModal(
$router->url($request, null, null, 'editIssue', null, ['issueId' => $issue->getId()]),
__('editor.issues.editIssue', ['issueIdentification' => htmlspecialchars($issue->getIssueIdentification())]),
'modal_edit',
null,
true
),
$issue->getIssueIdentification()
Expand Down
9 changes: 4 additions & 5 deletions controllers/grid/issues/IssueGridRow.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function initialize($request, $template = null)
new AjaxModal(
$router->url($request, null, null, 'editIssue', null, ['issueId' => $issueId]),
__('editor.issues.editIssue', ['issueIdentification' => htmlspecialchars($issue->getIssueIdentification())]),
'modal_edit',
null,
true
),
__('grid.action.edit'),
Expand Down Expand Up @@ -81,7 +81,7 @@ public function initialize($request, $template = null)
__('editor.issues.confirmUnpublish'),
__('editor.issues.unpublishIssue'),
$router->url($request, null, null, 'unpublishIssue', null, ['issueId' => $issueId]),
'modal_delete'
'negative'
),
__('editor.issues.unpublishIssue'),
'delete'
Expand All @@ -101,7 +101,6 @@ public function initialize($request, $template = null)
['issueId' => $issueId]
),
__('editor.issues.publishIssue'),
'modal_confirm'
),
__('editor.issues.publishIssue'),
'advance'
Expand All @@ -120,7 +119,7 @@ public function initialize($request, $template = null)
__('editor.issues.confirmSetCurrentIssue'),
__('editor.issues.currentIssue'),
$router->url($request, null, null, 'setCurrentIssue', null, ['issueId' => $issueId]),
'modal_delete'
'primary'
),
__('editor.issues.currentIssue'),
'delete'
Expand All @@ -136,7 +135,7 @@ public function initialize($request, $template = null)
__('common.confirmDelete'),
__('grid.action.delete'),
$router->url($request, null, null, 'deleteIssue', null, ['issueId' => $issueId]),
'modal_delete'
'negative'
),
__('grid.action.delete'),
'delete'
Expand Down
2 changes: 1 addition & 1 deletion controllers/grid/issues/form/IssueForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public function fetch($request, $template = null, $display = false)
'issueId' => $this->issue->getId(),
]
),
'modal_delete'
'negative'
),
__('common.delete'),
null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ public function getCellActions($request, $row, $column, $position = GridHandler:
'activateSection',
null,
['sectionKey' => $row->getId()]
)
),
'primary'
)
)];
} else {
Expand All @@ -85,7 +86,8 @@ public function getCellActions($request, $row, $column, $position = GridHandler:
'deactivateSection',
null,
['sectionKey' => $row->getId()]
)
),
'negative'
)
)];
}
Expand Down
1 change: 0 additions & 1 deletion controllers/grid/settings/sections/SectionGridHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ public function initialize($request, $args = null)
new AjaxModal(
$router->url($request, null, null, 'addSection', null, ['gridId' => $this->getId()]),
__('manager.sections.create'),
'modal_manage'
),
__('manager.sections.create'),
'add_section'
Expand Down
4 changes: 2 additions & 2 deletions controllers/grid/settings/sections/SectionGridRow.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, 'editSection', null, ['sectionId' => $sectionId]),
__('grid.action.edit'),
'modal_edit',
null,
true
),
__('grid.action.edit'),
Expand All @@ -62,7 +62,7 @@ public function initialize($request, $template = null)
__('manager.sections.confirmDelete'),
__('grid.action.delete'),
$router->url($request, null, null, 'deleteSection', null, ['sectionId' => $sectionId]),
'modal_delete'
'negative'
),
__('grid.action.delete'),
'delete'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public function getCellActions($request, $row, $column, $position = GridHandler:
'edit',
new AjaxModal(
$dispatcher->url($request, PKPApplication::ROUTE_COMPONENT, null, 'grid.issues.BackIssueGridHandler', 'editIssue', null, ['issueId' => $issue->getId()]),
__('plugins.importexport.common.settings.DOIPluginSettings')
__('plugins.importexport.common.settings.DOIPluginSettings'),
),
$issue->getIssueIdentification(),
null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public function initialize($request, $args = null)
new AjaxModal(
$router->url($request, null, null, 'addSubscriptionType', null, null),
__('manager.subscriptionTypes.create'),
'modal_add_subscription_type',
null,
true
),
__('manager.subscriptionTypes.create'),
Expand Down
4 changes: 2 additions & 2 deletions controllers/grid/subscriptions/SubscriptionTypesGridRow.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function initialize($request, $template = null)
new AjaxModal(
$router->url($request, null, null, 'editSubscriptionType', null, $actionArgs),
__('manager.subscriptionTypes.edit'),
'modal_edit',
null,
true
),
__('common.edit'),
Expand All @@ -72,7 +72,7 @@ public function initialize($request, $template = null)
__('manager.subscriptionTypes.confirmDelete'),
__('common.delete'),
$router->url($request, null, null, 'deleteSubscriptionType', null, $actionArgs),
'modal_delete'
'negative'
),
__('grid.action.delete'),
'delete'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public function initialize($request, $args = null)
new AjaxModal(
$router->url($request, null, null, 'addSubscription', null, null),
__('manager.subscriptions.create'),
'modal_add_subscription',
null,
true
),
__('manager.subscriptions.create'),
Expand Down
6 changes: 3 additions & 3 deletions controllers/grid/subscriptions/SubscriptionsGridRow.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function initialize($request, $template = null)
new AjaxModal(
$router->url($request, null, null, 'editSubscription', null, $actionArgs),
__('manager.subscriptions.edit'),
'modal_edit',
null,
true
),
__('common.edit'),
Expand All @@ -81,7 +81,7 @@ public function initialize($request, $template = null)
'institutional' => $element instanceof InstitutionalSubscription ? 1 : 0
])
),
'modal_delete'
'primary'
),
__('manager.subscriptions.renew'),
'renew'
Expand All @@ -94,7 +94,7 @@ public function initialize($request, $template = null)
__('subscriptionManager.subscription.confirmRemove'),
__('common.delete'),
$router->url($request, null, null, 'deleteSubscription', null, $actionArgs),
'modal_delete'
'negative'
),
__('grid.action.delete'),
'delete'
Expand Down
2 changes: 1 addition & 1 deletion controllers/grid/toc/TocGridRow.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function initialize($request, $template = null)
__('editor.article.remove.confirm'),
__('grid.action.removeArticle'),
$router->url($request, null, null, 'removeArticle', null, ['articleId' => $this->getId(), 'issueId' => $this->issueId]),
'modal_delete'
'negative'
),
__('editor.article.remove'),
'delete'
Expand Down
2 changes: 1 addition & 1 deletion lib/pkp
Submodule pkp updated 77 files
+0 −1 classes/controllers/grid/plugins/PluginGridHandler.php
+0 −1 classes/controllers/grid/users/reviewer/PKPReviewerGridHandler.php
+2 −0 classes/form/FormBuilderVocabulary.php
+3 −3 classes/linkAction/request/AjaxModal.php
+3 −4 classes/linkAction/request/ConfirmationModal.php
+3 −4 classes/linkAction/request/JsEventConfirmationModal.php
+8 −8 classes/linkAction/request/Modal.php
+3 −4 classes/linkAction/request/RedirectConfirmationModal.php
+3 −4 classes/linkAction/request/RemoteActionConfirmationModal.php
+1 −1 classes/plugins/PKPPubIdPlugin.php
+2 −2 classes/submission/reviewer/form/PKPReviewerReviewStep1Form.php
+56 −130 composer.lock
+0 −1 controllers/api/file/linkAction/BaseAddFileLinkAction.php
+1 −1 controllers/api/file/linkAction/DeleteFileLinkAction.php
+0 −1 controllers/api/file/linkAction/EditFileLinkAction.php
+0 −1 controllers/api/task/SendReminderLinkAction.php
+0 −1 controllers/api/task/SendThankYouLinkAction.php
+1 −1 controllers/confirmationModal/linkAction/ViewCompetingInterestGuidelinesLinkAction.php
+1 −1 controllers/confirmationModal/linkAction/ViewReviewGuidelinesLinkAction.php
+1 −1 controllers/grid/admin/context/ContextGridHandler.php
+4 −3 controllers/grid/admin/context/ContextGridRow.php
+1 −1 controllers/grid/announcements/AnnouncementTypeGridHandler.php
+2 −2 controllers/grid/announcements/AnnouncementTypeGridRow.php
+0 −1 controllers/grid/eventLog/linkAction/EmailLinkAction.php
+0 −1 controllers/grid/files/LibraryFileGridHandler.php
+1 −2 controllers/grid/files/LibraryFileGridRow.php
+0 −1 controllers/grid/files/fileList/linkAction/SelectFilesLinkAction.php
+0 −2 controllers/grid/files/submissionDocuments/SubmissionDocumentsFilesGridHandler.php
+4 −2 controllers/grid/languages/LanguageGridCellProvider.php
+4 −2 controllers/grid/languages/LanguageGridRow.php
+1 −1 controllers/grid/navigationMenus/NavigationMenuItemsGridHandler.php
+2 −2 controllers/grid/navigationMenus/NavigationMenuItemsGridRow.php
+1 −1 controllers/grid/navigationMenus/NavigationMenusGridHandler.php
+2 −2 controllers/grid/navigationMenus/NavigationMenusGridRow.php
+1 −1 controllers/grid/plugins/PluginGalleryGridCellProvider.php
+1 −1 controllers/grid/plugins/PluginGalleryGridHandler.php
+2 −1 controllers/grid/plugins/PluginGridCellProvider.php
+1 −2 controllers/grid/plugins/PluginGridRow.php
+1 −3 controllers/grid/queries/QueriesGridHandler.php
+1 −2 controllers/grid/queries/QueriesGridRow.php
+1 −1 controllers/grid/queries/QueryNotesGridRow.php
+0 −1 controllers/grid/queries/QueryTitleGridColumn.php
+0 −1 controllers/grid/settings/category/CategoryCategoryGridHandler.php
+1 −2 controllers/grid/settings/category/CategoryGridCategoryRow.php
+3 −2 controllers/grid/settings/category/CategoryGridRow.php
+2 −2 controllers/grid/settings/genre/GenreGridHandler.php
+2 −2 controllers/grid/settings/genre/GenreGridRow.php
+3 −2 controllers/grid/settings/reviewForms/ReviewFormElementGridRow.php
+1 −1 controllers/grid/settings/reviewForms/ReviewFormElementsGridHandler.php
+4 −2 controllers/grid/settings/reviewForms/ReviewFormGridCellProvider.php
+1 −1 controllers/grid/settings/reviewForms/ReviewFormGridHandler.php
+6 −4 controllers/grid/settings/reviewForms/ReviewFormGridRow.php
+0 −1 controllers/grid/settings/roles/UserGroupGridHandler.php
+2 −2 controllers/grid/settings/roles/UserGroupGridRow.php
+1 −1 controllers/grid/settings/user/UserGridHandler.php
+9 −8 controllers/grid/settings/user/UserGridRow.php
+0 −1 controllers/grid/users/author/AuthorGridHandler.php
+2 −3 controllers/grid/users/author/AuthorGridRow.php
+2 −1 controllers/grid/users/exportableUsers/ExportableUsersGridHandler.php
+2 −9 controllers/grid/users/reviewer/ReviewerGridRow.php
+0 −1 controllers/grid/users/stageParticipant/StageParticipantGridHandler.php
+3 −3 controllers/grid/users/stageParticipant/StageParticipantGridRow.php
+0 −1 controllers/grid/users/stageParticipant/linkAction/NotifyLinkAction.php
+0 −1 controllers/informationCenter/linkAction/FileInfoCenterLinkAction.php
+0 −1 controllers/modals/review/ReviewerViewMetadataLinkAction.php
+0 −1 controllers/review/linkAction/ReviewNotesLinkAction.php
+1 −1 controllers/review/linkAction/UnconsiderReviewLinkAction.php
+2 −1 controllers/wizard/fileUpload/form/PKPSubmissionFilesUploadBaseForm.php
+1 −1 cypress/support/commands.js
+1 −1 cypress/support/commands_new_workflow.js
+4 −2 js/controllers/modal/ConfirmationModalHandler.js
+0 −1 templates/authorDashboard/submissionEmails.tpl
+1 −1 templates/controllers/informationCenter/note.tpl
+3 −1 templates/form/formButtons.tpl
+3 −2 templates/linkAction/buttonConfirmationLinkAction.tpl
+1 −1 templates/reviewer/review/step3.tpl
+1 −1 templates/user/identityForm.tpl
2 changes: 1 addition & 1 deletion lib/ui-library
Submodule ui-library updated 37 files
+1 −0 src/components/ActionPanel/ActionPanel.stories.js
+1 −0 src/components/Composer/Composer.vue
+2 −0 src/components/Container/DecisionPage.vue
+4 −1 src/components/Container/ManageEmailsPage.vue
+2 −0 src/components/Container/SubmissionWizardPage.vue
+4 −2 src/components/Container/WorkflowPage.vue
+1 −0 src/components/Form/context/NotifyUsersForm.vue
+3 −2 src/components/Form/fields/FieldOrcid.vue
+2 −1 src/components/Form/fields/FieldShowEnsuringLink.vue
+2 −2 src/components/ListPanel/announcements/AnnouncementsListPanel.vue
+1 −0 src/components/ListPanel/contributors/ContributorsListPanel.vue
+2 −1 src/components/ListPanel/doi/DoiListItem.vue
+2 −1 src/components/ListPanel/doi/DoiListPanel.vue
+2 −2 src/components/ListPanel/highlights/HighlightsListPanel.vue
+2 −2 src/components/ListPanel/institutions/InstitutionsListPanel.vue
+2 −2 src/components/ListPanel/submissionFiles/SubmissionFilesListPanel.vue
+2 −2 src/components/ListPanel/submissions/SubmissionsListItem.vue
+9 −0 src/components/Modal/Dialog.mdx
+150 −0 src/components/Modal/Dialog.stories.js
+78 −25 src/components/Modal/Dialog.vue
+1 −117 src/components/Modal/Modal.vue
+1 −0 src/composables/useModal.mdx
+8 −7 src/managers/FileManager/useFileManagerActions.js
+9 −8 src/managers/GalleyManager/useGalleyManagerActions.js
+16 −14 src/managers/ParticipantManager/useParticipantManagerActions.js
+16 −14 src/managers/ReviewerManager/useReviewerManagerActions.js
+3 −2 src/managers/UserInvitationManager/UserInvitationManagerStore.js
+1 −0 src/mixins/ajaxError.js
+1 −0 src/mixins/autosave.js
+3 −1 src/mixins/dialog.mdx
+3 −0 src/pages/acceptInvitation/AcceptInvitationPageStore.js
+2 −0 src/pages/userInvitation/UserInvitationPageStore.js
+1 −0 src/pages/userInvitation/UserInvitationUserGroupsTable.vue
+1 −0 src/pages/workflow/components/publication/WorkflowPublicationJats.vue
+1 −0 src/pages/workflow/components/publication/WorkflowPublicationSectionJats.vue
+6 −3 src/pages/workflow/composables/useWorkflowActions.js
+1 −0 src/stores/modalStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public function getActions($request, $verb)
'settings',
new AjaxModal(
$router->url($request, null, null, 'manage', null, ['verb' => 'settings', 'plugin' => $this->getName(), 'category' => 'generic']),
$this->getDisplayName()
$this->getDisplayName(),
),
__('manager.plugins.settings'),
null
Expand Down
4 changes: 2 additions & 2 deletions plugins/pubIds/urn/URNPubIdPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ public function getLinkActions($pubObject)
__('plugins.pubIds.urn.editor.clearObjectsURN.confirm'),
__('common.delete'),
$request->url(null, null, 'clearPubId', null, $userVars),
'modal_delete'
'negative'
),
__('plugins.pubIds.urn.editor.clearObjectsURN'),
'delete',
Expand All @@ -226,7 +226,7 @@ public function getLinkActions($pubObject)
__('plugins.pubIds.urn.editor.clearIssueObjectsURN.confirm'),
__('common.delete'),
$request->url(null, null, 'clearIssueObjectsPubIds', null, $userVars),
'modal_delete'
'negative'
),
__('plugins.pubIds.urn.editor.clearIssueObjectsURN'),
'delete',
Expand Down
2 changes: 1 addition & 1 deletion plugins/pubIds/urn/classes/form/URNSettingsForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public function __construct($plugin, $contextId)
__('plugins.pubIds.urn.manager.settings.urnReassign.confirm'),
__('common.delete'),
$request->url(null, null, 'manage', null, ['verb' => 'clearPubIds', 'plugin' => $plugin->getName(), 'category' => 'pubIds']),
'modal_delete'
'negative'
),
__('plugins.pubIds.urn.manager.settings.urnReassign'),
'delete'
Expand Down

0 comments on commit 48841b4

Please sign in to comment.