Skip to content

Abbreviate codeblock instructions; remove ability to dismiss the inst… #3232

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

Merged
merged 2 commits into from
Jan 14, 2025

Conversation

swfarnsworth
Copy link
Member

@swfarnsworth swfarnsworth commented Jan 8, 2025

…ructions with emoji.

The more concise instructions are intended to be easier to read and increase the rate of followthru. That the instructions cannot be dismissed is intended to make them harder to ignore.

The spelling of "followthru" is very intentional.

image

image

image

I should probably remove the "It looks like you ..." from this one.

image

I'm not sure if this one should have the example. I should add the "Check this out to find the backtick key" from the !code embed.

…ructions with emoji.

The more concise instructions are intended to be easier to read and increase the rate of followthru. That the instructions cannot be dismissed is intended to make them harder to ignore.
@swfarnsworth swfarnsworth added a: information Related to information commands: (doc, help, information, reddit, site, tags) review: do not merge The PR can be reviewed but cannot be merged now labels Jan 8, 2025
@swfarnsworth swfarnsworth requested a review from mbaruh January 8, 2025 23:58
@swfarnsworth swfarnsworth requested a review from MarkKoz as a code owner January 8, 2025 23:58
Copy link
Member

@MarkKoz MarkKoz left a comment

Choose a reason for hiding this comment

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

I like the additional ideas you left in the PR description. This is still a good incremental improvement on its own.

@@ -177,7 +164,4 @@ def get_instructions(content: str) -> str | None:
if not instructions:
instructions = _get_no_lang_message(block.content)

if instructions:
instructions += "\nYou can **edit your original message** to correct your code block."
Copy link
Member

Choose a reason for hiding this comment

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

Do you think this line was ineffective? The intent was to avoid spamming the channel with several attempts to fix their message. I don't know a better way to communicate this.

Copy link
Member Author

Choose a reason for hiding this comment

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

I moved this instruction to the title for the embed.

Copy link
Member

Choose a reason for hiding this comment

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

Oh I need to read more carefully, sorry!

Copy link
Member Author

Choose a reason for hiding this comment

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

No problem; thank you for having written the original code in such a way that the changes in this PR were straightforward to make.

@swfarnsworth
Copy link
Member Author

image

This is just documenting an edge case for the parser (it seems to think the docstring is the code block).

@swfarnsworth
Copy link
Member Author

Updated cases:

image

image

@swfarnsworth
Copy link
Member Author

@mbaruh do you have any conscientious objections to the changes?

@n0Oo0Oo0b
Copy link
Contributor

Considering single newlines are rendered in embeds too (#3172), replacing the double newlines should help reduce the vertical height a bit. I also think the "this will result in the following" section is unnecessary when the user (incorrectly) attempts to use a codeblock since it's often triggered by users right after being told to use a codeblock at all.

On a related note, I think adding something along the lines of "you can copy-paste the example in this embed if you're having trouble with formatting" might help as well.

Copy link
Member

@lemonsaurus lemonsaurus left a comment

Choose a reason for hiding this comment

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

Big improvement. 🦄

@swfarnsworth swfarnsworth removed the review: do not merge The PR can be reviewed but cannot be merged now label Jan 14, 2025
@swfarnsworth swfarnsworth merged commit 8311343 into main Jan 14, 2025
5 checks passed
@swfarnsworth swfarnsworth deleted the codeblock-instructions branch January 14, 2025 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: information Related to information commands: (doc, help, information, reddit, site, tags)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants