Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
2090043
Bootstrap the new admin navigation screen (start with the site editor)
youknowriad Sep 15, 2022
16b18f8
Fix unit tests
youknowriad Oct 14, 2022
82d3778
Tweak the sidebar animation
youknowriad Oct 14, 2022
c72f552
Fix toggle button height
youknowriad Oct 14, 2022
7b43bc2
Improve the animation
youknowriad Oct 14, 2022
525ce71
Add save button to the canvas header
youknowriad Oct 17, 2022
6ae91c8
Fix e2e tests
youknowriad Oct 17, 2022
11ba051
Auto switch to edit mode when clicking templates or template parts
youknowriad Oct 17, 2022
87df95d
Adjust menu spacing and animation vfx
jameskoster Oct 17, 2022
c08add2
Small style refactoring
youknowriad Oct 18, 2022
d6983d3
Add the currently edited template title to the view mode header
youknowriad Oct 18, 2022
1d81206
Add a home button
youknowriad Oct 18, 2022
2269126
a11y improvements
youknowriad Oct 20, 2022
54b547f
Fix more e2e tests
youknowriad Oct 21, 2022
c5cf7d9
Fix performance tests
youknowriad Oct 21, 2022
b5cae0e
more e2e test fixes
youknowriad Oct 21, 2022
5dcaea3
smoother animation
youknowriad Oct 21, 2022
096b23b
Fix the site editor toggle
youknowriad Oct 25, 2022
62328a6
Remove duplicated doc
youknowriad Oct 25, 2022
86914ed
Fix the site editor on mobile
youknowriad Oct 26, 2022
ab14e6f
Remove the editor menu item
youknowriad Oct 26, 2022
c070c55
Fix header padding
youknowriad Oct 26, 2022
0e139af
Selecting a template doesn't move into edit mode right away
youknowriad Oct 26, 2022
7331a5e
Redesign the sidebar title
youknowriad Oct 26, 2022
1e1b378
Remove home and save buttons
youknowriad Oct 26, 2022
ce5f07f
Scale down the frame content
youknowriad Oct 27, 2022
138bb5b
Better spacing and colors for the menu items
youknowriad Oct 27, 2022
da7fd8d
Tweak the sidebar width
youknowriad Oct 28, 2022
0a04fe4
Remove home page template setting
youknowriad Oct 28, 2022
b964e7c
Move the edit button outside of the canvas
youknowriad Oct 31, 2022
fd12005
only apply radius in view mode
youknowriad Oct 31, 2022
1505ab7
Fix sidebar alignment
youknowriad Oct 31, 2022
dd9a0f6
Remove the background and fix radius
youknowriad Oct 31, 2022
adbdafc
Update spacing
jameskoster Nov 1, 2022
eddd2b5
Increase frame border radius
jameskoster Nov 1, 2022
3cd8109
Remove iframe background and add elevation
jameskoster Nov 1, 2022
b2e08f7
Fix list header appearance
jameskoster Nov 2, 2022
b2aff8a
Use -size for nav margin
jameskoster Nov 2, 2022
5594734
Consistent canvas style
youknowriad Nov 7, 2022
133bdde
Remove back button
youknowriad Nov 7, 2022
06d7833
Fix template parts in view mode
youknowriad Nov 7, 2022
63a4180
Reshuffle the structure to animate the header from the top
youknowriad Nov 10, 2022
cd51ae8
Keep the sidebar visible while animating the canvas
youknowriad Nov 10, 2022
913322f
Scaling the whole canvas
youknowriad Nov 10, 2022
64a75b7
Remove useless code
youknowriad Nov 11, 2022
e78bd97
Remove the sidebar animation
youknowriad Nov 11, 2022
9b437e1
Restore the sidebar animation
youknowriad Nov 11, 2022
d01e26a
Fix text color
youknowriad Nov 11, 2022
1a0f80e
Animate the iframe
youknowriad Nov 11, 2022
68fd4af
Move the edit button to the sidebar
youknowriad Nov 14, 2022
e954612
Fix mobile
youknowriad Nov 14, 2022
a4fbe48
Improve the canvas animation
youknowriad Nov 15, 2022
0b36c3c
Remove scaling and simplify animation
youknowriad Nov 15, 2022
258622b
Tweak animation easing and frame shadow.
mtias Nov 15, 2022
4b312eb
Hide the sidebar behind the canvas
youknowriad Nov 16, 2022
8d7e1d5
Improve the animation
youknowriad Nov 16, 2022
72f74fc
Restore the sidebar padding
youknowriad Nov 16, 2022
c228eb6
Rebase cleanup
youknowriad Nov 16, 2022
0263436
Update shadow on the frame.
mtias Nov 16, 2022
7b92eb8
Fix inserter height
youknowriad Nov 16, 2022
3aaad16
Improve the animation of the edit button
youknowriad Nov 16, 2022
e8918cd
Move the edit button next to design
youknowriad Nov 17, 2022
940250e
Fix e2e tests
youknowriad Nov 17, 2022
ae2c7d0
fix more e2e tests
youknowriad Nov 17, 2022
82af6ca
Restore aria region
youknowriad Nov 17, 2022
fb76172
Fix the padding of the template list
youknowriad Nov 17, 2022
3efae5a
Hide edit button in template list
youknowriad Nov 17, 2022
39b86fd
Remove link from the site title
youknowriad Nov 17, 2022
16de8a2
Fix post rebase
youknowriad Nov 17, 2022
d5bc732
Quit zoom-out when switching to view mode
youknowriad Nov 21, 2022
96e43b3
Switch to edit mode when creating templates
youknowriad Nov 21, 2022
7f91013
Remove useless condition
youknowriad Nov 21, 2022
c27764a
Code simplification
youknowriad Nov 21, 2022
d54f42b
Hide publish flow in view mode
youknowriad Nov 21, 2022
5676e75
Fix layout shift
youknowriad Nov 21, 2022
ecfc594
Remove useless showDropdown
youknowriad Nov 21, 2022
04f8d7e
Remove useless prop
youknowriad Nov 21, 2022
d53a47f
Split site icon and title component
youknowriad Nov 21, 2022
732cea6
Fix showIconLabels behavior
youknowriad Nov 24, 2022
ad0ff98
Restore the onError prop
youknowriad Nov 24, 2022
acb368f
Fix code editor position
youknowriad Nov 24, 2022
3191104
Catch the error in setTemplate
youknowriad Nov 24, 2022
d5dcbc7
Remove list view styling changes
youknowriad Nov 24, 2022
a8683bd
Allow scrolling in view mode
youknowriad Nov 30, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add the currently edited template title to the view mode header
  • Loading branch information
