crypto-bug-hunters / bug-buster

🪲 Bug Buster, a bug bounty platform powered by Cartesi Rollups
https://x.com/BugBusterApp
Apache License 2.0
10 stars 13 forks source link

feat: Show bounty prize on cards #180

Closed claudioantonio closed 1 month ago

claudioantonio commented 1 month ago

Closes #121

vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
bug-buster ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 28, 2024 7:37pm
claudioantonio commented 1 month ago

Fixing a missing commit to bring deployment back to normal.

guidanoli commented 1 month ago

The card looks like this now:

Screenshot from 2024-10-24 10-16-28

But I found the spacing and order of components weird, so I tweaked it a bit:

Screenshot from 2024-10-24 10-21-53

Here is the diff:

diff --git a/frontend/src/app/explore/page.tsx b/frontend/src/app/explore/page.tsx
index d1da2fa..309118c 100644
--- a/frontend/src/app/explore/page.tsx
+++ b/frontend/src/app/explore/page.tsx
@@ -5,6 +5,7 @@ import {
     Button,
     Center,
     Stack,
+    Space,
     Image,
     Card,
     Flex,
@@ -55,18 +56,19 @@ const Bounty: FC<{
                                 bountyStatus={bountyStatus}
                             />
                         </Group>
-                        <Text>
-                            Total Prize:{" "}
-                            {formatErc20Amount(
-                                token,
-                                totalPrize,
-                                erc20Metadata,
-                            )}
-                        </Text>
                     </Stack>
                     <Text truncate="end" size="xs" c="dimmend">
                         {bounty.description}
                     </Text>
+                    <Space h="sm" />
+                    <Text ta="right">
+                        Total Prize:{" "}
+                        {formatErc20Amount(
+                            token,
+                            totalPrize,
+                            erc20Metadata,
+                        )}
+                    </Text>
                 </Box>
             </Card>
         </Anchor>

What do you think?

claudioantonio commented 1 month ago

It was not looking so ugly to me because it depends on how long the bounty title is. image

  1. But I do like you proposal. I will adapt.
  2. I confess I don't like very much the idea of having the Title and the badges in the same line, wrapping when they don't fit. I will test explicitly putting each information in one line.
  3. I think we should remove the description from the card. I don't think that description for real bounties will fit in such small space.

What do you think?

guidanoli commented 1 month ago

I confess I don't like very much the idea of having the Title and the badges in the same line, wrapping when they don't fit. I will test explicitly putting each information in one line.

I agree. Also, is the title truncated with ellipsis if it's too long, or does it break into several lines automatically?

I think we should remove the description from the card. I don't think that description for real bounties will fit in such small space.

The idea was to give a preview of what the bounty is about. But if you think it will not give any information to the user, we can remove it.

claudioantonio commented 1 month ago

I confess I don't like very much the idea of having the Title and the badges in the same line, wrapping when they don't fit. I will test explicitly putting each information in one line.

I agree. Also, is the title truncated with ellipsis if it's too long, or does it break into several lines automatically?

It is truncated with ellipsis.

I think we should remove the description from the card. I don't think that description for real bounties will fit in such small space.

The idea was to give a preview of what the bounty is about. But if you think it will not give any information to the user, we can remove it.

Ok.

claudioantonio commented 1 month ago

Hi @guidanoli , here comes a screenshot of the final result. What do you think? image