Skip to content
This repository has been archived by the owner on Sep 22, 2021. It is now read-only.

[Draft] Added slider instead of drop down for referendum vote conviction #996

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

niklabh
Copy link
Contributor

@niklabh niklabh commented Aug 9, 2020

Closes: #775

Screenshot from 2020-08-09 20-50-35

Need help with design and css

@niklabh niklabh changed the title Added slider instead of drop down for referendum vote Added slider instead of drop down for referendum vote conviction Aug 9, 2020
@niklabh niklabh changed the title Added slider instead of drop down for referendum vote conviction [Draft] Added slider instead of drop down for referendum vote conviction Aug 10, 2020
@niklabh
Copy link
Contributor Author

niklabh commented Aug 10, 2020

CSS help needed

@Tbaut
Copy link
Collaborator

Tbaut commented Aug 10, 2020

I'm not a css widzard, but do you mean you need help to match the design proposed in the issue? or is there something else?

@niklabh
Copy link
Contributor Author

niklabh commented Aug 10, 2020

@erler
Copy link
Collaborator

erler commented Aug 10, 2020

When I prototyped this a few months ago I did it the lazy way and used this slider, so that you can actually drag it with your mouse and have visualised steps. Can't remember if it has arrow key support for accessibility (it ideally should have).

Updated CSS for that would be

.rc-slider-rail {
		background-color: grey_light;
	}

	.rc-slider-track {
		background-color: pink_primary;	
	}

	.rc-slider-handle {
		border-top-color: grey_secondary;
		border-bottom-color: grey_secondary;
		border-left-color: grey_secondary;
		border-right-color: grey_secondary;
		border-top-width: 1px;
		border-bottom-width: 1px;
		border-left-width: 1px;
		border-right-width: 1px;
		&:active {
			box-shadow: none;
		}
	}

	.rc-slider-dot-active {
		border-top-color: pink_primary;
		border-bottom-color: pink_primary;
		border-left-color: pink_primary;
		border-right-color: pink_primary;
	}

And then have the line beneath it: tokensLocked * lockPeriodMultiplier = votes, so that the user gets an idea how the amount of votes come together and can adjust either tokens and lock period.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a Vote Lock Slider
3 participants