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: add statements to delegates list #641

Merged
merged 23 commits into from
Aug 26, 2024

Conversation

wa0x6e
Copy link
Contributor

@wa0x6e wa0x6e commented Aug 17, 2024

Summary

Closes: https://github.com/snapshot-labs/workflow/issues/174

This PR adds a new statement column in the space delegates list, as well as a sub-menu for each row, with a link to:

  • open the modal delegate, prefilled with the delegatee address
  • the delegatee on the block explorer
  • its space user profile

Note

  • install a new remove-markdown dependency to strip all markdown code from statement excerpt

How to test

  1. Go to http://localhost:8080/#/matic:0x80D0Ffd8739eABF16436074fF64DC081c60C833A/delegates
  2. There should be a new Statement column, showing the delegatee statement on 2 lines maximum
  3. A new ... button, on each line far right, with a dropdown menu
  4. The "Delegate" menu should open the delegate modal, prefilled with the delegatee address
  5. The View profile menu should redirect to this delegatee space user profile
  6. The See on block explorer should open this delegatee address on the block explorer

@wa0x6e wa0x6e changed the title Feat-add-statement-to-delegate-page feat: add statements to delegates list Aug 17, 2024
@wa0x6e wa0x6e marked this pull request as draft August 17, 2024 15:35
@wa0x6e wa0x6e marked this pull request as ready for review August 18, 2024 10:57
@wa0x6e wa0x6e requested a review from bonustrack August 18, 2024 11:11
@bonustrack
Copy link
Member

Some comments:

  • We should use as much space as we can on the statement column, and just have a spacing of 3 between columns
image
  • Statement font size should be 17px
  • Line height should be the same as in the "Delegatee" column

@wa0x6e
Copy link
Contributor Author

wa0x6e commented Aug 19, 2024

Some comments:

  • We should use as much space as we can on the statement column, and just have a spacing of 3 between columns
image * Statement font size should be 17px * Line height should be the same as in the "Delegatee" column

All columns other than statment now have a fixed size, so statement can take all width.

On md screen, delegator column will be hidden, and on sm screen, statement will be hidden

@bonustrack
Copy link
Member

Can't see any commit

@wa0x6e
Copy link
Contributor Author

wa0x6e commented Aug 19, 2024

Weird, can not find the commit, will do it again 😒

@bonustrack
Copy link
Member

Looks good, can you also make the whole line clickable, and strip statement markdown in the preview?

image

@wa0x6e
Copy link
Contributor Author

wa0x6e commented Aug 19, 2024

Looks good, can you also make the whole line clickable, and strip statement markdown in the preview?

image

may need to install extra dependency remove-markdown , is that ok ?

@wa0x6e wa0x6e requested a review from bonustrack August 19, 2024 15:32
@wa0x6e
Copy link
Contributor Author

wa0x6e commented Aug 21, 2024

Waiting for #647 to also strip all html tags from the statement excerpt

Copy link
Member

@bonustrack bonustrack left a comment

Choose a reason for hiding this comment

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

I can not click on the dropdown menu item like "Delegate". Otherwise it looks good

@wa0x6e
Copy link
Contributor Author

wa0x6e commented Aug 21, 2024

Isn't the "View profile" menu redundant, since the whole link is clickable ?

@wa0x6e
Copy link
Contributor Author

wa0x6e commented Aug 21, 2024

I can not click on the dropdown menu item like "Delegate". Otherwise it looks good

Fixed by having multiple different link by column, instead of one single link for the whole row.

Minor inconvenient is that the little gap between column is not clickable.

Better than to have a single link, with the dropdown menu inside the link, and have to add a stop or prevent modifier on all dropdown menu events to avoid events bubbling up

@wa0x6e wa0x6e requested a review from bonustrack August 21, 2024 07:56
@bonustrack
Copy link
Member

Did you tried to have 1 link that group the whole line expect 3 dot menu?

@wa0x6e
Copy link
Contributor Author

wa0x6e commented Aug 21, 2024

Did you tried to have 1 link that group the whole line expect 3 dot menu?

Seems to work, without breaking the flex column

Copy link
Member

@bonustrack bonustrack left a comment

Choose a reason for hiding this comment

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

tACK

@wa0x6e wa0x6e requested a review from Sekhmet August 25, 2024 03:48
apps/ui/src/components/SpaceDelegates.vue Outdated Show resolved Hide resolved
apps/ui/src/components/SpaceDelegates.vue Outdated Show resolved Hide resolved
@wa0x6e wa0x6e requested a review from Sekhmet August 26, 2024 12:39
Copy link
Member

@Sekhmet Sekhmet left a comment

Choose a reason for hiding this comment

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

tACK

@bonustrack bonustrack merged commit 26a108f into master Aug 26, 2024
3 checks passed
@bonustrack bonustrack deleted the feat-add-statement-to-delegate-page branch August 26, 2024 13:10
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