Skip to content

Conversation

@benjiwheeler
Copy link
Contributor

scratchfoundation/scratch-gui#5168 proposed a refactor where TitledHOC changed its role from:
Before: "wrap GUI and maintain projectTitle state, if no other external parent is maintaining it"
to
After: "wrap GUI and interface between external parent's projectTitle prop, and GUI's redux projectTitle"

This means that TitledHOC can't be used to wrap ScratchDesktopHOC anymore -- it no longer does the thing we used it for. Instead, ScratchDesktopHOC needs to maintain its own projectTitle state, since the main Electron process may send a projectTitle in on file load.

Important: this should only be merged if scratchfoundation/scratch-gui#5168 is also merged. scratchfoundation/scratch-gui#5168 should be merged first, so the resulting version of GUI can be used by scratch-desktop.

@benjiwheeler
Copy link
Contributor Author

I labeled this "needs discussion" because it's not 100% clear yet that this is the direction we're going to go in GUI.

Copy link
Contributor

@cwillisf cwillisf left a comment

Choose a reason for hiding this comment

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

LGTM, pending scratchfoundation/scratch-gui#5168 of course :)

@benjiwheeler
Copy link
Contributor Author

@cwillisf I think we're ready to merge this -- could you test it to confirm that it works, before I do?

@benjiwheeler
Copy link
Contributor Author

@cwillisf wrote:

"I tried it out and ran into two issues. One is an easy fix: in app.jsx, WrappedComponent needs canEditTitle so the title box shows up. The other issue is maybe a little stranger... I don't immediately see what's going wrong, but the setTitleFromSave stuff isn't currently working. That is, changing the project file name in the save dialog doesn't cause the title box to update."

@benjiwheeler
Copy link
Contributor Author

Next step: get desktop running locally, so I can debug this PR

@benjiwheeler
Copy link
Contributor Author

OK @cwillisf, please try it out now! It should be working:

desktop title

Copy link
Contributor

@cwillisf cwillisf left a comment

Choose a reason for hiding this comment

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

Looks good! I tested it locally and everything seemed to be in working order. Thanks!

@benjiwheeler benjiwheeler merged commit 19196c3 into scratchfoundation:develop Nov 18, 2019
@benjiwheeler benjiwheeler deleted the manage-title branch November 18, 2019 19:49
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.

2 participants