-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
[RNMobile] Update "add block" button style in default editor view #39726
Merged
SiobhyB
merged 45 commits into
trunk
from
rnmobile/update/default-block-inserter-button
Apr 13, 2022
Merged
Changes from all commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
2b3c19d
Update CHANGELOG
37960ce
Add 'add content' text
5ad815a
Add 'isDefaultView' check
556ac19
Rename CSS selectors to follow BEM methodology
53db20c
[WIP] Implement styles using 'isDefaultView' check
392832f
Separate 'defaultViewProps' for readability
b0693a7
Improvement to CSS code quality
8197083
Separate 'defaultViewText' into its own variable
46c31dd
Update CHANGELOG
03aa6ae
Merge branch 'trunk' into rnmobile/update/default-block-inserter-button
532c437
Remove redundant code causing unit test failure
b7ac622
Add styling for dark mode
d699e78
Merge branch 'trunk' into rnmobile/update/default-block-inserter-button
38df61c
Vertically align text within button
4af6403
Merge branch 'trunk' into rnmobile/update/default-block-inserter-button
005e6c7
Update text for clarity
4b5aa48
Assign larger height to toolbar in default view
19e5eb5
Hide new default view style when title's selected
ede9c16
Merge branch 'trunk' into rnmobile/update/default-block-inserter-button
0212fbf
Apply CSS for default toolbar
c31c897
Tweaks to button's styling
d8684a2
Update text in expanded button
0039c10
Set icon size to 24 (the default)
7769cac
Update height of editor's default toolbar
4a2ed4a
Refine expanded button's padding
c459a7b
Update button's background colour in light mode
d2822fe
Prevent expanded button displaying in some cases
82eeb5f
Merge branch 'trunk' into rnmobile/update/default-block-inserter-button
7d3399f
Revert "false fix"
fd73fa6
Turn 'isDefaultView' into 'global' editor setting
db5d32e
Prevent unwanted 'flash' of 'expanded' button
a35a8e5
Tweak code comment for clarity
3715ee6
Merge branch 'trunk' into rnmobile/update/default-block-inserter-button
ac5607e
Remove redundant code causing test failures
95cda71
Revert "Remove redundant code causing test failures"
24d9294
Revert "Turn 'isDefaultView' into 'global' editor setting"
fluiddot adf4173
Revert "Prevent unwanted 'flash' of 'expanded' button"
fluiddot bc9b4ea
Preserve isDefaultView value while inserter is open
fluiddot 86fada7
Rename isInserterOpen state value
fluiddot 28e772b
Apply BEM naming in header toolbar styles
fluiddot ee54130
Rename default view to expanded mode
fluiddot ee12890
Use hasSelectedBlock selector
fluiddot fc2403f
Fix header toolbar height in layout component
fluiddot 4106e33
Add style mock
fluiddot 1820356
Merge branch 'trunk' into rnmobile/update/default-block-inserter-button
fluiddot 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
27 changes: 24 additions & 3 deletions
27
packages/block-editor/src/components/inserter/style.native.scss
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
12 changes: 8 additions & 4 deletions
12
packages/edit-post/src/components/header/header-toolbar/style.native.scss
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 |
---|---|---|
|
@@ -156,4 +156,7 @@ module.exports = { | |
addMediaButton: { | ||
color: 'white', | ||
}, | ||
'header-toolbar__container': { | ||
height: 44, | ||
}, | ||
}; |
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.
This value takes the default height of the header toolbar, so it doesn't take into account the case when the toolbar is displayed in the expanded mode. As far as I tested, I didn't identify any visual issue regarding this logic, so looks safe to only use that value.
In the future, it would be great to update this calculation, and instead of accessing the height from the styles, retrieve it from the
onLayout
event.