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

Add tweet button to drives #514

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

vishalkrishnads
Copy link
Contributor

Fixes #84. This PR adds a Post to X option to the drive view component that lets the user post a drive to twitter/X with the following message:

I went on a pretty chill drive from place_A to place_B in my platform as openpilot drove ~x% of the route with less than y disengagements! Check out the drive at url.

where:
* place_A is the place from startLocation
* place_B is the place from endLocation
* platform is a formatted version of platform
* x is the sum of ((event.data.end_route_offset_millis - event.route_offset_millis) / currentRoute.duration) * 100 for all engage events
* y is the number of engage events plus one.
* url is the current URL

This uses twitter's web intent to write the tweet. As of now, it doesn't seem like images are supported. This option can be found under the Share this route option in More Info.

Copy link

Welcome to connect! Make sure to:

  • read the contributing guidelines
  • mark your PR as a draft until it's ready to review
  • post the preview on Discord; feedback from users will speedup the PR review

deployed preview: https://514.connect-d5y.pages.dev

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.

Add Tweet button to drives
1 participant