jurteam / platform

Jur Beta Platform
https://beta.jur.io
0 stars 0 forks source link

FIX while sorting columns in oath keeper table the table expands #319

Closed 0xlyd closed 4 years ago

0xlyd commented 4 years ago

Expected Behavior

Table's layout not to expand/move when clicking on sort headings

Current Behavior

When you click on a heading and apply a sorting feature the table moves as space is not arranged to accommodate the sorting icon

Steps to Reproduce

Environment: Temp

  1. Go to Oathkeepers ranking page
  2. Click on any sortable column (while clicking multiple ones the problem is more evident)

Detailed Description

Please check the voiced over video: https://drive.google.com/file/d/1H7gdvIVWd4412MmQppL40TAonNRJiZuh/view

ashishjur commented 4 years ago

Cause: Sort icon's presence changes the width of the column.

I've added fixed width to non-lead columns. So they won't change the width. For the Total Amount column, it's a bit larger width. In case someone takes the combined oath of million JURs, dApp will be able to handle that. Remaining columns widths are the same as Advocate profile page tables.

tyagishuchi1 commented 4 years ago

@ashishjur It works for "Amount Staked" and "Oaths" but the width is not fixed for the "Rank" column. And for the benefit of keeping the entire JBP consistent, could you make the width fixed for the "Total Earned" column for Advocates too?

ashishjur commented 4 years ago

On mac, Advocates list table changes width on sort. The change is happening in the Wallet column. This is unexpected and I don't have a solution for this. It's the first column and meant to have auto width.

Readings of Wallet column's width in px: 801.818 default & desc sort 802.727 asc sort

All other tables are rendering as expected.