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: show color hex value as swatch title #2324

Merged
merged 2 commits into from
Sep 20, 2022
Merged

Conversation

braaar
Copy link
Contributor

@braaar braaar commented Sep 19, 2022

get color value using getColor from @theme-ui/color instead of get from theme-ui.

fixes #2112

See the issue for more details

Version

Published prerelease version: v0.15.0-develop.29

Changelog

🎉 This release contains work from new contributors! 🎉

Thanks for all your work!

❤️ Luke Watts (@thisislawatts)

❤️ Valto Savi (@pointlessrapunzel)

Release Notes

Pull out MDX to be opt-in (#2288)

Breaking: theme-ui no longer includes @theme-ui/mdx — MDX is now opt-in.

If your project is not using MDX or importing Themed, you shouldn't need to
change anything.

  • MDXProvider is no longer included in Theme UI ThemeProvider, and has been
    removed in favour of an useThemedStylesWithMdx hook.

    • Migration: Use useThemedStylesWithMdx together with MDXProvider and useMDXComponents from @mdx-js/react.

      import {
        MDXProvider,
        useMDXComponents,
        Components as MDXComponents,
        MergeComponents as MergeMDXComponents,
      } from '@mdx-js/react'
      import { useThemedStylesWithMdx } from '@theme-ui/mdx'
      import { ThemeProvider, Theme } from 'theme-ui'
      
      interface MyProviderProps {
        theme: Theme
        components?: MDXComponents | MergeMDXComponents
        children: React.ReactNode
      }
      function MyProvider({ theme, components, children }: MyProviderProps) {
        const componentsWithStyles = useThemedStylesWithMdx(useMDXComponents(components))
      
        return (
          <ThemeProvider theme={theme}>
            <MDXProvider components={componentsWithStyles}>
              {children}
            </MDXProvider>
          </ThemeProvider>
        )
      }
  • Themed components dict and other exports from @theme-ui/mdx are no longer reexported from theme-ui.

    • Migration: Import it from @theme-ui/mdx instead.

      -  import { Themed } from 'theme-ui'
      +  import { Themed } from '@theme-ui/mdx'

Remove @theme-ui/editor (#2292)

  • Breaking: @theme-ui/editor was removed. Use CSS GUI instead.

Drop support for React 16 + 17 (#2215)

Theme UI 0.15.0 drops support for React 16 and React 17. Your use case may still work, but we don't guarantee it.


🚀 Enhancement

🐛 Bug Fix

👨‍💻 Minor changes

🏠 Internal

Authors: 7

@vercel
Copy link

vercel bot commented Sep 19, 2022

@braaar is attempting to deploy a commit to the Theme UI Team on Vercel.

A member of the Team first needs to authorize it.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Sep 19, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit c1e4f7f:

Sandbox Source
next-theme-ui-example Configuration
gatsby-plugin-theme-ui-example Configuration

Copy link
Member

@lachlanjc lachlanjc left a comment

Choose a reason for hiding this comment

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

Code lgtm!

Copy link
Member

@hasparus hasparus left a comment

Choose a reason for hiding this comment

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

Nice catch!

You updated the package.json, and to pass the installation with frozen lockfile on CI, you'll need to run pnpm install and then commit the pnpm-lock.yaml. I tried to do this for you, but I can't push to your develop :P

@braaar
Copy link
Contributor Author

braaar commented Sep 20, 2022

Nice catch!

You updated the package.json, and to pass the installation with frozen lockfile on CI, you'll need to run pnpm install and then commit the pnpm-lock.yaml. I tried to do this for you, but I can't push to your develop :P

I'll get on it

@braaar
Copy link
Contributor Author

braaar commented Sep 20, 2022

I'm not getting a new lockfile when running pnpm install. Should I delete the old one first? I tried running it at root and in packages/style-guide.

@braaar
Copy link
Contributor Author

braaar commented Sep 20, 2022

I invited you as a collaborator on my fork, @hasparus 🤷

@hasparus
Copy link
Member

hasparus commented Sep 20, 2022

I invited you as a collaborator on my fork, @hasparus 🤷

Thanks! For the future — There should be a checkbox somewhere in the PR called "Allow edits from maintainers", so you don't need to add everybody as collaborators.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork

Edit: That might have been a problem on my side.

@vercel
Copy link

vercel bot commented Sep 20, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
theme-ui ✅ Ready (Inspect) Visit Preview Sep 20, 2022 at 11:40AM (UTC)

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.

style-guide: ColorPalette doesn't show color labels
3 participants