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

Allow for larger indentation in the CodePane #908

Merged
merged 2 commits into from
May 29, 2020

Conversation

kale-stew
Copy link
Contributor

@kale-stew kale-stew commented May 29, 2020

Description

This PR allows for an indentSize prop to be supplied to the CodePane. Feedback welcome!

Type of Change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

@kale-stew kale-stew requested a review from carloskelly13 May 29, 2020 00:46
@ryan-roemer
Copy link
Member

ryan-roemer commented May 29, 2020

This doesn't fix #898

Here's a temp diff (don't commit this because this file is built from examples/js/index.js):

diff --git a/examples/one-page.html b/examples/one-page.html
index 96a9932..bfe15fe 100644
--- a/examples/one-page.html
+++ b/examples/one-page.html
@@ -13,8 +13,8 @@
     <script src="https://unpkg.com/[email protected]/umd/react-dom.production.min.js"></script>
     <script src="https://unpkg.com/[email protected]/umd/react-is.production.min.js"></script>
     <script src="https://unpkg.com/[email protected]/prop-types.min.js"></script>
-    <script src="https://unpkg.com/spectacle@^6/dist/spectacle.min.js"></script>
-    <!-- <script src="../dist/spectacle.js"></script> -->
+    <!-- <script src="https://unpkg.com/spectacle@^6/dist/spectacle.min.js"></script> -->
+    <script src="../dist/spectacle.js"></script>
 
     <script type="module">
       const {
@@ -237,6 +237,9 @@
             \`\`\`jsx
             const evenCooler = "is that you can do code in Markdown";
             // You can even specify the syntax type!
+            if (foo) {
+              bar();
+            }
             \`\`\`
 
             ### A slide can have multiple code blocks too.

Screen Shot 2020-05-29 at 7 54 17 AM

@ryan-roemer
Copy link
Member

By contrast, notice in a normal non-MD codeblock in the same presentation indentation works fine:

Screen Shot 2020-05-29 at 7 58 36 AM

Copy link
Contributor

@carloskelly13 carloskelly13 left a comment

Choose a reason for hiding this comment

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

This looks good to me.

@kale-stew
Copy link
Contributor Author

Going to address the markdown code block issue in another PR! While this one doesn't close the originally linked issue, I think this is still a useful feature to introduce.

@kale-stew kale-stew force-pushed the feature/codepane-indentation branch from 474d447 to 5d78410 Compare May 29, 2020 15:14
@kale-stew kale-stew merged commit 930d8d3 into master May 29, 2020
@kale-stew kale-stew deleted the feature/codepane-indentation branch May 29, 2020 15:47
ryan-roemer added a commit that referenced this pull request May 29, 2020
* Add hotkeys support on linux. (#905)

Co-authored-by: Kylie Stewart <[email protected]>

* fix name of prop and references to PropTypes (#907)

* Changes for v6.1.0

* 6.1.0

* Allow for larger indentation in the CodePane (#908)

Co-authored-by: Rodrigo Narvaez <[email protected]>
Co-authored-by: Kylie Stewart <[email protected]>
Co-authored-by: Rodrigo Narvaez <[email protected]>
Co-authored-by: Kylie Stewart <[email protected]>
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.

3 participants