youknowriad committed Dec 1, 2022
commit d6983d32a0b8d202e23440fe51e66b25a1cabc74
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function useSecondaryText() {
return {};
}

export default function DocumentActions() {
export default function DocumentActions( { showDropdown = true } ) {
const { showIconLabels, entityTitle, template, templateType, isLoaded } =
useSelect( ( select ) => {
const { getEditedPostType, getEditedPostId } =
Expand Down Expand Up @@ -163,34 +163,38 @@ export default function DocumentActions() {
<Text size="body">{ label ?? '' }</Text>
</div>

<Dropdown
popoverProps={ popoverProps }
position="bottom center"
renderToggle={ ( { isOpen, onToggle } ) => (
<Button
className="edit-site-document-actions__get-info"
icon={ chevronDown }
aria-expanded={ isOpen }
aria-haspopup="true"
onClick={ onToggle }
variant={ showIconLabels ? 'tertiary' : undefined }
label={ sprintf(
/* translators: %s: the entity to see details about, like "template"*/
__( 'Show %s details' ),
entityLabel
) }
>
{ showIconLabels && __( 'Details' ) }
</Button>
) }
contentClassName="edit-site-document-actions__info-dropdown"
renderContent={ ( { onClose } ) => (
<TemplateDetails
template={ template }
onClose={ onClose }
/>
) }
/>
{ showDropdown && (
<Dropdown
popoverProps={ popoverProps }
position="bottom center"
renderToggle={ ( { isOpen, onToggle } ) => (
<Button
className="edit-site-document-actions__get-info"
icon={ chevronDown }
aria-expanded={ isOpen }
aria-haspopup="true"
onClick={ onToggle }
variant={
showIconLabels ? 'tertiary' : undefined
}
label={ sprintf(
/* translators: %s: the entity to see details about, like "template"*/
__( 'Show %s details' ),
entityLabel
) }
>
{ showIconLabels && __( 'Details' ) }
</Button>
) }
contentClassName="edit-site-document-actions__info-dropdown"
renderContent={ ( { onClose } ) => (
<TemplateDetails
template={ template }
onClose={ onClose }
/>
) }
/>
) }
</div>
</div>
);
Expand Down
5 changes: 4 additions & 1 deletion packages/edit-site/src/components/header/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { store as editSiteStore } from '../../store';
import HeaderEditMode from '../header-edit-mode';
import SiteIconAndTitle from '../site-icon-and-title';
import SaveButton from '../save-button';
import DocumentActions from '../header-edit-mode/document-actions';

export default function Header() {
const { canvasMode } = useSelect(
Expand Down Expand Up @@ -55,7 +56,9 @@ export default function Header() {
<FlexBlock>
{ canvasMode === 'edit' && <HeaderEditMode /> }
{ canvasMode === 'view' && (
<HStack alignment="right">
<HStack justify="space-between">
<div></div>
<DocumentActions showDropdown={ false } />
<SaveButton />
</HStack>
) }
Expand Down