Redesign the small footer of a review and add a "Direct link" section #1357
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes Some Review toolbar features should be visible for logged-out users
This problem has bothered me for a while. It's not obvious that logged-out users can still access a review's main page and see the comments.
I reorganized the review footer and added a "Direct link" section to the footer to fix this. I considered making the title of the review, instead of the date, link to the review, but I decided not to change that. The dark mode color scheme of a visited link looked ugly on the title of a review. At any rate, since the "Direct link" section would be added to the footer, people can use that instead.
I removed some words from certain messages in the footer to save space and compensate for the extra space taken up by the "Direct link" section. I also changed the logic of when
Add a commentandView comments (x)show up, described in the last section here.Summary of changes:
[Edit: I missed author-created reviews the first time around. This has now been fixed. I've force-pushed my changes, and added new screenshots below.]
Screenshots before
Not logged in, viewing any review:

Logged in as admin, viewing a review you've voted helpful with no comments:

Logged in as admin, viewing a review you've voted helpful with 4 comments:

Logged in and viewing your own review with no comments:

Logged in and viewing your own review with 1 comment:

Not logged in, or logged in as admin, or logged in as a regular user, viewing a review by the game's author with no comments:

Not logged in, or logged in as admin, or logged in as a regular user, viewing a review by the game's author with 1 comment:

Screenshots after
Not logged in, viewing a review with no comments:

Not logged in, viewing a review with 4 comments:

Logged in as admin, viewing a review you've voted helpful with no comments:

Logged in as admin, viewing a review you've voted helpful with 4 comments:

Logged in and viewing your own review with no comments:

Logged in and viewing your own review with 1 comment:

Not logged in, viewing a review by the game's author with no comments:

Logged in, viewing a review by the game's author with no comments:

Not logged in, or logged in as admin, or logged in as a regular user, viewing a review by the game's author with 1 comment:

Note about
Add commentandView comments (x)Niche, but potentially useful to know:
With the current code, when you're looking at a review from the direct link, the
View comments (x)link disappears from the review footer.I kept this feature in my modified code. I didn't screenshot every variation of the review footer below, however, because that would take a very long time. All the screenshots above were taken not from the review's direct link, but from the game's main page.
With the old code:
Add commentalways appears in the review footer.View comments (x)appears only if you're logged in, and the review has comments, and you're NOT looking at the review's direct link. If you're looking at the review's direct link,View comments (x)never appears.With the new code:
Add commentonly exists in the review footer if you're logged in, AND (the review has no comments OR (the review has comments and you're looking at the review's direct link)).View comments (x)appears only if the review has comments, and you're NOT looking at the review's direct link. If you're looking at the review's direct link,View comments (x)never appears.Also:
With the new code,
View comments (x)appears regardless of whether you're logged in. This may seem redundant given that the newDirect linksection of the footer already links to the direct link of the review, andView comments (x)also links to the direct link of the review. However,Direct linklinks to the top of the review, whileView comments (x)links to the comments section. This is useful for long reviews where someone would have to scroll down very far to see the comments section.With the new code, you have to be at the review's direct link before you can click
Add a comment. With the old code, theAdd a commentlink always existed and you didn't have to be at the review's direct link to click it. I think this is an acceptable loss to save space in the review footer, and making people see the existing comments before they can add a comment of their own may be worth it. TheAdd a commentfeature is rarely used, at any rate.