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 [OMP] Improve dialog component design #1726

Open
wants to merge 4 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
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ public function initialize($request, $args = null)
new AjaxModal(
$router->url($request, null, null, 'addCode', null, $actionArgs),
__('grid.action.addCode'),
'modal_add_item'
),
__('grid.action.addCode'),
'add_item'
Expand Down
3 changes: 1 addition & 2 deletions controllers/grid/catalogEntry/IdentificationCodeGridRow.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ public function initialize($request, $template = null)
new AjaxModal(
$router->url($request, null, null, 'editCode', null, $actionArgs),
__('grid.action.edit'),
'modal_edit'
),
__('grid.action.edit'),
'edit'
Expand All @@ -88,7 +87,7 @@ public function initialize($request, $template = null)
__('common.confirmDelete'),
__('common.delete'),
$router->url($request, null, null, 'deleteCode', null, $actionArgs),
'modal_delete'
'negative'
),
__('grid.action.delete'),
'delete'
Expand Down
1 change: 0 additions & 1 deletion controllers/grid/catalogEntry/MarketsGridHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ public function initialize($request, $args = null)
new AjaxModal(
$router->url($request, null, null, 'addMarket', null, $actionArgs),
__('grid.action.addMarket'),
'modal_add_item'
),
__('grid.action.addMarket'),
'add_item'
Expand Down
3 changes: 1 addition & 2 deletions controllers/grid/catalogEntry/MarketsGridRow.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ public function initialize($request, $template = null)
new AjaxModal(
$router->url($request, null, null, 'editMarket', null, $actionArgs),
__('grid.action.edit'),
'modal_edit'
),
__('grid.action.edit'),
'edit'
Expand All @@ -89,7 +88,7 @@ public function initialize($request, $template = null)
__('common.confirmDelete'),
__('common.delete'),
$router->url($request, null, null, 'deleteMarket', null, $actionArgs),
'modal_delete'
'negative'
),
__('grid.action.delete'),
'delete'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ public function initialize($request, $args = null)
new AjaxModal(
$router->url($request, null, null, 'addDate', null, $actionArgs),
__('grid.action.addDate'),
'modal_add_item'
),
__('grid.action.addDate'),
'add_item'
Expand Down
3 changes: 1 addition & 2 deletions controllers/grid/catalogEntry/PublicationDateGridRow.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ public function initialize($request, $template = null)
new AjaxModal(
$router->url($request, null, null, 'editDate', null, $actionArgs),
__('grid.action.edit'),
'modal_edit'
),
__('grid.action.edit'),
'edit'
Expand All @@ -91,7 +90,7 @@ public function initialize($request, $template = null)
__('common.confirmDelete'),
__('common.delete'),
$router->url($request, null, null, 'deleteDate', null, $actionArgs),
'modal_delete'
'negative'
),
__('grid.action.delete'),
'delete'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ public function initialize($request, $template = null)
new AjaxModal(
$router->url($request, null, null, 'editFormat', null, $actionArgs),
__('grid.action.edit'),
'modal_edit'
),
__('grid.action.edit'),
'edit'
Expand All @@ -112,7 +111,7 @@ public function initialize($request, $template = null)
__('common.confirmDelete'),
__('common.delete'),
$router->url($request, null, null, 'deleteFormat', null, $actionArgs),
'modal_delete'
'negative'
),
__('grid.action.delete'),
'delete'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public function getCellActions($request, $row, $column, $position = GridHandler:
'publicationId' => $data->getData('publicationId'),
]
),
'modal_approve'
$data->getIsAvailable() ? 'negative' : 'primary'
),
$data->getIsAvailable() ? __('grid.catalogEntry.isAvailable') : __('grid.catalogEntry.isNotAvailable'),
$data->getIsAvailable() ? 'complete' : 'incomplete',
Expand Down Expand Up @@ -230,7 +230,6 @@ public function getCellActions($request, $row, $column, $position = GridHandler:
]
),
__('grid.catalogEntry.approvedRepresentation.title'),
'modal_approve'
),
$data->getIsApproved() ? __('submission.complete') : __('submission.incomplete'),
$data->getIsApproved() ? 'complete' : 'incomplete',
Expand Down Expand Up @@ -261,7 +260,6 @@ public function getCellActions($request, $row, $column, $position = GridHandler:
'representationId' => $submissionFile->getData('assocId'),
]),
__('editor.monograph.approvedProofs.edit'),
'edit'
),
__($salesTypeString),
$salesType
Expand All @@ -288,7 +286,6 @@ public function getCellActions($request, $row, $column, $position = GridHandler:
]
),
$title,
'modal_approve'
),
$submissionFile->getViewable() ? __('grid.catalogEntry.availableRepresentation.approved') : __('grid.catalogEntry.availableRepresentation.notApproved'),
$submissionFile->getViewable() ? 'complete' : 'incomplete',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ public function initialize($request, $args = null)
new AjaxModal(
$router->url($request, null, null, 'addFormat', null, $actionArgs),
__('grid.action.addFormat'),
'modal_add_item'
),
__('grid.action.addFormat'),
'add_item'
Expand Down
1 change: 0 additions & 1 deletion controllers/grid/catalogEntry/PublicationFormatGridRow.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ public function initialize($request, $template = 'controllers/grid/gridRow.tpl')
]
)),
__('submission.dependentFiles'),
'modal_edit'
),
__('submission.dependentFiles'),
'edit'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ public function initialize($request, $args = null)
new AjaxModal(
$router->url($request, null, null, 'addRepresentative', null, $actionArgs),
__('grid.action.addRepresentative'),
'modal_add_item'
),
__('grid.action.addRepresentative'),
'add_item'
Expand Down
3 changes: 1 addition & 2 deletions controllers/grid/catalogEntry/RepresentativesGridRow.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ public function initialize($request, $template = null)
new AjaxModal(
$router->url($request, null, null, 'editRepresentative', null, $actionArgs),
__('grid.action.edit'),
'modal_edit'
),
__('grid.action.edit'),
'edit'
Expand All @@ -83,7 +82,7 @@ public function initialize($request, $template = null)
__('common.confirmDelete'),
__('common.delete'),
$router->url($request, null, null, 'deleteRepresentative', null, $actionArgs),
'modal_delete'
'negative'
),
__('grid.action.delete'),
'delete'
Expand Down
1 change: 0 additions & 1 deletion controllers/grid/catalogEntry/SalesRightsGridHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ public function initialize($request, $args = null)
new AjaxModal(
$router->url($request, null, null, 'addRights', null, $actionArgs),
__('grid.action.addRights'),
'modal_add_item'
),
__('grid.action.addRights'),
'add_item'
Expand Down
3 changes: 1 addition & 2 deletions controllers/grid/catalogEntry/SalesRightsGridRow.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ public function initialize($request, $template = null)
new AjaxModal(
$router->url($request, null, null, 'editRights', null, $actionArgs),
__('grid.action.edit'),
'modal_edit'
),
__('grid.action.edit'),
'edit'
Expand All @@ -83,7 +82,7 @@ public function initialize($request, $template = null)
__('common.confirmDelete'),
__('common.delete'),
$router->url($request, null, null, 'deleteRights', null, $actionArgs),
'modal_delete'
'negative'
),
__('grid.action.delete'),
'delete'
Expand Down
6 changes: 4 additions & 2 deletions controllers/grid/settings/series/SeriesGridCellProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ public function getCellActions($request, $row, $column, $position = GridHandler:
'activateSeries',
null,
['seriesKey' => $row->getId()]
)
),
'primary'
)
)];
} else {
Expand All @@ -87,7 +88,8 @@ public function getCellActions($request, $row, $column, $position = GridHandler:
'deactivateSeries',
null,
['seriesKey' => $row->getId()]
)
),
'negative'
)
)];
}
Expand Down
1 change: 0 additions & 1 deletion controllers/grid/settings/series/SeriesGridHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ public function initialize($request, $args = null)
new AjaxModal(
$router->url($request, null, null, 'addSeries', null, ['gridId' => $this->getId()]),
__('grid.action.addSeries'),
'modal_manage'
),
__('grid.action.addSeries'),
'add_category'
Expand Down
3 changes: 1 addition & 2 deletions controllers/grid/settings/series/SeriesGridRow.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ public function initialize($request, $template = null)
new AjaxModal(
$router->url($request, null, null, 'editSeries', null, ['seriesId' => $seriesId]),
__('grid.action.edit'),
'modal_edit',
true
),
__('grid.action.edit'),
Expand All @@ -62,7 +61,7 @@ public function initialize($request, $template = null)
__('common.confirmDelete'),
__('grid.action.delete'),
$router->url($request, null, null, 'deleteSeries', null, ['seriesId' => $seriesId]),
'modal_delete'
'negative'
),
__('grid.action.delete'),
'delete'
Expand Down
2 changes: 1 addition & 1 deletion controllers/grid/users/chapter/ChapterGridCategoryRow.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public function initialize($request, $template = null)
__('common.confirmDelete'),
__('common.delete'),
$router->url($request, null, null, 'deleteChapter', null, $actionArgs),
'modal_delete'
'negative'
),
__('common.delete'),
'delete'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ public function getCellActions($request, $row, $column, $position = GridHandler:
new AjaxModal(
$router->url($request, null, null, 'editChapter', null, $actionArgs),
__('submission.chapter.editChapter'),
'modal_edit'
),
htmlspecialchars($chapter->getLocalizedTitle())
)
Expand Down
1 change: 0 additions & 1 deletion controllers/grid/users/chapter/ChapterGridHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ public function initialize($request, $args = null)
new AjaxModal(
$router->url($request, null, null, 'addChapter', null, $actionArgs),
__('submission.chapter.addChapter'),
'modal_add_item'
),
__('submission.chapter.addChapter'),
'add_item'
Expand Down
2 changes: 1 addition & 1 deletion lib/pkp
Submodule pkp updated 76 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
+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 33 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
+29 −25 src/components/Steps/Steps.vue
+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
+1 −0 src/mixins/ajaxError.js
+1 −0 src/mixins/autosave.js
+1 −0 src/pages/acceptInvitation/AcceptInvitationPageStore.js
+1 −0 src/pages/userInvitation/UserInvitationPageStore.js
+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
2 changes: 1 addition & 1 deletion plugins/blocks/browse/BrowseBlockPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function getActions($request, $actionArgs)
'settings',
new AjaxModal(
$router->url($request, null, null, 'manage', null, array_merge($actionArgs, ['verb' => 'settings'])),
$this->getDisplayName()
$this->getDisplayName(),
),
__('manager.plugins.settings'),
null
Expand Down
10 changes: 5 additions & 5 deletions plugins/pubIds/urn/URNPubIdPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,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 Down Expand Up @@ -351,8 +351,8 @@ public function addPublicationFormFields(string $hookName, FormComponent $form):
}
$form->addField(new FieldPubIdUrn('pub-id::other::urn', $fieldData));

