-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Writing Flow: Trailing placeholder attempt 3 #4539
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
46e45c5
Editor: Bring back the trailing placeholder
youknowriad 0bb22de
Adding an inserter next to the last block
youknowriad 5f85d32
Branch off of older version and ad side inserter
2e9e089
Polish ellipsis menu
220e1ef
Adjust side inserter further, make it hidden until parent is hovered.
3c75f31
Adjust block padding math
b2ff784
Fix mobile.
0c61706
Fix some pixel discrepancies.
c5b2ebb
Final pixel adjustments.
b4eb981
Adjust design of side inserter to be lighter
7e83930
Polish the left area a bit
87b7211
Fix some tests, some rebase issues and refactor
07e116f
Polish the appender so it's pixel perfect.
0d2abc8
Change default appender to be input
aaa0ebc
Fix test.
de1c9b5
Side Inserter: Fix design post rebase
youknowriad 308bc80
Remove sibling inserter
youknowriad c17e331
Side Inserter: Select the block when opening the inserter
youknowriad File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/** | ||
* External dependencies | ||
*/ | ||
import { connect } from 'react-redux'; | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
import { | ||
getBlockUids, | ||
getBlockInsertionPoint, | ||
isBlockInsertionPointVisible, | ||
} from '../../store/selectors'; | ||
|
||
function BlockInsertionPoint( { showInsertionPoint } ) { | ||
if ( ! showInsertionPoint ) { | ||
return null; | ||
} | ||
|
||
return <div className="editor-block-list__insertion-point" />; | ||
} | ||
|
||
export default connect( | ||
( state, { uid } ) => { | ||
const blockIndex = uid ? getBlockUids( state ).indexOf( uid ) : -1; | ||
const insertIndex = blockIndex > -1 ? blockIndex + 1 : 0; | ||
|
||
return { | ||
showInsertionPoint: ( | ||
isBlockInsertionPointVisible( state ) && | ||
getBlockInsertionPoint( state ) === insertIndex | ||
), | ||
}; | ||
}, | ||
)( BlockInsertionPoint ); |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
When will this insertion point ever be shown?
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.
It is supposed to be shown when you open the inserter in an empty post but I just tried and it's not showing up. Might be an issue somewhere else.
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.
Oh! I guess it's the inversed condition and also some styling issues.
On a second thought, might be it's not needed when the post is empty.