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

when accepting, offer to place {{Db-afc-move}} when the destination is a redirect #338

Conversation

NovemLinguae
Copy link
Member

@NovemLinguae NovemLinguae commented Apr 14, 2024

Feature

  • during accept, detect when the typed in new title is a redirect
  • display a red message about it and offer to tag the redirect for speedy deletion
    • image
  • if no is clicked, part of the offer message disappears
    • image
  • if yes is clicked, it 1) tags the page for {{Db-afc-move}}, 2) marks the draft as under review, 3) watchlists the redirect
    • image
    • image
  • admins will need a different workflow, but let's handle that in a future patch

In addition

  • fix a bug where you could still click the "accept" button even if the button was set to disabled. fixed via CSS pointer-events: 'none'. easier than removing then re-adding the click listener
  • add support for generating links with the URI ?redirect=no

Notes

  • didn't use addFormSubmitHandler( handleAcceptOverRedirect ) because we already did addFormSubmitHandler( handleAccept ), and it's buggy if you do it twice
  • I don't check if the redirect is already tagged with {{Db-afc-move}}, because if the redirect is tagged with this at the top (normal place for CSD tags), then it won't technically be a redirect anymore and our earlier check for "does page exist and is not a redirect?" will catch this

Fixes #243

NovemLinguae and others added 4 commits April 14, 2024 03:13
- during accept, detect when the typed in new title is a redirect with non-trivial history
- display a red message about it and offer to tag the redirect for speedy deletion
- if no is clicked, part of the offer message disappears
- if yes is clicked, it 1) tags the page for {{Db-afc-move}}, 2) marks the draft as under review, 3) watchlists the redirect

Fixes wikimedia-gadgets#243
@NovemLinguae NovemLinguae changed the title handle redirects with non-trivial history when accepting, offer to place {{Db-afc-move}} when the destination is a redirect Apr 17, 2024
@NovemLinguae NovemLinguae marked this pull request as ready for review April 19, 2024 00:33
@NovemLinguae NovemLinguae merged commit 56afc73 into wikimedia-gadgets:master Apr 23, 2024
2 checks passed
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.

Handle accepting over redirect with non-trivial history
1 participant