-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Add/346 list block/ui #382
Conversation
Removed the new demo files; Removed the changes for headings; Fixed linting issues in the new list plugin;
# Conflicts: # blocks/components/editable/index.js # editor/assets/stylesheets/main.scss # editor/state.js # element/index.js
oh - we'll fix up the CI stuff, didnt notice that |
also, should we follow the react-redux patterns to split out the |
It's a little hard to review the changes because I think it could do for a rebase and force push. Ping me on Slack if you need a hand with this.
Agreed. If you find I'm pulling too far away from where you're trying to execute, please drop a message in Slack #core-editor. I'd love to talk through these ideas. In general though, the smaller we keep pull requests, the less chance we'll run into conflicts and drift.
I avoided (and documented avoidance)
Sure, I think this is a common enough sentiment that it makes sense to build a convention around it.
I don't think we should. They are already separate components ( |
I see a list block in master! Does that mean this PR can be closed, or is it still alive? |
@jasmussen This can be closed. It was superseded and replaced when the UI framework was added. |
This PR is a first cut at a block alignment UI for List blocks for open issue Early List block implementation (no UI yet) #358
We went down a similar route to the merged PR 360 regarding the UI state and messages
Key differences:
after our experience on the prototype, we decided some minimum relevant state so far to render the UI is the currently active block and its bounding rect. We didnt yet find a need for state information about unfocused blocks while drawing the UI.
because of this we opted to add a new slot in the state under 'blocks' called 'focused' where we record the UID and bounding rect of the currently focused block (or null, if the overall Layout no longer has focus).
the new actions are
FOCUS_BLOCK
(when a block receives focus) andFOCUS_LOST
when everything in the layout has lost focuswe didnt want to change any existing state or reducers, to see how it will all shake out
We havent compared this yet to the latest PR from @aduth , which we will do shortly. We seem to have a race condition here :) - similar ideas, slightly different execution. It would be good to work out how to coordinate so we reduce duplicated effort. A bit tricky with so many timezones.
we added an alignment toolbar under controls, and a wrapper for tinymce blocks that wires up the buttons to the tiny api
we added a component AbsolutePosition that wraps things in a positioned div
we refactored a few
connect('inlne stuff')()
calls to beconnect( mapStateToProps, mapDispatchToProps )( );
just because it seemed easier to remember the meaning of the paramsthere were several merge conflicts with master this morning, I hope we resolved it all OK, seems like a few
state
things were removed/changedThe PR has a lot of files, but many are to do with dashicons we pulled in from the tinymce-per-block prototype.
Cheers from @mimo84 & I