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

fix: improved collapsable examples #1874

Merged
merged 5 commits into from
Feb 9, 2022
Merged

fix: improved collapsable examples #1874

merged 5 commits into from
Feb 9, 2022

Conversation

burakukula
Copy link
Contributor

@burakukula burakukula commented Feb 8, 2022

In the next PR we will provide a custom template for examples, it will be a bit darker.

@burakukula burakukula changed the title Collapsable examples fix: improved collapsable examples Feb 8, 2022
@vercel
Copy link

vercel bot commented Feb 8, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/contentful-apps/forma-36/E5Vt7FL1VH3f7m9PLJuWehZBzASg
✅ Preview: https://forma-36-git-collapsable-examples-contentful-apps.vercel.app

Copy link
Contributor

@gui-santos gui-santos left a comment

Choose a reason for hiding this comment

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

Wow! Looks really cool

I have a couple of suggestions but they are not blockers 🙌

@@ -17,7 +17,7 @@ import { Card, Button, CopyButton } from '@contentful/f36-components';
import * as f36icons from '@contentful/f36-icons';
import { ExternalLinkIcon } from '@contentful/f36-icons';
import { Flex } from '@contentful/f36-core';
import theme from 'prism-react-renderer/themes/github';
import github from 'prism-react-renderer/themes/github';
Copy link
Contributor

Choose a reason for hiding this comment

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

I would rename this "githubTheme" just to avoid confusion

size="small"
/>
{isExampleFromFile && (
<Flex marginLeft="spacing2Xs">
Copy link
Contributor

Choose a reason for hiding this comment

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

we don't need this Flex I think

we can use gap in the Flex containing these buttons

@@ -3,7 +3,7 @@ import React from 'react';
import Highlight, {
defaultProps as HighlightDefaultProps,
} from 'prism-react-renderer';
import theme from 'prism-react-renderer/themes/github';
import github from 'prism-react-renderer/themes/github';
Copy link
Contributor

Choose a reason for hiding this comment

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

Same comment as before

@gui-santos
Copy link
Contributor

@burakukula

Screenshot 2022-02-09 at 10 12 06

Copy link
Contributor

@bgutsol bgutsol left a comment

Choose a reason for hiding this comment

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

Love the styles of hidden code and an 👁 button. ⭐️

Maybe we can have them all collapsed by default since the part of the code is visible even in collapsed state, wdyt? I remember we had all collapsed before v4

Comment on lines +31 to +32
font-size: ${tokens.fontSizeM};
line-height: ${tokens.lineHeightM};
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we really want to have code in the code blocks smaller? For me, it's a bit inconvenient right now to read it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, that was the requirement from design.

@burakukula burakukula enabled auto-merge (squash) February 9, 2022 10:00
@burakukula burakukula merged commit 40c8dba into master Feb 9, 2022
@burakukula burakukula deleted the collapsable-examples branch February 9, 2022 10:00
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