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

Remove jquery #159

Merged
merged 81 commits into from
Jan 20, 2016
Merged

Remove jquery #159

merged 81 commits into from
Jan 20, 2016

Conversation

travisperson
Copy link
Member

This strips out all the jquery used throughout the webui.

Closes #133

harlantwood and others added 2 commits January 2, 2016 09:07

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@jbenet jbenet added the status/in-progress In progress label Jan 3, 2016
Travis Person added 6 commits January 2, 2016 20:00
Removes the use of jquery to get the value of the dag path input box.

Addresses part of #133
Removes the use of jquery to get the files hash from the elements
attrs. Instead we will create a callback for the click that will handle
each files unpin.

Also cleaned up things a bit, more will be required.

Addresses part of #133
Removed editable as it's not used anywhere in the code.

Addresses part of #133
Removed the use of jquery to dynamically set the height of the config
textarea.

Addresses part of #133
Use regular old javascript to retrieve the value from the event and
trim off the extra.

Addresses part of #133
Removed the hover class addition/removal as it appeared not to be doing
anything, also used good-ol JavaScript to perform click operation.

Addresses part of #133
@daviddias
Copy link
Member

👏👏👏👏👏👏👏👏 Thank you @travisperson, this has been one of the main things that comes to discussion when talking about the WebUI

@@ -113,7 +111,7 @@ export default React.createClass({
{error}
{buttons}
<div className='textarea-panel panel panel-default padded'>
<textarea className='panel-inner' spellCheck='false' onChange={this.handleChange} value={this.state.body} />
<textarea ref='textareaConfig' className='panel-inner' style={{height: this.state.height}} spellCheck='false' onChange={this.handleChange} value={this.state.body} />
Copy link
Member

Choose a reason for hiding this comment

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

Can you add line breaks here please, this line is getting a bit long

@dignifiedquire
Copy link
Member

Thanks @travisperson for doing this, I left some nit picks inline

@dignifiedquire
Copy link
Member

Another note, when do not require jquery anymore we can drop it from the deps in package.json

<a href='#' onClick={unpin}>
<OverlayTrigger placement='right' overlay={tooltip}>
{/* The block element is required otherwise the overlay is *over* the icon */}
<div style={{display: 'inline-block'}}><i className='fa fa-remove'></i></div>
Copy link
Member

Choose a reason for hiding this comment

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

You can use <Icon glyph='remove' />

RichardLitt and others added 4 commits January 3, 2016 15:44
e.stopPropagation()
e.preventDefault()
},

onDrop: function (e) {
this.setState({ dragging: false })
$(e.target).removeClass('hover')
Copy link
Member

Choose a reason for hiding this comment

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

Won't removing hover affect the CSS?

Copy link
Member Author

Choose a reason for hiding this comment

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

The only css the defining a hover class was for an element matching the following selector .file-add-container .file-add-container-inner which none of these effected. The hover class for that is handled on line 154 (old code) or 148 (new code).

I'm pretty sure it's just dead code.

@RichardLitt
Copy link
Member

LGTM, given the things above. 👍

Travis Person added 3 commits January 3, 2016 15:42
Moved the FileItem to a seperate file.
Switched to using Glyphicon instead of a div for block element.
@travisperson
Copy link
Member Author

I've been waiting on comments from you for a few things. This is in the webui repo so you can take it over if you just want to update it with the changes you think are required.

@dignifiedquire
Copy link
Member

Thanks @travisperson I finished it up for now so we can merge it :)

dignifiedquire added a commit that referenced this pull request Jan 20, 2016
@dignifiedquire dignifiedquire merged commit bdad406 into router Jan 20, 2016
@dignifiedquire dignifiedquire deleted the remove-jquery branch January 20, 2016 11:02
@dignifiedquire dignifiedquire restored the remove-jquery branch January 20, 2016 11:04
@dignifiedquire dignifiedquire deleted the remove-jquery branch January 20, 2016 11:05
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.

None yet

8 participants