Skip to content

Commit

Permalink
Merge pull request #2947 from kbase/DATAUP-745_text_changes_to_XSV
Browse files Browse the repository at this point in the history
DATAUP-745: Updates to the UI based on user testing feedback
  • Loading branch information
ialarmedalien authored May 4, 2022
2 parents b33c897 + afd552a commit 84fc3fc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 16 deletions.
2 changes: 1 addition & 1 deletion nbextensions/bulkImportCell/tabs/configure.js
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ define([
span({
class: `${cssBaseClass}__button_icon--add_row fa fa-download`,
}),
'Generate CSV Template',
'Create Import Template',
]
);
}
Expand Down
19 changes: 8 additions & 11 deletions nbextensions/bulkImportCell/tabs/xsvGenerator.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ define(['StagingServiceClient', 'common/html', 'common/runtime', 'common/ui', 'u
const body = this.renderLayout();
const formValues = {};
const modalArgs = {
title: 'Create CSV Template',
title: 'Create Import Specification Template',
body,
okLabel: 'Generate template!',
onConfirm: () => {
Expand Down Expand Up @@ -241,7 +241,6 @@ define(['StagingServiceClient', 'common/html', 'common/runtime', 'common/ui', 'u
createForm() {
this.id = html.genId();
const typeArray = Object.keys(this.model.getItem('params'));
const state = this.model.getItem('state');
const multiFileInfo = p(
'Choosing Excel as output file type will create a single file with ' +
'a page for each import type; CSV and TSV create one file per import type.'
Expand Down Expand Up @@ -295,18 +294,10 @@ define(['StagingServiceClient', 'common/html', 'common/runtime', 'common/ui', 'u
required: 'required',
},
typeArray.sort().map((opt) => {
if (state.selectedFileType === opt) {
return option(
{
value: opt,
selected: 'selected',
},
this.fileTypeMapping[opt]
);
}
return option(
{
value: opt,
selected: 'selected',
},
this.fileTypeMapping[opt]
);
Expand Down Expand Up @@ -502,6 +493,12 @@ define(['StagingServiceClient', 'common/html', 'common/runtime', 'common/ui', 'u
);
})
),
p(
{
class: `${cssBaseClass}__result_text`,
},
'Import specification templates can be downloaded from the staging area and edited locally, and then re-uploaded and used for bulk import.'
),
]
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -437,10 +437,7 @@ define([
expect(this.xsvGen.runRequest.calls.allArgs()).toEqual([
[
{
types: {
// only the SRA reads are selected
sra_reads: expectedOutput.sra_reads,
},
types: expectedOutput,
// these are the defaults
output_directory: 'bulk_import_templates',
output_file_type: 'CSV',
Expand Down

0 comments on commit 84fc3fc

Please sign in to comment.