-
Notifications
You must be signed in to change notification settings - Fork 491
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
Trim comment, review, etc. bodies at the first <hr>. #637
Conversation
@pkaminski thanks for opening this pull request! We discussed this feature as a team, and we don't feel like use of One thing we've considered is adding per-channel or per-subscription configuration options for changing the rendering of messages. For example, a user could run What "concise" means is something that warrants some discussion. I could it being a truncated version (at Let us know if you're interested in working on that. |
Thanks for taking a look @bkeepers! I'm definitely interested in resolving this problem, no matter the solution we eventually agree on. However, first I'd like to push back a bit on the points raised by your team. I agree that My concern with the proposed Perhaps a middle ground could be to introduce a new Thoughts? |
@bkeepers a concise option would really be helpful to reduce the "noise" that some messages produce. Any news on that? |
I'm in favor of the We use templates across many repos and they are integrated in many Slack rooms. If we can update them all once to avoid dropping the boilerplate into Slack, that's a big win over configuration. |
I agree that |
@bkeepers We would also be interested in a concise option. Since your team is already discussing it, I didn't want to presume and make a new Issue for it. But would it be worth doing so, so people can 👍 it if they like? |
FYI, you can 👍 in issue #633. Thanks for your interest everyone -- I hope this gets GitHub's attention! |
Is this still relevant? If so, just comment with any updates and we'll leave it open. Otherwise, if there is no further activity, it will be closed. |
I'm still hopeful this will be considered for merging in at some point. |
Thanks for this PR. Let me reach out to our design team and see how they feel about this change! |
Thanks again for this PR. After some discussion, we're concerned about making this change globally, as the split on I like the suggestion from @bkeepers of adding a concise setting, which then could pick something to split on, though it's unclear what it should really be splitting on. What about after the first heading? Or first set of double-newlines? It's hard to pick something that's clear to the user what the behavior will be (and why their message was truncated if they weren't expecting it). Do you have some thoughts on how we could possibly make this configurable, but also with an expected behavior? |
I don't think it's fair to compare a Slack notification to an email message, as the expectations for content size are very different in these media. Also, Slack notifications are already being truncated at an arbitrary point, so a tweak to where the truncation happens wouldn't be unexpected. Especially so if we add a "Show more" link at the truncation point to mimic what Slack does when it auto-truncates. I think there's a lot of value in having a standard truncation demarcator in Markdown and in having truncation applied by default even if it's configurable. This will allow GitHub apps to take advantage of this feature without needing to be configured with a custom separator option or asking their users to reconfigure the Slack channel. I'm not too committed to a specific separator though I think That said, if you think a flag is necessary, then either my |
I think adding the |
Cool, let me know. And thanks for re-engaging on this very old PR! |
Is this still relevant? If so, just comment with any updates and we'll leave it open. Otherwise, if there is no further activity, it will be closed. |
Might as well keep this open as long as we're keeping #633 alive... |
/cc @integrations/chatops for visibility into this community issue |
Hi, Thanks for your contribution. We are going through platform changes to our ChatOps app and are not accepting any external contributions. We will go through your PR and consider your suggestions if it aligns with our Product direction. We are converting your PR to a feature request and it can be tracked here. |
Whenever converting HTML to mrkdwn, trim the HTML at the first encountered
<hr>
. Since people typically separate a summary from the details with an<hr>
in issues / PRs / reviews, this avoids sending unwanted details to Slack and keeps the notification compact.Implements #633. Requires integrations/html-to-mrkdwn#25 to be merged and published before merging.
Note that I don't have a Mac so I wasn't able to set up the development environment and run the tests — sorry. Unfortunately Travis won't work either until integrations/html-to-mrkdwn#25 gets merged so I hope I didn't mess up too badly.