Skip to content

Add Scroll Buttons to Top Instructions#9283

Merged
Hamms merged 6 commits into
stagingfrom
topInstructions-manual-scrolling
Jul 5, 2016
Merged

Add Scroll Buttons to Top Instructions#9283
Hamms merged 6 commits into
stagingfrom
topInstructions-manual-scrolling

Conversation

@Hamms

@Hamms Hamms commented Jun 30, 2016

Copy link
Copy Markdown
Contributor

And remove the existing scrollbar. We wanted to override the scrollbar
for a couple of reasons; first, on OSX the scrollbar is hidden unless
you're actually scrolling, making it potentially difficult to discover
the "scrollability" of the region. Second, on other browsers, the
scrollbar was ugly and in the wrong place.

The new functionality adds appropriately-styled arrow buttons underneath
the hide button, which when clicked will scroll the instructions area.
The buttons are hidden when in collapsed mode or when the instructions
area is at its maximum height.

pic description
image maximum size (unchanged)
image minimized (unchanged)
image with scroll buttons
image new minimum resizable height

And remove the existing scrollbar. We wanted to override the scrollbar
for a couple of reasons; first, on OSX the scrollbar is hidden unless
you're actually scrolling, making it potentially difficult to discover
the "scrollability" of the region. Second, on other browsers, the
scrollbar was ugly and in the wrong place.

The new functionality adds appropriately-styled arrow buttons underneath
the hide button, which when clicked will scroll the instructions area.
The buttons are hidden when in collapsed mode or when the instructions
area is at its maximum height.
@Hamms Hamms force-pushed the topInstructions-manual-scrolling branch from 0af6033 to de558bc Compare June 30, 2016 23:49
@Bjvanminnen

Copy link
Copy Markdown
Contributor

i wonder if we want the triangles to look a little more rounded, and also maybe not quite so flush with the top/bottom? perhaps worth asking the ui-ux room what they think

@Hamms

Hamms commented Jul 1, 2016

Copy link
Copy Markdown
Contributor Author

I'll give em a little padding and see what the room thinks.

Re: rounding, I can pretty easily do something that looks like this
image
but anything else would require me to come up with a more creative way to do arrows.

RESIZER_HEIGHT + margins;
const leftColHeight = minIconHeight,
middleColHeight = minInstructionsHeight,
rightColHeight = collapseButtonHeight + scrollButtonsHeight;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we dont generally use this style of declaring multiple variables with a single var/const. I don't know that there's any good reason for it, but it's nice to be consistent and I might just use three consts

@Bjvanminnen

Copy link
Copy Markdown
Contributor

Code generally lgtm. Some things worth checking out:
Windows (where scrollbars always appear by default) looks okay - I think you'll be good here.
Instructions where we have images (which dynamically resize max height) do okay
Instructions where we have < details > elements (i.e. artist levels that teach angles) do okay.

@Hamms

Hamms commented Jul 1, 2016

Copy link
Copy Markdown
Contributor Author

I develop on Windows, so that part's definitely good!

Tested on a level with an image and one with an expandable <detail>, and they seem to work just the same as they previously did.

@Hamms

Hamms commented Jul 5, 2016

Copy link
Copy Markdown
Contributor Author

PTA(quick)L

* collapsed
*/
getMinHeight() {
getMinHeight(collapsed=this.props.collapsed) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should prob add an @param comment to the function

@Bjvanminnen

Copy link
Copy Markdown
Contributor

couple nits, otherwise lgtm

@Hamms Hamms merged commit d15ff7b into staging Jul 5, 2016
@Hamms Hamms deleted the topInstructions-manual-scrolling branch August 9, 2016 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants