Skip to content
This repository was 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
niklabh wants to merge 2 commits into
masterfrom
niklabh-feature-referendum-vote-slider
Open

[Draft] Added slider instead of drop down for referendum vote conviction#996
niklabh wants to merge 2 commits into
masterfrom
niklabh-feature-referendum-vote-slider

Conversation

@niklabh

@niklabh niklabh commented Aug 9, 2020

Copy link
Copy Markdown
Contributor

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

niklabh commented Aug 10, 2020

Copy link
Copy Markdown
Contributor Author

CSS help needed

@Tbaut

Tbaut commented Aug 10, 2020

Copy link
Copy Markdown
Contributor

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

niklabh commented Aug 10, 2020

Copy link
Copy Markdown
Contributor Author

@erler

erler commented Aug 10, 2020

Copy link
Copy Markdown
Contributor

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