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 · 3 comments
Open

Redesigned Dashboard & Workflow - Redirect rules #10670

jardakotesovec opened this issue Dec 9, 2024 · 3 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!

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

2 participants