// Otherwise add a field for manual entry that includes a button to generate
// the check number
// Otherwise add a field for manual entry that includes a button to generate
// the check number
} else {
$form->addField(new FieldTextUrn('pub-id::other::urn', [
'label' => __('plugins.pubIds.urn.displayName'),
Expand Down Expand Up @@ -383,7 +383,7 @@ public function addPublishFormNotice(string $hookName, FormComponent $form): voi
if (!$publicationUrnEnabled && !$chapterUrnEnabled && !$publicationFormatUrnEnabled && !$submissionFileUrnEnabled) {
return;

// Use a simplified view when only assigning to the publication
// Use a simplified view when only assigning to the publication
} elseif ($publicationFormatUrnEnabled && !$chapterUrnEnabled && !$publicationFormatUrnEnabled && !$submissionFileUrnEnabled) {
if ($form->publication->getData('pub-id::other::urn')) {
$msg = __('plugins.pubIds.urn.editor.preview.publication', ['urn' => $form->publication->getData('pub-id::other::urn')]);
Expand All @@ -396,7 +396,7 @@ public function addPublishFormNotice(string $hookName, FormComponent $form): voi
]));
return;

// Show a table if probably more than one URN is going to be created
// Show a table if probably more than one URN is going to be created
} else {
$urnTableRows = [];
if ($publicationUrnEnabled) {
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 @@ -108,7 +108,7 @@ public function __construct($plugin, int $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