Skip to content
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

10267 add cornerstone toggle to sidebar #10405

Closed
wants to merge 9 commits into from

Conversation

Dieterrr
Copy link
Contributor

@Dieterrr Dieterrr commented Jul 19, 2018

Summary

This PR can be summarized in the following changelog entry:

  • Added the Cornerstone toggle from Yoast Components into the Yoast Sidebar.

Relevant technical choices:

  • Merge this together with #668 in components.

Test instructions

This PR can be tested by following these steps:

  • See test instructions of #668 in components

Quality assurance

  • I have tested this code to the best of my abilities
  • I have added unittests to verify the code works as intended

Requires #668

js/src/edit.js Outdated
@@ -13,6 +13,8 @@ import ClassicEditorData from "./analysis/classicEditorData.js";
import isGutenbergDataAvailable from "./helpers/isGutenbergDataAvailable";
import SnippetEditor from "./containers/SnippetEditor";
import { ThemeProvider } from "styled-components";
import CornerstoneToggle from "yoast-components/composites/Plugin/CornerstoneContent/components/CornerstoneToggle";
import Styled from "styled-components";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Styled should be lowercase: it's not a component.

js/src/edit.js Outdated
@@ -35,6 +37,10 @@ function registerStoreInGutenberg() {
} );
}

const YoastSidebarContainer = Styled.div`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Styled should be lowercase

js/src/edit.js Outdated
<YoastSidebarContainer>
<p> Contents of the sidebar </p>
<CornerstoneToggle onChange={ () => {} } checked={ true } />
</YoastSidebarContainer>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor, I know this is for testing purposes but the indentation should be fixed.

@afercia
Copy link
Contributor

afercia commented Jul 19, 2018

CR 🚧

js/src/edit.js Outdated
<p> Contents of the sidebar </p>
<YoastSidebarContainer>
<p> Contents of the sidebar </p>
<CornerstoneToggle onChange={ () => {} } checked={ true } />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make sure to rebase against the latest trunk and put this inside the <Fill>.

js/src/edit.js Outdated
@@ -35,6 +37,10 @@ function registerStoreInGutenberg() {
} );
}

const YoastSidebarContainer = styled.div`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to me this padding shouldn't be on the sidebar itself, but on the underlying components. For instance, a <Collapsible> should have the padding (which it already does).

@Dieterrr Dieterrr closed this Jul 25, 2018
@Dieterrr Dieterrr deleted the 10267-add-cornerstone-toggle-to-sidebar branch July 25, 2018 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants