Sitelet https://web.archive.org/web/20201206082808/https://github.com/tinacms/tinacms/issues/1562
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

Add a "none" layout option for screen plugins #1562

Open
chrisdmacrae opened this issue Oct 19, 2020 · 1 comment
Open

Add a "none" layout option for screen plugins #1562

chrisdmacrae opened this issue Oct 19, 2020 · 1 comment

Comments

@chrisdmacrae
Copy link
Contributor

@chrisdmacrae chrisdmacrae commented Oct 19, 2020

Summary

Some screen plugins need a different UI than a sidebar or a popup. It would be nice to get all of the ergonomic benefits of a screen, w/o needing to use the Tina sidebar UI or popup UI.

Basic example

// 1. Import `useScreenPlugin`
import { useScreenPlugin } from 'tinacms'

// 2. Define the screen plugin
const ScreenPlugin = {
  name: 'Focus Mode',
  Component() {
    return (
     <div className="focus-mode-wrapper">
        <h1>This is a screen!</h1>
     </div>
   )
  },
  Icon: () => <span>🦙</span>,
  layout: 'none'
}

export default function Page() {
  // 3. Register the plugin
  useScreenPlugin(ScreenPlugin)

  return (
      //...
  )
}

Motivation

Screens w/ totally custom UI w/o having to re-write the entire screen plugin logic yourself.

@kendallstrautman
Copy link
Contributor

@kendallstrautman kendallstrautman commented Oct 29, 2020

Good idea 👌🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.