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

Merge Queue tweaks #8591

Merged
merged 7 commits into from
Dec 14, 2023
Merged

Merge Queue tweaks #8591

merged 7 commits into from
Dec 14, 2023

Conversation

Eds-Dbug
Copy link
Contributor

@Eds-Dbug Eds-Dbug commented Dec 5, 2023

Closes #

a.) Removes top of page pagination.
b.) Removes the "Show requests that I've reviewed" and "Show my requests" at the top of the page.
c.) Makes the make the MR title a link to preview the merge without assigning.

Technical

Changes in merge_request_table.html only

Testing

Mostly visual. Will update next section with images.

Screenshot

Will update

Stakeholders

@mekarpeles @jimchamp

Copy link
Collaborator

@jimchamp jimchamp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Eds-Dbug. I've added some review notes.

Adding a link to the merge page is a little more involved than just nesting the title in an anchor element, for a couple of reasons:

  1. When unauthenticated, the author and work merge pages return 404s and 403s, respectively. I didn't check, but I suspect that the same will be true for authenticated patrons who are not members of either the librarians, super-librarians, or admin usergroups.
  2. mrid is necessary to close merge requests. If a super-librarian clicks a title link, and then clicks the merge button, the corresponding merge request will not be closed. Worse still, resubmitting a work or author merge has unknown, but potentially very harmful, effects.

Item 1 is easy enough to fix, but item 2 will likely require some community discussion to come up with a good solution.

Go ahead and remove that link for now.

@@ -5,6 +5,7 @@
import web

from openlibrary import accounts
from math import ceil
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
from math import ceil

Remove unused import.

@@ -26,7 +26,7 @@
$# End : Status dot indicator

<div class="mr-details">
$:_('<span class="mr-details__request-title">%(title)s</span>', title=request_title)
$:_('<span class="mr-details__request-title"><a href="%(url)s" target="_blank">%(title)s</a></span>', title=request_title, url=request["url"])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$:_('<span class="mr-details__request-title"><a href="%(url)s" target="_blank">%(title)s</a></span>', title=request_title, url=request["url"])
<span class="mr-details__request-title">$request_title</span>

Remove link. Render span itself --- there's nothing to translate, so no need to use gettext here.

@jimchamp jimchamp added the Needs: Submitter Input Waiting on input from the creator of the issue/pr [managed] label Dec 13, 2023
@Eds-Dbug
Copy link
Contributor Author

Eds-Dbug commented Dec 13, 2023 via email

@jimchamp jimchamp added On testing.openlibrary.org This PR has been deployed to testing.openlibrary.org for testing and removed Needs: Submitter Input Waiting on input from the creator of the issue/pr [managed] labels Dec 14, 2023
Copy link
Collaborator

@jimchamp jimchamp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm. Thanks, @Eds-Dbug.

image

@jimchamp jimchamp merged commit 9a25a77 into internetarchive:master Dec 14, 2023
3 checks passed
@jimchamp jimchamp removed the On testing.openlibrary.org This PR has been deployed to testing.openlibrary.org for testing label Dec 14, 2023
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

Successfully merging this pull request may close these issues.

2 participants