teamstep / slack-in-your-time Goto Github PK
View Code? Open in Web Editor NEWA Slack application for teams working around the globe
Home Page: https://siyt-app.teamstep.io/slack/install
License: MIT License
A Slack application for teams working around the globe
Home Page: https://siyt-app.teamstep.io/slack/install
License: MIT License
Add unit test for the application using nock to simulate predefined slack payloads.
The unit test must test the following functions:
ack()
function for conversionCurrently, the bot will automatically parse the message that contains a reference to time. However, the parsed DateTime object may not always be correct. Or it might be parsed in a different context (ex: different timezone from the one mentioned in the message).
Related line: https://github.com/TeamSTEP/slack-in-your-time/blob/master/src/helper/messageFormat.ts#L72
Add a DateTime selection block in the bot message and allow the user to select the time before they confirm to convert it to everyone's timezone. The default time will be based on the parsed DateTime.
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Convert this time? (List time)"
}
},
{
"type": "actions",
"elements": [
{
"type": "datepicker",
"initial_date": "1990-04-28",
"placeholder": {
"type": "plain_text",
"text": "Date",
"emoji": true
},
"action_id": "datepicker-action"
},
{
"type": "timepicker",
"initial_time": "13:37",
"placeholder": {
"type": "plain_text",
"text": "Select time",
"emoji": true
},
"action_id": "timepicker-action"
},
{
"type": "static_select",
"placeholder": {
"type": "plain_text",
"text": "Time Zone",
"emoji": true
},
"options": [
{
"text": {
"type": "plain_text",
"text": "JST (UTC+9:00)",
"emoji": true
},
"value": "value-0"
},
{
"text": {
"type": "plain_text",
"text": "MST (UTC-07:00)",
"emoji": true
},
"value": "value-1"
},
{
"text": {
"type": "plain_text",
"text": "AFT (UTC+04:30)",
"emoji": true
},
"value": "value-2"
}
],
"action_id": "static_select-input"
},
{
"type": "button",
"text": {
"type": "plain_text",
"text": "Send converted time",
"emoji": true
},
"value": "click_me_123",
"style": "primary",
"action_id": "actionId-1"
},
{
"type": "button",
"text": {
"type": "plain_text",
"text": "Cancel",
"emoji": true
},
"value": "click_me_123",
"style": "danger",
"action_id": "actionId-2"
}
]
}
]
}
Implement this app with Firebase authentication and Firestore to allow public distribution of this app across workspaces
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.