-
Notifications
You must be signed in to change notification settings - Fork 142
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
Rewrite - Standalone frame #582
base: master
Are you sure you want to change the base?
Conversation
…bundle-wp-scripts
…bundle-wp-scripts
# Conflicts: # Gruntfile.js
|
||
// Path to WordPress install. Either absoloute or relative to this plugin. | ||
// Change this by passing --abspath="new/path" as a grunt option. | ||
var abspath = grunt.option( "abspath" ) ? grunt.option( "abspath" ) : '/tmp/wordpress'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be possible to sniff the WP_DEVELOP_DIR
environment variable too, so it works interchangeably with how PHPUnit tests work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added this too. Prioritiy is
- If passing abspath use that. (Allows running tests without setting up full test install)
- If environment var defined use that
- Else use
/tmp/wordpress
Lot of code changing here :) I'll check it out locally sometime in the next week or so to give it more of a click-through. For common reference, can you share some screenshots or GIFs of how it looks? |
…te-2-standalone-frame # Conflicts: # js/build/shortcode-ui.js # js/src/views/shortcode-ui.js
Yes this is a big one :) He'res a little video: https://www.youtube.com/watch?v=QOAlpes9rz8 Note - it includes the code from this which can go in first and is also fairly large: #581 |
Following some of the feedback we've had, I've pulled the 'Add post element' menu item out of the 'add media' modal, and into its own frame.
This is a bit of a big change, but would be interested to get some feedback on it.
From a UX perspective, I like it. Code wise, I like this too. Feels quite neat.
Heres a rundown of the changes.
views/shortcode-ui.js
andviews/media-frame.js
into a single view. These were too tightly coupled and couldn't really be used independently of one another.MediaFrame
.insertCallback
to do whatever you need. You would of course need to do a bunch of stuff yourself such as preview, edit, buttons etc. But theoretically its possible.Despite the complete rewrite of the media-frame code, it should still function very much as before.
NOTE - this DIFF is massive. But i've got a few other pull requests that can go in before this and will make it much more readable.