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

feat: brag the bag #2060

Merged
merged 2 commits into from
Feb 25, 2024
Merged

feat: brag the bag #2060

merged 2 commits into from
Feb 25, 2024

Conversation

bonomat
Copy link
Contributor

@bonomat bonomat commented Feb 19, 2024

Share your current pnl from your running position as an image.

Images are dynamically fetched from my github repo here: https://github.com/bonomat/memes/tree/main/images
meaning, we can dynamically add new images any time :)

Simulator.Screen.Recording.-.iPhone.15.Plus.-.2024-02-19.at.12.30.21.mp4

resolve https://github.com/get10101/meta/issues/323

Copy link
Contributor

@luckysori luckysori left a comment

Choose a reason for hiding this comment

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

Nice work! I just suggested a couple of tweaks.


Future<List<Meme>> fetchMemeImages() async {
final response =
await http.get(Uri.parse('https://api.github.com/repos/bonomat/memes/contents/images/'));
Copy link
Contributor

Choose a reason for hiding this comment

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

❓Why not create a repo under get10101? It doesn't matter, but I'm curious.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No particular reason.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
"I’m trading self-custodial and without counterparty risk at 10101",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"I’m trading self-custodial and without counterparty risk at 10101",
"I’m trading self-custodially and without counterparty risk at 10101",

Row(
children: [
const Text(
"Side",
Copy link
Contributor

Choose a reason for hiding this comment

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

🔧 I think this title is confusing. E.g. 2x Long should stand by itself.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Mhm, I don't like it, now it's just floating around with out any context.

child: Row(
children: [
Text(
pnlPercent.toString(),
Copy link
Contributor

Choose a reason for hiding this comment

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

🙃 I would omit the percentage. It's kind of boring and meaningless for anyone looking at the meme, compared to the PNL in sats.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Isn't the percentage the interesting thing? Like, I won 413 sats, vs. I made 10,123% profit?

style: primaryTextStypeValue,
),
Icon(
BitcoinIcons.satoshi_v2,
Copy link
Contributor

Choose a reason for hiding this comment

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

🔧 I have to say I still hate the sats symbol lol. I would just say sats and avoid any possible confusion.

children: [
Text(
pnl.formatted(),
style: primaryTextStypeValue,
Copy link
Contributor

Choose a reason for hiding this comment

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

🔧 I like the dynamic colour on the PNL, but I would keep the other elements in a neutral colour.

child: Row(
children: [
const Text(
"Entry price",
Copy link
Contributor

Choose a reason for hiding this comment

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

🙃 The entry price is kind of interesting, but I might just omit it too in favour of keeping the image less cluttered.

I think the story the user might want to tell is something as simple as "I went long on Bitcoin at leverage 50 and I made this much".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fair, I'll remove it

borderRadius: const BorderRadius.all(Radius.circular(5))),
child: Padding(
padding: const EdgeInsets.all(2.0),
child: SvgPicture.asset('assets/10101-qr-transparent.svg',
Copy link
Contributor

Choose a reason for hiding this comment

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

🙃 I think the meme is a little bit too obscured (looking at the video). It would be ideal if the meme could be a bit more visible with its original colours.

I would particularly avoid covering the text with our overlay. If we remove some of the elements I suggested I think this would be possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I would particularly avoid covering the text with our overlay. If we remove some of the elements I suggested I think this would be possible.

This needs to be considered when creating the meme images. I've updated them which looks better now.

Comment on lines +45 to +49
"https://github.com/bonomat/memes/blob/main/images/laser_eyes_portrait.png?raw=true",
"https://github.com/bonomat/memes/blob/main/images/leoardo_cheers_portrait.png?raw=true",
"https://github.com/bonomat/memes/blob/main/images/do_something_portrait.png?raw=true",
"https://github.com/bonomat/memes/blob/main/images/got_some_sats_portrait.png?raw=true",
"https://github.com/bonomat/memes/blob/main/images/are_you_winning_son_always_have_been_portrait.png?raw=true"
Copy link
Contributor

Choose a reason for hiding this comment

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

❓Why do we need to specify the memes here? I thought we would dynamically fetch them from the repository. Doesn't this mean that we have to make a code change if we want to add a new meme?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, that's outdated and was just for testing.

import 'dart:convert';
import 'package:http/http.dart' as http;

class GitHubService {
Copy link
Contributor

@holzeis holzeis Feb 23, 2024

Choose a reason for hiding this comment

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

Nit: The fact that the memes are fetched from GitHub is actually irrelevant to this service.

How about MemeService?

height: 10,
),
Container(
color: Colors.transparent,
Copy link
Contributor

Choose a reason for hiding this comment

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

❓ is this doing anything? 😅

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You don't like invisible boxes?

},
child: const Text("Share on Twitter")),
child: const Text("Share as image")),
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I like the subtle share icon like on the position card better. It could be an improvement over this button as well.

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 dialog needs some more love... I'll leave it as is for now.

@@ -145,6 +145,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.0"
card_swiper:
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: we should probably as well replace the carousel with that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree, this one is much better

Share your current pnl from your running position as an image.
@bonomat bonomat added this pull request to the merge queue Feb 25, 2024
Merged via the queue into get10101:main with commit 1184c02 Feb 25, 2024
20 checks passed
@bonomat bonomat deleted the feat/brag-the-bag branch February 25, 2024 19:20
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.

3 participants