Skip to content

Add channel ID to message deletion logs#682

Merged
jchristgit merged 1 commit into
mainfrom
add-channel_id-to-clean-logs
Feb 25, 2022
Merged

Add channel ID to message deletion logs#682
jchristgit merged 1 commit into
mainfrom
add-channel_id-to-clean-logs

Conversation

@TizzySaurus
Copy link
Copy Markdown
Contributor

Closes #620.

The channel ID is now shown in message deletion logs.

Zoomed in on one log message:
image

Fullscreen page:
image

@TizzySaurus TizzySaurus added area: backend Related to internal functionality and utilities priority: 2 - normal Normal Priority area: moderation Related to community moderation functionality: (moderation, defcon, verification) type: enhancement Changes or improvements to existing features s: needs review Author is waiting for someone to review and approve labels Feb 24, 2022
@netlify
Copy link
Copy Markdown

netlify Bot commented Feb 24, 2022

✔️ Deploy Preview for pydis-static ready!

🔨 Explore the source changes: 1b251d4

🔍 Inspect the deploy log: https://app.netlify.com/sites/pydis-static/deploys/62181485541c2000085be251

😎 Browse the preview: https://deploy-preview-682--pydis-static.netlify.app

@coveralls
Copy link
Copy Markdown

coveralls commented Feb 24, 2022

Coverage Status

Coverage remained the same at 100.0% when pulling 1b251d4 on add-channel_id-to-clean-logs into 9d1ea16 on main.

@TizzySaurus TizzySaurus force-pushed the add-channel_id-to-clean-logs branch from adb1f60 to 15c75c0 Compare February 24, 2022 23:21
Add channel ID to message deletion logs
@TizzySaurus TizzySaurus force-pushed the add-channel_id-to-clean-logs branch from 15c75c0 to 1b251d4 Compare February 24, 2022 23:28
Copy link
Copy Markdown
Contributor

@jchristgit jchristgit left a comment

Choose a reason for hiding this comment

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

Thanks!

Copy link
Copy Markdown
Contributor

@minalike minalike left a comment

Choose a reason for hiding this comment

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

Tested and it works fine and renders as you'd expect, but semantically wouldn't it make sense to not have line break within a span element, and rather split it into 2 spans?

One for the user ID, a line break, and a separate one for the line after with the timestamp and channel ID.

I would suggest:

            <div class="discord-message-header">
                <span class="discord-username" style="color: {{ message.author.top_role.colour | hex_colour }}">
                      {{ message.author }}
                </span>
                <span class="discord-message-metadata has-text-grey">
                    User ID: {{ message.author.id }}
                </span>
                <br>
                <span class="discord-message-metadata has-text-grey">
                    {{ message.timestamp }} (Channel ID: {{ message.channel_id }})
                </span>
            </div>

and in logs.css adjust the margin so it's only present on the right:

.discord-message-metadata {
    font-size: 0.75rem;
    font-weight: 400;
    margin: 0 .3rem 0 0;
}

But I realize this may be overkill, and there may also be a better way of doing this.

@MarkKoz
Copy link
Copy Markdown
Contributor

MarkKoz commented Feb 25, 2022

On the principle of semantics, I agree with mina. A span is generally not seen as something that is multi-line. However, in practice, I am not so sure that it matters. If I were the one to implement this, I would likely follow mina's suggestion. However, I am overall indifferent, so I would leave this decision to the author's discretion.

@jchristgit jchristgit merged commit 2846be8 into main Feb 25, 2022
@jchristgit jchristgit deleted the add-channel_id-to-clean-logs branch February 25, 2022 19:22
@jchristgit
Copy link
Copy Markdown
Contributor

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: backend Related to internal functionality and utilities area: moderation Related to community moderation functionality: (moderation, defcon, verification) priority: 2 - normal Normal Priority s: needs review Author is waiting for someone to review and approve type: enhancement Changes or improvements to existing features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show channel info in message logs

5 participants