dagster icon indicating copy to clipboard operation
dagster copied to clipboard

[docs] Add persistent tabs

Open benpankow opened this issue 2 years ago • 4 comments

Summary

Adds the option to supply a TabGroup with a persistentKey. Groups which have this key set will retain their selections on refresh, or between multiple different pages.

Multiple groups with the same key will share a selected tab state, making it a good way to e.g. persist selection between OSS/Cloud.

e.g.

## Subheading one

Are you using Dagster Cloud or OSS? If you refresh the page, this stays the same!

<TabGroup
  persistentKey="ossOrCloud" 
  entries={[
    { name: "Open Source", content: <p>Dagster OSS is neat</p> },
    { name: "Cloud", content: <p>Dagster Cloud rocks</p> }
  ]}
/>


## Subheading two

<TabGroup
  persistentKey="ossOrCloud"
  entries={[    
    { name: "Open Source", content: <p>Wow, some more OSS stuff</p> },
    { name: "Cloud", content: <p>Cool, some more cloud stuff</p> }
  ]}
/>

Test Plan

See vercel build https://dagster-git-benpankow-add-persistent-tabs-component-elementl.vercel.app/getting-started

benpankow avatar Aug 05 '22 19:08 benpankow

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

Name Status Preview Comments Updated
dagster ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Sep 7, 2022 at 9:26PM (UTC)
2 Ignored Deployments
Name Status Preview Comments Updated
dagit-storybook ⬜️ Ignored (Inspect) Sep 7, 2022 at 9:26PM (UTC)
dagster-oss-cloud-consolidated ⬜️ Ignored (Inspect) Sep 7, 2022 at 9:26PM (UTC)

vercel[bot] avatar Aug 05 '22 19:08 vercel[bot]

Current dependencies on/for this PR:

  • master
    • PR #9257 Graphite 👈

This comment was auto-generated by Graphite.

benpankow avatar Aug 05 '22 19:08 benpankow

I love this, but snapshot doesn't at the moment. -.- Running it adds escape characters in weird spots and breaks the formatting the site requires to render. If we can fix that... this would be great.

This ^ is a known issue, btw. We punted on it until after GA when we have more time to tinker.

I love how enthusiastic y'all are about adding tabs though, this will be so slick when we can roll it out.

erinkcochran87 avatar Aug 05 '22 19:08 erinkcochran87

this looks great, and i can take it from here

yuhan avatar Aug 05 '22 19:08 yuhan