Conversation
|
@barklund There are a few minor console errors related to the PR that would be great to resolve before merging, too (e.g. missing |
|
This ticket now covers - #6 |
| element.addEventListener( 'keydown', handleKeyPress ); | ||
|
|
||
| return () => { | ||
| if ( element ) { |
There was a problem hiding this comment.
Why do we have to check if element exists here?
There was a problem hiding this comment.
I had some issues at some point with "element being undefined", but it appears they're not relevant anymore. Fixed in 6283157.
| // TODO Should be rewritten to use MouseTrap when added to . | ||
| const handleKeyPress = useCallback( ( evt ) => { | ||
| if ( [ KEY_UP, KEY_DOWN ].includes( evt.keyCode ) ) { | ||
| const direction = evt.keyCode === KEY_UP ? 1 : -1; |
There was a problem hiding this comment.
I thought keyCode is deprecated via this comment.
There was a problem hiding this comment.
My bad, copy-paste from something else - also it felt weird. But didn't look more into it.
|
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
|
@spacedmonkey Can you reply to the bot? 🙂 Thanks! |
|
@googlebot I consent. |
|
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
|
Hope you don't mind, but also tidied up the document inspector - f66fbd5 |
@spacedmonkey, I don't see any such console errors. Only an error about |
…ries-wp into feature/51-panel-refactor
|
@barklund I get these errors when openning the browser After opening the documents inspector. After inserting a text element |
| border: 0 solid ${ ( { theme } ) => theme.colors.fg.v2 }; | ||
| border-top-width: ${ ( { isPrimary } ) => isPrimary ? 0 : '1px' }; | ||
| color: ${ ( { theme } ) => theme.colors.bg.v2 }; | ||
| padding: 10px 20px; |
There was a problem hiding this comment.
Instead of putting the padding here, can we put it on the button here.
There was a problem hiding this comment.
This actually follows the W3 guideline on accordions 1-to-1. I have no opinion one way or the other - just followed their lead.
Those are also in master. @dvoytenko is fixing that in 43f91d5.
Fixed all of these in 46c4a62. |
Summary
This PR includes some general changes to design and architecture for panels necessary for future work.
This PR will not address:
Partially fixes #51.
This is a duplicate of ampproject/amp-wp#4138, ported to this repo.