-
Notifications
You must be signed in to change notification settings - Fork 516
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
AO3-5502 Fix page title of the adult content warning for chapters #5012
base: master
Are you sure you want to change the base?
AO3-5502 Fix page title of the adult content warning for chapters #5012
Conversation
...looks like I inserted an extra empty line by accident but it looks better that way, can it stay? Rubocop is failing because of a line that I haven't changed, unrelated to this issue. (I think it could be satisfied by turning the negated if condition into an unless. Also it could return after access_denied and else wouldn't be needed and that whole block after it would have one less indentation level...) |
Thank you, the code looks good! Could you add a test in
What about going even further and turning it into this?
|
* AO3-5578 ActiveStorage copy script performance fixes * Flush $stdout to force message visibility
* AO3-5578 Avoid unnecessary DB writes when copying icons * Rubocop :fistshake:
Add a transaction
271fa22
to
a37d2e6
Compare
Hopefully the test is good, I'm new to this and seeing what looks like plain English sentences but is supposed to be automated was a bit intimidating
This doesn't work, I think it's because access_denied always returns false. I wasn't sure if it was okay for me to touch those lines because they aren't directly related to the issue, but this sounds like an approval, so I commited my idea, let me know if I need to undo/change that then Oops I forgot to put the AO3-5502 in my commit messages and tried to fix that and something scary happened. All these weird other commits used to be a "merged master into here" commit. I have no idea if there's a good way to fix this |
The wiki says I should ignore all Rubocop errors not related to lines I've changed but doesn't say what to do when Reviewdog seems to be complaining about the whole file... I'll stop here for now, waiting for advice before I proceed |
You're right! There's one spot in the code that does this anyway, which mislead me.
Yep, you're good! We try to keep changes to unrelated lines low because it makes reviewing harder, merge conflicts are more likely and so on. That goes especially for rubocop because fixing all the violations can become a bit of an endless endavour. But that's just a guideline, so it's okay to have exceptions sometimes, like here. I'd stop at this state in regards to rubocop and just tolerate the remaining errors instead of going down the rest of the rabbit hole. Regarding the commits, I think this may be a result of merge commit that was then rebased. There's likely some git magic to undo this, but the current state should be fine too. For the future, we prefer merge commits (or the occasional commit with a missing issue number) over rebasing/force pushing. Because we squash on merge those messups become pretty much invisible in the final git history anyway. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm approving this because the test and code works as-is. Thank you for contributing 🎉
However, I left some extra comments on the test since you said you're new to the tests. You don't have to address these if you'd rather not, they are nitpicks and not important in the grand scheme of things!
I don't mind the nitpicks, I'd rather do this now so that someone else doesn't have to think about the same stuff again in the future I've figured out I can configure my code editor to insert the final newline automatically so that shouldn't be an issue with my PRs anymore :) Glad to know the commit mess is okay, I'll try not to have that happen again |
Pull Request Checklist
as the first thing in your pull request title (e.g.
AO3-1234 Fix thing
)until they are reviewed and merged before creating new pull requests.
Issue
https://otwarchive.atlassian.net/browse/AO3-5502
Purpose
Fixes the page title on the adult content warning page for chapters of a work so that it's informative (has work title, chapter number, author and fandom) and consistent with the warning page for the whole work
Testing Instructions
See Jira ticket
References
none
Credit
slavalamp