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

Integrate Java Lab with Code Studio #39111

Merged
merged 12 commits into from Feb 19, 2021
Merged

Integrate Java Lab with Code Studio #39111

merged 12 commits into from Feb 19, 2021

Conversation

molly-moen
Copy link
Contributor

@molly-moen molly-moen commented Feb 17, 2021

Plumbing for integrating Java Lab with code studio. Heavily based on similar work for ai lab.

This work enables levelbuilders to access the Java Lab by going to studio.code.org/projects/javalab/new. This will spin up a new project that can be renamed. Any code put in the editor is not saved yet. It removes the previous url of studio.code.org/javalab. The project will be labeled as "Java Lab" on the my projects page.

The goals of this PR are:

  • enable projects url for Java Lab
  • keep Java Lab hidden for all but levelbuilders
  • get the lab ready for further integration with projects and levelbuilder

I recommend viewing this PR with whitespace changes hidden.

This is what spinning up a new JavaLab project looks like:
Screen Shot 2021-02-17 at 12 44 40 PM

Links

Testing story

Tested locally with both levelbuilder and non-levelbuilder permissions (to ensure only levelbuilder permissions allow viewing the lab).

Follow-up work

  • Save code written in editor (includes setting up file naming)
  • Integrate with levelbuilder, including:
    • Integrate instructions on editor with level definition
    • Make bubble progression work (not tested since we just have a project currently)
  • Make the UI more accessible

PR Checklist:

  • Tests provide adequate coverage
  • Privacy and Security impacts have been assessed
  • 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

/**
* Inject the studioApp singleton.
*/
Javalab.prototype.injectStudioApp = function(studioApp) {
Copy link
Contributor

@jmkulwik jmkulwik Feb 17, 2021

Choose a reason for hiding this comment

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

We haven't been consistent on this everywhere in other apps, but this should probably be JavaLab and JavaLab.js (similar to GameLab and SpriteLab). Reasoning: On the product side, we'll always refer to it as two separate words "Java Lab" so camelcasing the two words would make sense.

Copy link
Contributor

@jmkulwik jmkulwik Feb 17, 2021

Choose a reason for hiding this comment

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

Huh now I'm noticing we're very inconsistent about this in all our apps.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah I'm happy to go with either (camel casing probably makes more sense?) but it seemed like keeping lab lowercase was the norm in general

Copy link
Contributor

Choose a reason for hiding this comment

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

Well. haha. When I first read this, I felt strongly that camel casing was the right option. Then I saw what we do everywhere else. I'm happy with whatever you choose.

},
javalab: {
name: 'New Java Lab Project',
levelbuilder_required: true
Copy link
Contributor

Choose a reason for hiding this comment

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

TIL about levelbuilder_required: true 🤯

Copy link
Contributor

@jmkulwik jmkulwik left a comment

Choose a reason for hiding this comment

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

Nice work finding all this!

import {TestResults} from '@cdo/apps/constants';

/**
* On small mobile devices, when in portrait orientation, we show an overlay
Copy link
Contributor

Choose a reason for hiding this comment

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

Is Java Lab going to be supported on mobile/tablet?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

tablet yes, mobile not in pilot and I think only view-only.

@ajpal
Copy link
Contributor

ajpal commented Feb 17, 2021

Is Java Lab going to be the product name for this environment as well? Mostly curious because this is the first lab that will be named for its language rather than its intended use (Web Lab not HTML Lab, App Lab not JS Lab, etc). I don't have an alternative to propose or anything, just curious if it's something you've thought about

@molly-moen
Copy link
Contributor Author

Is Java Lab going to be the product name for this environment as well? Mostly curious because this is the first lab that will be named for its language rather than its intended use (Web Lab not HTML Lab, App Lab not JS Lab, etc). I don't have an alternative to propose or anything, just curious if it's something you've thought about

@ajpal, yes we talked about various possibilities for naming, and since Java is the defining feature of this environment, we went with Java Lab (the only other defining feature is it's an IDE, but you could argue our other labs are also IDEs). I think it's our plan to use that on the product side as well but it could possibly change.

@molly-moen molly-moen merged commit f722bab into staging Feb 19, 2021
@molly-moen molly-moen deleted the java-lab-code-studio branch February 19, 2021 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants