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

[student-libraries] Allow exporting nested libraries #31971

Merged
merged 3 commits into from Nov 21, 2019

Conversation

jmkulwik
Copy link
Contributor

@jmkulwik jmkulwik commented Nov 18, 2019

Description

Previously, students who exported a library that used a different library would cause breaks in projects that imported their library. This fixes that issue. Students can now import a library into a project and publish that project as a library.

Links

Testing story

Updated tests

Reviewer Checklist:

  • Tests provide adequate coverage
  • Code is well-commented
  • New features are translatable or updates will not break translations
  • Relevant documentation has been added or updated
  • User impact is well-understood and desirable
  • Pull Request is labeled appropriately
  • Follow-up work items (including potential tech debt) are tracked and linked

@jmkulwik jmkulwik changed the title Export library with library [student-libraries] Allow exporting nested libraries Nov 18, 2019
@@ -100,11 +100,17 @@ class LibraryCreationDialog extends React.Component {
this.setState({publishState: PublishState.NO_FUNCTIONS});
return;
}
let librarySource = response.source;
response.libraries &&
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I think this would be clearer as if (response.libraries) {...}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

let libraryName = 'name';
let source = 'function foo() {}';
beforeEach(() => {
getJSLintAnnotationsStub = sinon.stub(
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I'm not sure if there's a better name, but getJSLintAnnotationsStub to me reads like it's a function to get a stub for JSLintAnnotations

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried finding a better name, but couldn't come up with anything (stubGetJSLintAnnotations has the same problem). I'm going to leave it as-is.

@jmkulwik jmkulwik merged commit 19a9ee7 into staging Nov 21, 2019
@jmkulwik jmkulwik deleted the export-library-with-library branch November 21, 2019 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants