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: Show bounty prize on cards #180

Merged
merged 3 commits into from
Oct 28, 2024
Merged

feat: Show bounty prize on cards #180

merged 3 commits into from
Oct 28, 2024

Conversation

claudioantonio
Copy link
Contributor

Closes #121

Copy link

vercel bot commented Oct 23, 2024

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
Copy link
Contributor Author

Fixing a missing commit to bring deployment back to normal.

@guidanoli
Copy link
Contributor

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
Copy link
Contributor Author

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
Copy link
Contributor

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
Copy link
Contributor Author

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
Copy link
Contributor Author

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

Copy link
Contributor

@guidanoli guidanoli left a comment

Choose a reason for hiding this comment

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

Looks good on my end

@claudioantonio claudioantonio merged commit 74d474d into next Oct 28, 2024
4 checks passed
@claudioantonio claudioantonio deleted the feature/show-reward branch October 28, 2024 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-frontend Area: front-end
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants