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

[MINOR] fix: Validate before setting focus to paragraphs #1802

Closed

Conversation

1ambda
Copy link
Member

@1ambda 1ambda commented Dec 23, 2016

What is this PR for?

Fixed fragile code in notebook.controller.js. This code causes loading errors as u can see the screenshot above. Especially in different loading system (e.g es6 import, require, webpack)

What type of PR is it?

[Bug Fix]

Todos

Nothing

What is the Jira issue?

MINOR issue

How should this be tested?

It's trivial.

Screenshots (if appropriate)

focus

Questions:

  • Does the licenses files need update? - NO
  • Is there breaking changes for older versions? - NO
  • Does this needs documentation? - NO

@1ambda 1ambda changed the title [MINOR] Validate before setting focus to paragraphs [MINOR] fix: Validate before setting focus to paragraphs Dec 23, 2016
1ambda added a commit to 1ambda/zeppelin that referenced this pull request Dec 25, 2016
@Leemoonsoo
Copy link
Member

LGTM and merge to master if there're no more comments

@asfgit asfgit closed this in 78425c4 Dec 27, 2016
1ambda added a commit to 1ambda/zeppelin that referenced this pull request Dec 28, 2016
asfgit pushed a commit that referenced this pull request Dec 29, 2016
### What is this PR for?

<br/>

**1. The purpose of this PR is introducing webpack to zeppelin-web**

- It supports super-fast javascript compilation and (hot) reload
- It helps to simplify, unify build process.
- It enables for us to use `import`, `export` features.
- It's more modern stack than grunt. This will encourage other developers to contribute (*the most import thing IMO*).

**2. This PR is designed to improve build process _gradually!!!_**

- So, Angular module loading depends on the import sequence as we did before in [index.html](https://github.com/apache/zeppelin/blob/master/zeppelin-web/src/index.html#L171). (see [index.js](https://github.com/apache/zeppelin/pull/1805/files#diff-a128f4667c7e1afb6058389c20627b4e)).
- Also, CSS and HTML file is not managed by webpack including its live reloading

*These will be handled by additional PRs.*

**3. This PR is not big**

- 60+ file changes are just about removing `use strict`, importing `zeppelin.js`. (Also includes fixups for #1802 and #1803)
- So skip them while reveiw
- Please focus on the changes in `Gruntfile.js`, `package.json`, `webpack.config.js`

<br/>

### What type of PR is it?
[Improvement]

### Todos
* [x] - Setup webpack.config.js
* [x] - Resolve global variable `zeppelin` problem
* [x] - Support webpack in karma (`npm run test`)
* [x] - Annotate the result bundle using webpack ng annotate plugin
* [x] - Fix eslint violations
* [x] - Livereload for HTML, CSS

### What is the Jira issue?

[ZEPPELIN-1850](https://issues.apache.org/jira/browse/ZEPPELIN-1850)

### How should this be tested?

- `cd zeppelin-web && rm -rf node_modules bower_components node`
- `npm install`
- `npm run test`
- `npm run build`
- `npm run dev` and open `localhost:9000`: **check live-reload works regarding to html, css, js files**
- `cd .. && mvn clean package -pl 'zeppelin-web' -DskipTests &&  ./bin/zeppelin-daemon.sh restart` and open `localhost:8080`

### Screenshots (if appropriate)

N/A

### Questions:
* Does the licenses files need update? - NO
* Is there breaking changes for older versions? - NO
* Does this needs documentation? - NO

Author: 1ambda <1amb4a@gmail.com>

Closes #1805 from 1ambda/ZEPPELIN-1850/introduce-webpack and squashes the following commits:

920589b [1ambda] REVIEW: Add strip-loader to remove console.log
6aa25b8 [1ambda] REVIEW: Update zeppelin-web/README.md
bfc635b [1ambda] REVIEW: Rename  to  in package.json
a6ffe42 [1ambda] WORKING: Ignore .babelrc in RAT
533531d [1ambda] WORKING: Cleanup Gruntfile.js
fcca30f [1ambda] WORKING: LIVE RELOAD on css, html
4bff61c [1ambda] WORKING: DON'T COPY bower_components
45cb978 [1ambda] WORKING: Use webpack ng annotate plugin
b0c7d01 [1ambda] WORKING: npm run build w/o ugly, ngAn
d1352d0 [1ambda] WORKING: FIX ESLINT
7aed1bc [1ambda] WORKING: Remove grunt-karma
ea7f186 [1ambda] WORKING: npm run test
94bedef [1ambda] WORKING: modularize grunt webpack task
b8acc28 [1ambda] WORKING: Setup  command properly.
d715d2a [1ambda] WORKING: remove all js from index.html
71de16f [1ambda] WORKING: using ProvidePlugin
ed04f4e [1ambda] FIXUP: #1802
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants