Skip to content

Commit

Permalink
Merge branch 'hotfix/1.8.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
gordonwoodhull committed Oct 10, 2017
2 parents f1cf88b + 46f266c commit 1edd086
Show file tree
Hide file tree
Showing 30 changed files with 233 additions and 569 deletions.
15 changes: 15 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
## RCloud 1.8.1

### Feature
* When using [rcloud-gist-services](https://github.com/att/rcloud-gist-services) as the
notebook backend, it is possible for multiple users to collaborate on a set of
notebooks, by putting those notebooks under a shared virtual user id.

### Improvements
* `rcloud.shiny` is now self-contained in its own package - `/shiny.html`
forwards to `shared.R/rcloud.shiny/shiny.html`

### Bugfixes
* dataframe viewer would crash the UI if the dataframe had only one column (#2445)


## RCloud 1.8

See the news for
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.8
1.8.1
2 changes: 1 addition & 1 deletion conf/rcloud.conf.samp
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ rcs.engine: redis
rcloud.alluser.addons: rcloud.viewer, rcloud.enviewer, rcloud.notebook.info, rcloud.htmlwidgets, rcloud.rmd, rcloud.flexdashboard
rcloud.languages: rcloud.r, rcloud.python, rcloud.rmarkdown
compute.separation.modes: IDE
# if using rcloud-gist-service
#--: if using rcloud-gist-service
#rational.githubgist: true
203 changes: 0 additions & 203 deletions htdocs/css/rcloud-shiny.css

This file was deleted.

9 changes: 0 additions & 9 deletions htdocs/css/rcloud-shiny.css.map

This file was deleted.

8 changes: 6 additions & 2 deletions htdocs/js/notebook/notebook_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,17 @@ Notebook.create_controller = function(model)
return {controller: cell_controller, changes: model.insert_cell(cell_model, id)};
}

function is_collaborator(notebook, user) {
return notebook.collaborators && notebook.collaborators.find(function(c) { return c.login === user; });
}

function on_load(version, notebook) {
// the git backend should determine readonly but that's another huge refactor
// and it would require multiple usernames, which would be a rather huge change
var ninf = editor.get_notebook_info(notebook.id);
var is_read_only = ninf && ninf.source ||
version !== null ||
notebook.user.login !== rcloud.username() ||
(notebook.user.login !== rcloud.username() && !is_collaborator(notebook, rcloud.username())) ||
shell.is_view_mode();
current_gist_ = notebook;
current_version_ = notebook.history[0].version;
Expand Down Expand Up @@ -568,7 +572,7 @@ Notebook.create_controller = function(model)
//////////////////////////////////////////////////////////////////////

is_mine: function() {
return rcloud.username() === model.user();
return rcloud.username() === model.user() || is_collaborator(this.current_gist(), rcloud.username());
},

//////////////////////////////////////////////////////////////////////
Expand Down
23 changes: 14 additions & 9 deletions htdocs/js/rcloud_bundle.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified htdocs/js/rcloud_bundle.js.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion htdocs/js/rcloud_bundle.js.map

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions htdocs/js/rcloud_bundle.min.js

Large diffs are not rendered by default.

Binary file modified htdocs/js/rcloud_bundle.min.js.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion htdocs/js/rcloud_bundle.min.js.map

Large diffs are not rendered by default.

9 changes: 7 additions & 2 deletions htdocs/js/ui/notebook_title.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,17 @@ RCloud.UI.notebook_title = (function() {
editable_opts));
},
update_fork_info: function(fork_id) {
var url = ui_utils.make_url(shell.is_view_mode() ? 'view.html' : 'edit.html',
{notebook: fork_id});
if(fork_id) {
rcloud.get_notebook_info(fork_id).then(function(info) {
var fork_desc = (info.username || 'unknown') + " / " + (info.description || 'unknown');
var url = ui_utils.make_url(shell.is_view_mode() ? 'view.html' : 'edit.html',
{notebook: fork_id});
$("#forked-from-desc").html("forked from <a href='" + url + "'>" + fork_desc + "</a>");
}).catch(function(error) {
if(/does not exist or has not been published/.test(error))
$("#forked-from-desc").html("forked from <a href='" + url + "'>(unknown notebook)</a>");
else
$("#forked-from-desc").text("");
});
}
else
Expand Down
4 changes: 0 additions & 4 deletions htdocs/js/ui/share_button.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,6 @@ RCloud.UI.share_button = (function() {
'mini.html': {
sort: 3000,
page: 'mini.html'
},
'shiny.html': {
sort: 4000,
page: 'shiny.html'
}
});
return this;
Expand Down
16 changes: 14 additions & 2 deletions htdocs/lib/ace_bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -25743,10 +25743,22 @@ var AcePopup = function(parentNode) {
el.style.bottom = "";
popup.isTopdown = true;
}

el.style.display = "";
this.renderer.$textLayer.checkForSizeChanges();


var requiredWidth = 0;
popup.data.forEach(function(x) {
var fullSize = x.value.length + (x.meta && x.meta.length);
if ( fullSize > requiredWidth ) {
requiredWidth = fullSize;
}
});
el.style.width = ((requiredWidth + 4) * popup.renderer.$textLayer.getCharacterWidth()) + "px";
if (el.style.width === "0px") {
el.style.width = null;
}

var left = pos.left;
if (left + el.offsetWidth > screenWidth)
left = screenWidth - el.offsetWidth;
Expand Down
Binary file modified htdocs/lib/ace_bundle.js.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion htdocs/lib/ace_bundle.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions htdocs/lib/ace_bundle.min.js

Large diffs are not rendered by default.

Binary file modified htdocs/lib/ace_bundle.min.js.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion htdocs/lib/ace_bundle.min.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions htdocs/lib/js/ace/ace.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ following changes:
`selection.getRange()` instead of `selection.getAllRanges()` - unclear why the latter doesn't work
- ace-cpp-autoindent needs extra parameters for `mode.getNextLineIndent()` to work
- add call to rcloud.get_completions for python mode
- resize completion popup to fit contents in `ext-language_tools.js`
Loading

0 comments on commit 1edd086

Please sign in to comment.