Skip to content

Commit

Permalink
#7274 add Foldout widget for mvn added jars (#7345)
Browse files Browse the repository at this point in the history
* #7274: [java] add Foldout widget

* #7325: Remove the text "Downloaded: " from the progress.

* #7274 add Foldout widget

* #7274 Foldout js widget implementation

* #7274: add header to foldout

* #7274 fix lab missing FoldoutModel
  • Loading branch information
Mariusz Jurowicz authored and scottdraves committed May 14, 2018
1 parent 018fed9 commit a19c307
Show file tree
Hide file tree
Showing 17 changed files with 249 additions and 53 deletions.
2 changes: 1 addition & 1 deletion js/lab/src/plugin/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class BeakerxExtension implements DocumentRegistry.WidgetExtension {
registerGlobal();
let app = this.app;
let settings = this.settings;
Promise.all([panel.ready, context.ready]).then(function() {
Promise.all([panel.ready, panel.session.ready, context.ready]).then(function() {
enableInitializationCellsFeature(panel);
registerCommentOutCmd(panel);
registerCommTargets(panel, context);
Expand Down
88 changes: 88 additions & 0 deletions js/notebook/src/Foldout.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
/*
* Copyright 2018 TWO SIGMA OPEN SOURCE, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

const widgets = require('./widgets');
const DEFAULT_LABEL_TEXT = 'Output';
const DEFAULT_CONTENT_PADDING = 14;
const DEFAULT_CONTENT_MIN_LINE_HEIGHT = 16;
const ANIMATION_DURATION = 500;

class FoldoutModel extends widgets.HTMLModel {
defaults() {
return {
...super.defaults(),
_view_name: "FoldoutView",
_model_name: "FoldoutModel",
_model_module: 'beakerx',
_view_module: 'beakerx',
_model_module_version: BEAKERX_MODULE_VERSION,
_view_module_version: BEAKERX_MODULE_VERSION
};
}
}

class FoldoutView extends widgets.HTMLView {
render() {
super.render();

let active = false;
let hiddenContainer: HTMLElement = document.createElement('div');
let minHeight = 2 * DEFAULT_CONTENT_PADDING + DEFAULT_CONTENT_MIN_LINE_HEIGHT;
let timeoutId;

hiddenContainer.innerHTML = this.content.outerHTML;
let original = hiddenContainer.firstChild as HTMLElement;

hiddenContainer.style.visibility = 'hidden';
hiddenContainer.style.position = 'fixed';
hiddenContainer.style.zIndex = '-1';
original.style.whiteSpace = 'normal';
original.style.height = 'auto';

this.el.classList.add('foldout-widget');
this.el.appendChild(hiddenContainer);

this.content.style.whiteSpace = 'nowrap';

if (!this.label.innerText) {
this.label.innerText = DEFAULT_LABEL_TEXT;
this.label.style.display = 'block'
}

this.label.addEventListener('click', () => {
clearTimeout(timeoutId);
active = !active;
this.el.classList.toggle('active', active);

if (active) {
hiddenContainer.style.width = `${this.el.clientWidth}px`;
this.content.style.whiteSpace = 'normal';
this.content.style.height = `${ original.clientHeight }px`;
} else {
this.content.style.height = `${minHeight}px`;
timeoutId = setTimeout(
() => { this.content.style.whiteSpace = 'nowrap'; },
ANIMATION_DURATION
);
}
});
}
}

export default {
FoldoutModel,
FoldoutView
};
3 changes: 2 additions & 1 deletion js/notebook/src/embed.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ var loadedModules = [
require("./SparkUI").default,
require("./SparkStateProgress").default,
require("./HTMLPre").default,
require("./BxHTML").default
require("./BxHTML").default,
require("./Foldout").default
];

for (var i in loadedModules) {
Expand Down
3 changes: 2 additions & 1 deletion js/notebook/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ var loadedModules = [
require("./SparkUI").default,
require("./SparkStateProgress").default,
require("./HTMLPre").default,
require("./BxHTML").default
require("./BxHTML").default,
require("./Foldout").default
];

for (var i in loadedModules) {
Expand Down
55 changes: 55 additions & 0 deletions js/notebook/src/shared/style/beakerx.scss
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,58 @@ $focusColor: #66bb6a;
.jp-Toolbar-button.fa {
line-height: 100%;
}

.foldout-widget.widget-html {
display: block;

& > .widget-label {
display: block;
cursor: pointer;
text-align: left;
line-height: normal;
text-indent: 16px;
border-radius: 3px 3px 0 0;
position: relative;
margin: 2px 0 0 0;
padding: .5em .5em .5em .7em;
font-size: 100%;
width: 100%;

&:before {
content: '';
display: block;
position: absolute;
width: 16px;
height: 16px;
left: .5em;
top: 50%;
margin-top: -8px;
background-position: -32px -16px;
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAADwCAMAAADYSUr5AAABDlBMVEVEREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREQf23IJAAAAWnRSTlMAGf8QMwQIUL+CmS8iVXFAZmAaEzLMDSE8FkJISyAeWiMnMVMshTSHgMNqyM/GOEUcvLi+fKu1pYyqqK0fsin9AZ5RJO8KBgIDj6JilEqgr23fnEdjP29/kWiyI5UtAAAM80lEQVR4Aezb3XLzOgiFYXh8//e8T8MwQeNJ8yXd5T2zF8RiCfm3jWVZvoGUf7x+X+6AfLnEUZRkCZYf7EBQAsgoEFVNilpJ2gFafgkmP9eBoM1R2cEwg0GM6WDqh5ryXur4hxIGPZFD9vTrDbIe8e2QY4FtCsF5DU0dMAygdsCn6EM8d/AQkBzsJUsw+XeuApHIGiz3RmhZlmVZluVP3Anmd92Igbojh4IAg1/z+4CkZqSQn3wjld2AFlC3kM/9St2AHB8eg/yn9ZOnEQ9yIge/Zj8bCMS/AjD3rCzi+X1ATn4W9YMdMJDe+T4gT0sw5F4FlmVZlmVZ/gTiFcBLv++zBQTmHWdxxr3jw/AD5gOcM6DKekhN17SCvmkcjfPx53oM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r9+4Y4MmPAffmWYAtd8ZZYLgOGBgYGBgYoNElJvwl/v4wSAZwHi5R/YzF3zVBRlV/C5UcZP7+QX+/Q1nxj/hbrJQQxvgE8D/jTfsdSeBF6e9aL7YtAKuFxhdu0BZSzItivv5g5/P2eXZzul5QYH7HETnXhnOidlQNLAKnmQCmG0bTkRU4YjTavIBNZ8ra0+lMsel3ZgdI1gHtuLCiW74pH19AvGm/MxnTSGoYywCVLEoXwD07CFbw4vmLUKUBiLqmWz66V6l+Bn6udBkZGBgYGLD3B/R1/xBVf/frO47n8e8P6Of+Mbr+7td3BO/Bjxj82MPdg5Q35359x/D9+PcHmEPqfwj0x85/ABAAP5iDd2Wm2/rd9uSdvdNnklLHO6CN98E/HE2LufTHHxLQc36bnnek/HTT1P1PpNT//fff1AFpCX0DsF/IOH9If7gdFvn5kS8oM78PoO/+CNjny239BwygkZpcAJmfuYL6uw+ofwcsdVE/hzsEmiazQz0dnOcDbKfu75C8w1JLegZgg5ryg5oNghvPDVJ4V2Z6ZpCUd/LTzfIOS/MeHPM05td3BO/B8S5k/PqO43mOfSnr13csHxgYGBgYGNgDFxzc7xooNtDf78EA2B8ABamD9gcgdHcFABTk3QeEJPY5GjpgGAMYzgKXloGBgYGBgYERultAaC9E4s3XP9Ldwkij/xzAiEz9l6IDXL3md2cHMLKPTAAY3XpR1+/dMSAa3fpHvn5Gl6MDrH4y9V+CDsjWf1nOApn6L+F1gNV/F48BB4BR+zUwcIfzP/8S/ZOlvFfuAAAAAElFTkSuQmCC");
}
}

&.active {
.widget-label {
&:before {
background-position: -65px -16px;
}
}

.widget-html-content {
height: 1em;
}
}

.widget-html-content {
font-size: 14px;
line-height: 1.3em;
padding: 1em 2.2em;
border: 1px solid #ababab;
border-top: 0;
border-radius: 0 0 3px 3px;
text-overflow: ellipsis;
overflow: hidden;
transition: height 0.5s ease-in-out;
}
}
3 changes: 3 additions & 0 deletions js/notebook/src/shared/style/spark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* limitations under the License.
*/

.foldout-widget,
.bx-spark-stateProgress {
h3 {
text-indent: 16px;
Expand All @@ -24,6 +25,8 @@
background-image: url("~jquery-ui/themes/base/images/ui-icons_444444_256x240.png");
}
}

.widget-label,
.ui-accordion-header.ui-state-active {
border: 1px solid #c5c5c5;
background: #e6e6e6;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,7 @@ public MagicCommandOutcomeItem execute(MagicCommandExecutionParam param) {
TryResult either = kernel.executeCode(codeToExecute, seo);
if (either.isResult()) {
try {
Collection<String> newAddedJars = addJars(either.result());
if (newAddedJars.isEmpty()) {
return new MagicCommandOutput(MagicCommandOutput.Status.OK);
}
String textMessage = "Added jar" + (newAddedJars.size() > 1 ? "s: " : ": ") + newAddedJars;
return new MagicCommandOutput(MagicCommandOutput.Status.OK, textMessage);
return addJars(either.result());
} catch (Exception e) {
return new MagicCommandOutput(MagicCommandOutput.Status.ERROR, "There occurs problem during execution of " + CLASSPATH_ADD_DYNAMIC + " : " + e.getMessage());
}
Expand All @@ -76,11 +71,11 @@ public MagicCommandOutcomeItem execute(MagicCommandExecutionParam param) {
}

@SuppressWarnings("unchecked")
private Collection<String> addJars(Object path) {
private MagicCommandOutcomeItem addJars(Object path) {
if (path instanceof String) {
return addJars((String) path);
return handleAddedJars((String) path);
} else if (path instanceof Collection) {
return addJars((Collection<String>) path);
return handleAddedJars((Collection<String>) path);
} else {
throw new RuntimeException("Classpath dynamic handles String or Collection.");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import com.twosigma.beakerx.kernel.magic.command.MagicCommandFunctionality;
import com.twosigma.beakerx.kernel.magic.command.outcome.MagicCommandOutcomeItem;
import com.twosigma.beakerx.kernel.magic.command.outcome.MagicCommandOutput;
import com.twosigma.beakerx.kernel.magic.command.outcome.MagicCommandOutputHTML;
import com.twosigma.beakerx.kernel.magic.command.outcome.MagicCommandOutputFoldout;

import java.io.IOException;
import java.nio.file.Files;
Expand Down Expand Up @@ -59,12 +59,21 @@ public Collection<String> addJars(String path) {

public MagicCommandOutcomeItem handleAddedJars(String path) {
Collection<String> newAddedJars = addJars(path);
return createResult(newAddedJars);
}

public MagicCommandOutcomeItem handleAddedJars(Collection<String> paths) {
Collection<String> newAddedJars = addJars(paths);
return createResult(newAddedJars);
}

private MagicCommandOutcomeItem createResult(Collection<String> newAddedJars) {
if (newAddedJars.isEmpty()) {
return new MagicCommandOutput(MagicCommandOutput.Status.OK);
}
String textMessage = "Added jar" + (newAddedJars.size() > 1 ? "s: " : ": ") + newAddedJars;
String header = "Added jar" + (newAddedJars.size() > 1 ? "s: " : ": ");
MagicCommandOutput.Status status = MagicCommandOutcomeItem.Status.OK;
return new MagicCommandOutputHTML(status, textMessage);
return new MagicCommandOutputFoldout(status, String.join(", ", newAddedJars), header);
}

private Collection<String> handlePath(String path) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
public class MvnLoggerWidget {

static final int PERIOD = 250;
public static final String DOWNLOADED = "Downloaded";
private BxHTML widget;
private Timer timer;
private volatile int jarNumbers = 0;
Expand All @@ -45,18 +46,22 @@ public void run() {
if (jarNumbers > 0) {
String sizeWithUnit = byteCountToDisplaySize(new Double(sizeInKb * 1000).longValue());
String status = String.format("%d jar%s, %s downloaded at %s", jarNumbers, getPluralFormWhenNumberOfJarGreaterThanOne(), sizeWithUnit, speed);
widget.setValue(status + "</br>" + currentLine);
widget.setValue(status + "</br>" + formatCurrentLine());
}
}
}, 0, PERIOD);
}

private String formatCurrentLine() {
return currentLine.replaceFirst(DOWNLOADED, "").trim().replaceFirst(":","").trim();
}

private String getPluralFormWhenNumberOfJarGreaterThanOne() {
return (jarNumbers > 1) ? "s" : "";
}

public void sendLog(String line) {
if (line != null && !line.trim().isEmpty() && line.matches("Downloaded.+")) {
if (line != null && !line.trim().isEmpty() && line.matches(DOWNLOADED + ".+")) {
this.currentLine = line;
if (line.matches(".+jar.+")) {
this.jarNumbers++;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,22 @@
import com.twosigma.beakerx.kernel.msg.MessageCreator;
import com.twosigma.beakerx.message.Message;
import com.twosigma.beakerx.mimetype.MIMEContainer;
import com.twosigma.beakerx.widget.BxHTML;
import com.twosigma.beakerx.widget.Foldout;

import java.util.Optional;

import static com.twosigma.beakerx.util.Preconditions.checkNotNull;

public class MagicCommandOutputHTML implements MagicCommandOutcomeItem {
public class MagicCommandOutputFoldout implements MagicCommandOutcomeItem {

private final MIMEContainer mineContainer;
private MagicCommandOutput.Status status;
private String header;

public MagicCommandOutputHTML(MagicCommandOutput.Status status, String text) {
public MagicCommandOutputFoldout(MagicCommandOutput.Status status, String text, String header) {
this.mineContainer = MIMEContainer.HTML(checkNotNull(text));
this.status = checkNotNull(status);
this.header = header;
}

@Override
Expand Down Expand Up @@ -69,8 +71,9 @@ public void sendRepliesWithStatus(KernelFunctionality kernel, Message message, i
}

private void sendHTML(Message message) {
BxHTML value = new BxHTML(message);
Foldout value = new Foldout(message);
value.setValue(getMIMEContainer().get().getData());
value.setDescription(this.header);
value.display();
}

Expand Down
49 changes: 49 additions & 0 deletions kernel/base/src/main/java/com/twosigma/beakerx/widget/Foldout.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/*
* Copyright 2018 TWO SIGMA OPEN SOURCE, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.twosigma.beakerx.widget;

import com.twosigma.beakerx.message.Message;

public class Foldout extends StringWidget {

public static final String VIEW_NAME_VALUE = "FoldoutView";
public static final String MODEL_NAME_VALUE = "FoldoutModel";

public Foldout(Message parent) {
super();
openComm(parent);
}

@Override
public String getModelNameValue() {
return MODEL_NAME_VALUE;
}

@Override
public String getViewNameValue() {
return VIEW_NAME_VALUE;
}

@Override
public String getModelModuleValue() {
return BeakerxWidget.MODEL_MODULE_VALUE;
}

@Override
public String getViewModuleValue() {
return BeakerxWidget.VIEW_MODULE_VALUE;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ private void addJarWithCustomMagicCommand() throws InterruptedException {
code.execute(getKernel(), 1);
Optional<Message> updateMessage = EvaluatorResultTestWatcher.waitForUpdateMessage(getKernelSocketsService().getKernelSockets());
String text = (String) TestWidgetUtils.getState(updateMessage.get()).get("value");
assertThat(text).contains("Added jar: [loadMagicJarDemo.jar]");
assertThat(text).contains("loadMagicJarDemo.jar");
}

@Test
Expand Down Expand Up @@ -185,7 +185,7 @@ protected void addDemoJar() throws InterruptedException {
code.execute(getKernel(), 1);
Optional<Message> updateMessage = EvaluatorResultTestWatcher.waitForUpdateMessage(getKernelSocketsService().getKernelSockets());
String text = (String) TestWidgetUtils.getState(updateMessage.get()).get("value");
assertThat(text).contains("Added jar: [demo.jar]");
assertThat(text).contains("demo.jar");
}

@Test
Expand Down
Loading

0 comments on commit a19c307

Please sign in to comment.