snapshot-labs / sx-monorepo

Snapshot X monorepo
https://snapshot.box
MIT License
11 stars 10 forks source link

style: votes page horizontally scrollable on mobile #331

Open bonustrack opened 2 months ago

bonustrack commented 2 months ago

On mobile and on the page "votes" there isn't enough space to show the content for votes, we should make the table scrollable horizontally, similar than site like https://www.coingecko.com The cells should have a minum width so it doesnt take extra line, (first cell dont need to be sticky like on coingecko). Screenshot_20240509_064527_Chrome

ChaituVR commented 2 months ago

Delegates and leaderboard use similar layout, what should happen to them? same as votes?

ChaituVR commented 2 months ago

I had a blocker with sticky property on thead, will wait for this https://github.com/snapshot-labs/sx-monorepo/issues/145#issuecomment-2104404066

wa0x6e commented 2 months ago

We currently hide some column in smaller screen.

I guess with this feature, we keep columns ?

wa0x6e commented 2 months ago

I had a blocker with sticky property on thead, will wait for this #145 (comment)

Merged, so this can move on

ChaituVR commented 1 month ago

sticky doesn't work here. we may have to remove the stickiness of this page. also, the vote % in the background for each will not be correct if we allow horizontal scrolling.

Sekhmet commented 3 weeks ago

I bumped it to Medium as I think it will require quite a bit of work.

wa0x6e commented 1 week ago

@bonustrack What's the decision here, following the issues raised by chaitu ?

bonustrack commented 5 days ago

sticky doesn't work here. we may have to remove the stickiness of this page. also, the vote % in the background for each will not be correct if we allow horizontal scrolling.

For the background with vote % if the page is larger than the screen we can make the bg sticky and base the % from the screen width (and not the whole page width). Does it make sense?

wa0x6e commented 5 days ago

And we remove sticky?

bonustrack commented 5 days ago

For the sticky, I'm not sure what's blocking, we can use div if table is not working

wa0x6e commented 5 days ago

Not an issue of table or div, sticky does not simply seem to work when inside overflow: scroll, it does not stick