Skip to content

Playground and get started #1240

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

sfc-gh-dmatthews
Copy link
Contributor

📚 Context

Introduce the Streamlit Playground in Get started.

🧠 Description of Changes

  • Add another page to setup/installation to introduce the Streamlit Playground.
  • Add a little color and pizazz to the installation overview page.

Contribution License Agreement
By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.

@sfc-gh-dmatthews
Copy link
Contributor Author

TODO: Update URLs. I changed installation to setup, but didn't change the URLs yet, since I'll do that at the end in case of other changes/edits to names.

Copy link
Contributor

@sfc-gh-tteixeira sfc-gh-tteixeira left a comment

Choose a reason for hiding this comment

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

I haven't reviewed the new design yet, so not approving yet!

</RefCard>

</TileContainer>
## General setup and installation
Copy link
Contributor

Choose a reason for hiding this comment

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

FWIW I think the previous wording made it clearer that if you're an expert you don't have to read the rest of these.

Copy link
Contributor Author

@sfc-gh-dmatthews sfc-gh-dmatthews Mar 6, 2025

Choose a reason for hiding this comment

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

I moved the Playground up to highlight it further and added a little explainer blurb to emphasize to completely new or random passersby that the Playground is the easiet way to get a taste before choosing one of the local or cloud setup options below.

url: /get-started/installation
- category: Get started / Installation / Use command line
- category: Get started / Setup / LOCAL DEVELOPMENT
- category: Get started / Setup / Use Streamlit Playground ✨
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this be under CLOUD DEVELOPMENT ?

Copy link
Contributor Author

@sfc-gh-dmatthews sfc-gh-dmatthews Mar 6, 2025

Choose a reason for hiding this comment

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

It uses your machine's local resources, though. It runs in your browser, but uses your own hardware, not a cloud server.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I moved it up to highlight it separately, which brushes the distinction under the rug. :)

Copy link
Contributor

@sfc-gh-tteixeira sfc-gh-tteixeira Mar 8, 2025

Choose a reason for hiding this comment

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

Still feels funny...

I think the first thing under the Setup section needs to be how to install locally. Also, I guess the real problem is that it doesn't really feel like the playground belongs in the Setup section.

What if we pulled it out of that menu and renamed the menu to Installation?

  • Get started
    • Playground
    • Installation
      • LOCAL DEVELOPMENT
      • Install via command line
      • Install via Anaconda Distribution
      • CLOUD DEVELOPMENT
      • Use GitHub Codespaces
      • Use Snowflake
    • Fundamentals
    • First steps
  • Develop
  • Deploy
  • Knowledge base

- Start playing with code right away, completely in your browser.
- No configuration.
- No command line.
- No application installations in your OS.
Copy link
Contributor

Choose a reason for hiding this comment

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

You should make it clear that the playground doesn't support all Streamlit and Python features.

Copy link
Contributor Author

@sfc-gh-dmatthews sfc-gh-dmatthews Mar 6, 2025

Choose a reason for hiding this comment

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

I call this out in the <Note> immediately following the conveniences list. Would making it two bullet points or two paragraphs make it clearer? Or maybe use <Important> instead of <Nonte>?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did the following:

  • Switched the <Note> to <Important>.
  • Moved the warning about local hardware out of the admonition, sprinkling it into the prerequisites and "wait" step.
  • Added emphasis to limited in the first paragraph.

@sfc-gh-dmatthews
Copy link
Contributor Author

I'm also thinking to cut the bottom margin for InlineCalloutContainer in half. (Some design thoughts shared in the Streamlit docs Slack channel.)


## Prerequisites

Because the Playground runs Streamlit _locally_ in your browser, you should visit the Playground from a personal computer, not a mobile device.
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't understand this paragraph. The playground should work find on mobile too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If you don't think there are any performance issues running on mobile devices, I can remove the warning.

I have two concerns about people using mobile devices:

  1. It downloads (perhaps) an unexpected amount of data when visiting the page in order to use the browser itself to run the Streamlit server. This isn't some remote machine running executing the Python code.
  2. They may be a bad user experience without the side-by-side view and a full keyboard (though this is a secondary concern for me relative to the first).


1. Go to [streamlit.io/playground](https://streamlit.io/playground).

1. Wait for [`stlite`](https://github.com/whitphx/stlite) &mdash; a browser-based version of Streamlit &mdash; to load in your browser.
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think you should mention stlite here. It's just confusing to the user.

Instead just say something like: Wait for the playground to load. Behind the scenes this downloads a version of Python and Streamlit that your browser can run, so this may take a bit of time.


![Streamlit Playground is fully loaded and ready to accept code edits](/images/get-started/Playground-1-loaded.png)

## Create a `Hello World` app
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe tell users to click on different example apps and play with them first?


## What's next?

Read about our [Basic concepts](/get-started/fundamentals/main-concepts) and try out more commands in your app.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think "what's next" should point people toward installing Streamlit. Maybe something like:

What's next?

At this point you have two options:

  1. You can continue learning Streamlit through the playground -- great for learning and quick snippets.

  2. Or get started for real by installing Streamlit on your machine or the cloud.

url: /get-started/installation
- category: Get started / Installation / Use command line
- category: Get started / Setup / LOCAL DEVELOPMENT
- category: Get started / Setup / Use Streamlit Playground ✨
Copy link
Contributor

@sfc-gh-tteixeira sfc-gh-tteixeira Mar 8, 2025

Choose a reason for hiding this comment

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

Still feels funny...

I think the first thing under the Setup section needs to be how to install locally. Also, I guess the real problem is that it doesn't really feel like the playground belongs in the Setup section.

What if we pulled it out of that menu and renamed the menu to Installation?

  • Get started
    • Playground
    • Installation
      • LOCAL DEVELOPMENT
      • Install via command line
      • Install via Anaconda Distribution
      • CLOUD DEVELOPMENT
      • Use GitHub Codespaces
      • Use Snowflake
    • Fundamentals
    • First steps
  • Develop
  • Deploy
  • Knowledge base


There are many ways to get started coding with Streamlit. If you're brand new to Streamlit or just passing through on a random internet walk, we recommend using the Streamlit Playground for your first hands-on experience. It's quick and ready to go in your browser. After you experience the awesomeness of Streamlit, we're confident you'll want to come back and set up a full development environment, which you can do locally or in the cloud, as described in the options below.

<InlineCalloutContainer>
Copy link
Contributor

Choose a reason for hiding this comment

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

You're doing heroic work, but I think we need a design pass here.

I can take a pass directly in the code and share it with you. Or we can meet and do it live. LMK what you prefer.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I love our pair programming sessions and I think that will be faster. I was trying to mostly work within the components I already have, but I also have vague design ideas to go a little further. We can also talk about user journeys here. (Like whether someone might use the playground to walk through Basics or not.) 😁

@sfc-gh-tteixeira sfc-gh-tteixeira force-pushed the playground-and-get-started branch from 374fcce to 6798014 Compare March 8, 2025 06:23
@sfc-gh-dmatthews sfc-gh-dmatthews force-pushed the playground-and-get-started branch from 6798014 to 374fcce Compare March 9, 2025 00:22
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.

2 participants