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

(Add) Forum last edit #4288

Open
wants to merge 3 commits into
base: 8.x.x
Choose a base branch
from
Open

Conversation

Obi-Wana
Copy link
Contributor

@Obi-Wana Obi-Wana commented Oct 28, 2024

Adds "last edited by " to forum posts.

Suggestions for better naming instead of updatedBy are welcome.

resources/views/components/forum/post.blade.php Outdated Show resolved Hide resolved
resources/views/components/forum/post.blade.php Outdated Show resolved Hide resolved
app/Models/Post.php Outdated Show resolved Hide resolved
@Obi-Wana Obi-Wana force-pushed the add-forum-edit branch 2 times, most recently from 8c0edf7 to 607de57 Compare October 31, 2024 12:12
@Obi-Wana Obi-Wana requested a review from Roardom October 31, 2024 12:12
Copy link
Contributor

@Roardom Roardom left a comment

Choose a reason for hiding this comment

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

Thank you!

Added some feedback

@@ -289,8 +310,8 @@
}

.post__header {
grid-template-areas: 'datetime topic . tip-stats overflow' '. . . . toolbar';
grid-template-columns: auto auto 1fr auto auto;
grid-template-areas: 'datetime edited topic . tip-stats overflow' '. . . . toolbar';
Copy link
Contributor

Choose a reason for hiding this comment

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

There are now 6 columns in the first row but only 5 in the second.

Comment on lines +274 to +281
.post__updated-dropdown {
display: none;
background-color: var(--top-nav-dropdown-menu-item-hover-bg);
position: absolute;
padding: 5px;
box-shadow: var(--post-shadow);
border-radius: 5px;
border: var(--bbcode-input-border);
Copy link
Contributor

Choose a reason for hiding this comment

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

You can't use non --post- prefixed colors here. You can add new --post- colors to every theme if you like. As is, the colors here (taken from top nav and bbcode) don't seem to fit the styles very well either.

Comment on lines -41 to +43
grid-template-areas: 'datetime topic . tip-stats toolbar';
grid-template-columns: auto auto 1fr auto auto;
grid-template-areas: '. . topic . tip-stats toolbar';
grid-template-columns: auto auto auto 1fr auto auto;
Copy link
Contributor

Choose a reason for hiding this comment

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

You can delete the two empty left-most columns here, they're not being used for anything.

• edited
<i class="{{ config('other.font-awesome') }} fa-caret-down"></i>
<div class="post__updated-dropdown">
{{ $post->updated_at?->diffForHumans() }}
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be wrapped in a <time> element and have matching attributes as all the other <time> elements (namely datetime and title of the raw database value)

grid-template-columns: 1fr auto auto;
border-top: 2px solid var(--post-aside-bg);
padding: 4px;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
}
font-size: 13px;
}

Comment on lines +325 to +326
grid-template-areas: '. . topic tip-stats overflow' '. . . . toolbar';
grid-template-columns: auto auto auto 1fr auto auto;
Copy link
Contributor

Choose a reason for hiding this comment

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

The two left-most empty columns can be deleted here.

{
Schema::table('posts', function (Blueprint $table): void {
$table->unsignedInteger('updated_by')->nullable()->after('updated_at');
$table->foreign('updated_by')->references('id')->on('users')->cascadeOnUpdate()->cascadeOnDelete();
Copy link
Contributor

Choose a reason for hiding this comment

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

null on delete would be better here

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