Skip to content

Conversation

@benjiwheeler
Copy link
Contributor

@benjiwheeler benjiwheeler commented Oct 4, 2018

Resolves

#2954

Proposed Changes

Introduces support for loading a new project, in both playground/standalone player and embedded/login-able modes.

Currently uses a state machine to manage where in the project loading and displaying lifecycle we currently are.

Reason for Changes

Users need to be able to create new projects from within the editor.

Test Coverage

None yet.

Browser Coverage

Mac

  • Chrome
  • Firefox
  • Safari

Windows

  • Chrome
  • Firefox
  • Edge

Chromebook

  • Chrome

iPad

  • Safari

Android Tablet

  • Chrome

@benjiwheeler
Copy link
Contributor Author

Tests seem to be failing because of this #3305

@benjiwheeler
Copy link
Contributor Author

One thought: I think we could get similar functionality to the state machine from a set of booleans managed in the project-id reducer (or whatever we end up calling it).

Not positive if it would feel cleaner, but if it worked, the interface to the components could be essentially the same, but the inner workings of the reducer would be more familiar to other developers, and it would be more redux-y.

Copy link
Contributor

@rschamp rschamp left a comment

Choose a reason for hiding this comment

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

I have reviewed about half of this. But just want to get these comments published before the end of the day.

@benjiwheeler
Copy link
Contributor Author

This is in good shape now, I think!

The big outstanding issue are the tests. test/unit/util/hash-project-loader-hoc.test.jsx and test/unit/util/hash-project-fetcher-hoc.test.jsx are both broken now; unclear to me how to fix them.

stripped title handling from sb file uploader
updated more projectState related names
simplified hash-parser-hoc logic slightly
rschamp
rschamp previously approved these changes Oct 11, 2018
const loadingState = state.scratchGui.projectState.loadingState;
const user = state.session && state.session.session && state.session.session.user;
return {
accountMenuOpen: accountMenuOpen(state),

This comment was marked as abuse.

onRequestCloseLogin: () => dispatch(closeLoginMenu()),
onSeeCommunity: () => dispatch(setPlayer(true))
onClickNew: canSave => dispatch(newProjectRequested(canSave)),
onClickSave: () => dispatch(saveRequested()),

This comment was marked as abuse.

},
plugins: base.plugins.concat([
new webpack.DefinePlugin({
'process.env.API_HOST': '"' + process.env.API_HOST + '"',

This comment was marked as abuse.

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.

3 participants