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

Make NextUp window the same size as seats #25

Closed
ddfridley opened this issue Nov 22, 2019 · 1 comment
Closed

Make NextUp window the same size as seats #25

ddfridley opened this issue Nov 22, 2019 · 1 comment
Assignees
Labels
Effort-small Looks like a small effort good first issue Good for newcomers React

Comments

@ddfridley
Copy link
Contributor

ddfridley commented Nov 22, 2019

We want to alphabetize the candidates. That means that the first person would always start out in the larger next up window which might bias things. So we want to shrink that window.

If you go to undebate.herokuapp.com/schoolboard-conversation on a desktop, you'll see that you can change the size of the window, and the display will re-arrange based on the new dimensions. Our objective is to always have everything on the screen - no scrolling. So the positions for thing are calculated based on the screen size.

This change needs to be done in the 3 different layouts that are chosen based on resolution, and in the initial state that is rendered server side before the screen size is known.

The file is app/components/web-components/undebate.jsx

in constructor() near the end, state={....seatStyle: { ...., nextUp: { left: xxx, top: xxx, width xxx}
then introSeatStyle: {left: xxx this needs to position it off the screen

then in calculatePositionAndStyle()
there are 3 cases where these variables need to be set: width/height > 0.8, width/height>1.8 and portrait mode.

nextUpWidthRatio,
seatStyle.nextUp.left
seatStyle.nextUp.top
seatStyle.nextUp.width
introSeatStyle.nextUp

changing the width is easy, but changing the left and top, and possible having to move other windows around to make it look good will be the work.

@ddfridley ddfridley added Effort-small Looks like a small effort good first issue Good for newcomers React labels Nov 22, 2019
@ddfridley ddfridley added this to Ice Box in Development & Project Management via automation Nov 23, 2019
@ddfridley ddfridley moved this from Ice Box to Prioritized Backlog in Development & Project Management Nov 23, 2019
@ddfridley ddfridley moved this from Ice Box to Prioritized Backlog in Development: Ballotpedia March Elections Dec 3, 2019
@ddfridley
Copy link
Contributor Author

See #30 it would be wise to make both changes at the sametime because they impact calculatePositionAndStyle

@ddfridley ddfridley removed this from Prioritized Backlog in Development & Project Management Dec 10, 2019
@beribak beribak self-assigned this Dec 15, 2019
This was referenced Dec 17, 2019
@ddfridley ddfridley moved this from Prioritized Backlog to In progress (actively working) in Development: Ballotpedia March Elections Dec 20, 2019
@ddfridley ddfridley moved this from In progress (actively working) to Done in Development: Ballotpedia March Elections Dec 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Effort-small Looks like a small effort good first issue Good for newcomers React
Projects
No open projects
Development

No branches or pull requests

2 participants