Skip to content

Make side panes resizable#575

Merged
hamilton merged 5 commits intoiodide-project:masterfrom
djbarnwal:dragpane
May 3, 2018
Merged

Make side panes resizable#575
hamilton merged 5 commits intoiodide-project:masterfrom
djbarnwal:dragpane

Conversation

@djbarnwal
Copy link
Copy Markdown
Contributor

Side panes are now resizable. Looking for feedback on the resizing bar. I have made it black and thick so that it would blend with the current theme.

@hamilton hamilton self-requested a review April 24, 2018 17:18
Copy link
Copy Markdown
Contributor

@hamilton hamilton left a comment

Choose a reason for hiding this comment

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

Awesome work @djbarnwal! I left a few suggestions below. Let me know if these make sense to you.

Another thing I'm noticing: the cell body scroll bar is set a bit away from the pane here:

apr-24-2018 12-22-29

@bcolloran would love to get another pair of eyes on this.

Comment thread src/style/side-panes.css Outdated
.resizer {
background: #000;
z-index: 12;
width: 12px !important;
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.

I'm wondering if there's a way to have this same clickable width without maybe requiring a solid black line cutting through the app. It makes sense to have a big click area for the resizer, but hopefully we can visually keep this line thinner so it doesn't command so much attention. @bcolloran would love to get your thoughts on this.

Comment thread src/components/page.jsx Outdated
id="cells"
className={this.props.viewMode}
style={{
width: this.props.sidePane ? `calc(100% - ${this.props.sidePaneWidth + 17}px)` : '100%',
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.

this actually breaks quite a bit of css for presentation view. Can make sure this width only happens when we are in editor mode as well? Setting div#cells to 100% for presentation view will counteract some internal reports, custom styling, etc. that others are relying on for their own presentation style sheets, which will set this div to be another width in some cases. (I'm noticing this because of an internal Mozilla notebook I test things against is broken with the change).

One approach would be to set the width to undefined in this operator if this.props.sidePane === false and this.props.viewMode !== 'editor.

@hamilton
Copy link
Copy Markdown
Contributor

Forgot to mention - I'm also noticing the history pane is a bit broken as a result of these changes - would you mind looking into that?

screen shot 2018-04-24 at 12 27 03 pm

@djbarnwal
Copy link
Copy Markdown
Contributor Author

@hamilton I am unable to recreate the history pane issue. Can you give me a little more insight into the problem?

@hamilton
Copy link
Copy Markdown
Contributor

hamilton commented May 1, 2018

@djbarnwal just checked on master - it looks like the history pane is buggy there as well, so I'll file a separate issue.

Copy link
Copy Markdown
Contributor

@hamilton hamilton left a comment

Choose a reason for hiding this comment

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

Thanks for all the changes @djbarnwal! This is really shaping up. I had one small point about getPageWidth, and I left a comment about the history panes, since it turns out the issue must have been introduced somewhere else.

Comment thread src/components/page.jsx Outdated

getPageWidth() {
let width = '100%'
if (this.props.viewMode === 'presentation') width = 'unset'
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.

Oddly, the unset keyword actually keeps the width at 100% in presentation mode. Could you replace this with undefined which will actually skip doing anything with the width property for this element?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Strange! undefined was not working as expected while I was working on this issue whereas unset was. I'll just check if there is something loose on my end and send a fix.

@djbarnwal
Copy link
Copy Markdown
Contributor Author

@hamilton Turns out it was a mix-up on my end. My latest commit solves the issue :)

@hamilton
Copy link
Copy Markdown
Contributor

hamilton commented May 3, 2018

Looks great @djbarnwal! Thanks for the PR.

@hamilton hamilton merged commit edb86a8 into iodide-project:master May 3, 2018
@bcolloran
Copy link
Copy Markdown
Contributor

nice job on this one @djbarnwal and @hamilton 👍

@djbarnwal djbarnwal deleted the dragpane branch September 5, 2018 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants