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

Redesigned Dashboard & Workflow - Redirect rules #10670

Open
jardakotesovec opened this issue Dec 9, 2024 · 8 comments
Open

Redesigned Dashboard & Workflow - Redirect rules #10670

jardakotesovec opened this issue Dec 9, 2024 · 8 comments
Assignees
Milestone

Comments

@jardakotesovec
Copy link
Contributor

jardakotesovec commented Dec 9, 2024

Redirect rules

  • /index.php/publicknowledge/en/workflow/access/16 -> /index.php/publicknowledge/en/dashboard/editorial?workflowSubmissionId=16 (this is important for existing emails and tasks)
  • /index.php/publicknowledge/en/workflow/index/16/1 -> /index.php/publicknowledge/en/dashboard/editorial?workflowSubmissionId=16 (this is important for bookmarked links to workflow)
  • /index.php/publicknowledge/en/authorDashboard/submission/14 -> index.php/publicknowledge/en/dashboard/mySubmissions?workflowSubmissionId=16 (important for both emails and bookmarks)
  • /index.php/publicknowledge/en/submissions -> /index.php/publicknowledge/en/dashboard (might be important for some emails or bookmarks, not sure)
  • /index.php/publicknowledge/en/dashboard -> to specific dashboard based on role

Adjusted places in UI:

  1. Dashboard from the dropdown menu points to the correct dashboard (editorial, mySubmissions, reviewAssignments) url based on the user roles
Image
  1. Return url from the preview (Click on Preview button in Publication for submission in production stage) to point to the dashboard/editorial instead of /workflow
Image

Already adjusted places for new dashboard urls

Additional changes
ojs: pkp/ojs#4583
ui-library: pkp/ui-library#476
pkp-lib: #10782

@jardakotesovec jardakotesovec self-assigned this Dec 9, 2024
jardakotesovec added a commit to jardakotesovec/ui-library that referenced this issue Jan 5, 2025
jardakotesovec added a commit to jardakotesovec/pkp-lib that referenced this issue Jan 5, 2025
@jardakotesovec jardakotesovec changed the title Redesigned Workflow & Dashboard - redirect rules Redesigned Workflow & Dashboard - Redirect rules Jan 5, 2025
@jardakotesovec jardakotesovec changed the title Redesigned Workflow & Dashboard - Redirect rules Redesigned Dashboard & Workflow - Redirect rules Jan 5, 2025
@jardakotesovec
Copy link
Contributor Author

@asmecher Hi Alec,
would like to get second opinion on the workflow redirects.

For author we do have following change
/index.php/publicknowledge/en/authorDashboard/submission/14 -> index.php/publicknowledge/en/dashboard/mySubmissions?workflowSubmissionId=16

And for editors:
/index.php/publicknowledge/en/workflow/access/16 -> /index.php/publicknowledge/en/dashboard/editorial?workflowSubmissionId=16

At first I intended to change all places to just point to the new location, including emails and notifications. But feels bit risky to rely on the new url with query parameter long term. For example if we eventually decide to have also dedicated page for workflow in future, it would be difficult to introduce another redirect. So I was thinking that maybe it would be nice to keep dedicated url for submission workflow page. I could just change the links that are directly in our UI to avoid unnecessary redirect, but keep the old urls for the notifications&emails. What you think?

@asmecher
Copy link
Member

asmecher commented Jan 6, 2025

The /access URL was actually intended for something like you describe -- it just redirects to the appropriate workflow page for the current workflow stage, given a submission ID.

There is also a close parallel when looking at Github Projects: try browsing to a project (e.g. https://github.com/orgs/pkp/projects/32/views/1) then opening an individual issue. The URL will change to something containing the issue's information as a query parameter, e.g. https://github.com/orgs/pkp/projects/32/views/1?pane=issue&itemId=33134637&issue=pkp%7Cpkp-lib%7C7495. This preserves both the page's real URL (the project) and the more specific item's view as a query parameter. I trust that this is a good decision.

If it comes down to it and we do later need to redirect, we can pretty easily write a handler to manage it; we already have some examples of that, e.g:

https://github.com/pkp/ojs/blob/6ae6498ab154fb62de69fff6464d1d736a9402a1/pages/article/ArticleHandler.php#L385..L399

In short, I don't think what you're proposing is problematic, but feel free to use a landing URL and a redirect if it makes you feel more comfortable. Personally I would suggest just using query parameters.

@jardakotesovec jardakotesovec added this to the 3.5.0 LTS milestone Jan 7, 2025
jardakotesovec added a commit to jardakotesovec/pkp-lib that referenced this issue Jan 8, 2025
jardakotesovec added a commit to jardakotesovec/pkp-lib that referenced this issue Jan 8, 2025
jardakotesovec added a commit to jardakotesovec/pkp-lib that referenced this issue Jan 8, 2025
jardakotesovec added a commit to jardakotesovec/pkp-lib that referenced this issue Jan 8, 2025
jardakotesovec added a commit to jardakotesovec/pkp-lib that referenced this issue Jan 8, 2025
jardakotesovec added a commit to jardakotesovec/ui-library that referenced this issue Jan 8, 2025
@jardakotesovec
Copy link
Contributor Author

@asmecher Also having older url in some places can be confusing for devs - and probably considered as missed update. Going with updating 'all urls' I was able to identify in the codebase.

@jonasraoni Hi Jonas, could you please have a look? Its quite tricky to test all these individual changes - so second pair of eyes could greatly help with reducing any slips. Thank you!

jardakotesovec added a commit to jardakotesovec/pkp-lib that referenced this issue Jan 14, 2025
jardakotesovec added a commit to jardakotesovec/pkp-lib that referenced this issue Jan 14, 2025
jardakotesovec added a commit to jardakotesovec/pkp-lib that referenced this issue Jan 14, 2025
jardakotesovec added a commit that referenced this issue Jan 14, 2025
* #10670 Update urls to new dashboard and workflow page
jardakotesovec added a commit to jardakotesovec/omp that referenced this issue Jan 14, 2025
jardakotesovec added a commit to pkp/ops that referenced this issue Jan 14, 2025
@Tribunal33
Copy link

Tribunal33 commented Jan 15, 2025

@jardakotesovec Wondering about incomplete submissions. If there was a /workflow/access/46/1 and submission 46 is an incomplete. Should it go to the workflow page? When you click on view it redirects to /en/submission?id=46#files for example.

One other one I found was if you go deeper into a submission from 3.4 with a publication section like Galley it doesn't open up the equivalent for example : /workflow/index/6/5#publication/galleys doesn’t open up the right workflow -> /dashboard/editorial?workflowSubmissionId=6&currentViewId=assigned-to-me&workflowMenuKey=workflow_5#publication/galleys

Image

@Tribunal33
Copy link

Tribunal33 commented Jan 15, 2025

Here are the tests I tried based on the requirements in this ticket. I also asked @pmangahis if there were any popuplar links I could use.

Test Case Overview

  1. Try, /en/workflow/access/16 -> redirect to /en/dashboard/editorial?workflowSubmissionId=16
  2. Try, /en/workflow/access/16/1 -> redirect to /en/dashboard/editorial?workflowSubmissionId=16
  3. Try logging in as the author and try, /en/authorDashboard/submission/14 which will redirect to /en/dashboard/mySubmissions?workflowSubmissionId=14
  4. Try, /en/submissions -> redirect to /en/dashboard
  5. Try, base case /en/dashboard -> Should redirect to specific dashboard for the role that is logged in.
    a. Can try various user roles. No requirements but should be similar to dashboard link
  6. Try viewing the preview for a submission. The view submission link should return to /dashboard/editorial not /workflow
  7. Can try unauthorized user access for a particular submission they wouldn't be able to see
    a. /en/workflow/access/16 -> redirect to /en/user/authorizationDenied?message=user.authorization.accessibleWorkflowStage
  8. Potential issues
    a. Incomplete (/en/submission?id=46#files) if submission 46 was incomplete
    b. /workflow/index/6/5#publication/galleys doesn’t open up the right workflow -> /dashboard/editorial?workflowSubmissionId=6&currentViewId=assigned-to-me&workflowMenuKey=workflow_5#publication/galleys
    c. See bugs that are children of this ticket. Essentially two routes /index.php/index and /index.php/ share a redirect loop problem

GaziYucel pushed a commit to GaziYucel/ui-library that referenced this issue Jan 15, 2025
@pmangahis
Copy link

Also suggested testing reviewer request URLs that are included in the Reviewer invitation email.

Submission URL: https://ojs33.workshop.publicknowledgeproject.org/index.php/JIW/reviewer/submission?submissionId=387

@Tribunal33
Copy link

@kaitlinnewson we talked about if there was a route list. If you could share one of those that would be great. I would like to alert @mreiko that to me this presents a bit of a risky change and I'm not sure how to triage this.

@jardakotesovec
Copy link
Contributor Author

jardakotesovec commented Jan 18, 2025

@Tribunal33

Potential issues
a. Incomplete (/en/submission?id=46#files) if submission 46 was incomplete

/workflow/access also does not handle incomplete submission and I think thats fine, because this could only happen if the user manually changes the submission id in the url. Otherwise he should not get such url to the workflow for incomplete submission

b. /workflow/index/6/5#publication/galleys doesn’t open up the right workflow -> /dashboard/editorial?workflowSubmissionId=6&currentViewId=assigned-to-me&workflowMenuKey=workflow_5#publication/galleys

I would suggest to consider this as minor inconvenience and keep it simple - as they can easily select the section in the menu and than update bookmark.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants