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

Show in progress message for async operations #61

Merged
merged 9 commits into from
Feb 15, 2022
Merged

Conversation

jatzz10
Copy link
Contributor

@jatzz10 jatzz10 commented Feb 11, 2022

Clickup

Changes done -

  • Added an in progress message for these async operations:
    • unlinking fyle account
Screen.Recording.2022-02-11.at.6.05.16.PM.mov
  • approving a report
Screen.Recording.2022-02-11.at.6.07.54.PM.mov
  • Added deep link to redirect the user back to home tab of slack app

channel=user.slack_dm_channel_id,
blocks=notification_message,
ts=message_timestamp
)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is done because -

  • if an error occurs while approving a report in slack, we notify in the same thread as of that approval message
  • but we don't change the original notification message
  • now, in our case, as soon as the user clicks on the approve cta,
    • we change the approve cta to approving
    • now, in case of an error, we will have to revert the cta name back to approve, so that the user can try approving again

That is why, the above changes are done

Screen.Recording.2022-02-11.at.12.12.41.PM.mov

user = utils.get_or_none(User, slack_user_id=user_id)

slack_client = slack_utils.get_slack_client(team_id)

# Text message if user hasn't linked Fyle account
text = 'Hey buddy, you haven\'t linked your Fyle account yet :face_with_head_bandage: \n' \
'Checkout home tab for `Link Your Fyle Account` to link your Slack with Fyle :zap:'
'Checkout <slack://app?team={}&id={}&tab=home|home tab> for `Link Your Fyle Account` to link your Slack with Fyle :zap:'.format(team_id, settings.SLACK_APP_ID)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Adding deep link in the message so that user can be redirected to the app home tab after clicking on it

Screen.Recording.2022-02-11.at.1.33.13.PM.mov

Copy link
Contributor

@shreyanshss7 shreyanshss7 left a comment

Choose a reason for hiding this comment

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

Please make the changes as discussed

@jatzz10 jatzz10 merged commit 4e85495 into master Feb 15, 2022
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

Successfully merging this pull request may close these issues.

2 participants