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

Use Slack Block Kits for a nicer UI #49

Open
kamaln7 opened this issue Mar 30, 2019 · 1 comment
Open

Use Slack Block Kits for a nicer UI #49

kamaln7 opened this issue Mar 30, 2019 · 1 comment

Comments

@kamaln7
Copy link
Owner

kamaln7 commented Mar 30, 2019

No description provided.

@kamaln7
Copy link
Owner Author

kamaln7 commented Mar 30, 2019

screenshot

The button will require the web server to be running and karma ops to be logged in the database with uuids.

"When you're using blocks in a message, however, you specify fallback text by using the top-level text field within the payload your app is sending to publish the message. The text field won't render in messages in Slack clients as long as blocks is also provided, but it will show up as the fallback text in notifications."

https://api.slack.com/tools/block-kit-builder

[
	{
		"type": "section",
		"text": {
			"type": "mrkdwn",
			"text": "<@U2G01FRQE> now has *53* points"
		}
	},
	{
		"type": "divider"
	},
	{
		"type": "section",
		"text": {
			"type": "mrkdwn",
			"text": ":arrow_up: *+9* points from 3 people\n\n:speech_balloon: for helping with code review"
		}
	},
	{
		"type": "divider"
	},
	{
		"type": "context",
		"elements": [
			{
				"type": "image",
				"image_url": "https://api.slack.com/img/blocks/bkb_template_images/profile_1.png",
				"alt_text": "Michael Scott"
			},
			{
				"type": "image",
				"image_url": "https://api.slack.com/img/blocks/bkb_template_images/profile_2.png",
				"alt_text": "Dwight Schrute"
			},
			{
				"type": "image",
				"image_url": "https://api.slack.com/img/blocks/bkb_template_images/profile_3.png",
				"alt_text": "Pam Beasely"
			},
			{
				"type": "plain_text",
				"emoji": true,
				"text": "3 votes"
			}
		]
	},
	{
		"type": "actions",
		"elements": [
			{
				"type": "button",
				"text": {
					"type": "plain_text",
					"text": "Give +3"
				},
				"value": "karma_op_uuid",
				"action_id": "karma_op"
			}
		]
	}
]

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

No branches or pull requests

1 participant