Skip to content

Commit a056e37

Browse files
committed
remove almost all pcweb imports
1 parent 14492b3 commit a056e37

33 files changed

Lines changed: 81 additions & 120 deletions

docs/advanced_onboarding/how-reflex-works.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
```python exec
2-
from pcweb import constants
3-
```
4-
51
# How Reflex Works
62

73
We'll use the following basic app that displays Github profile images as an example to explain the different parts of the architecture.

docs/api-reference/event_triggers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ from datetime import datetime
33

44
import reflex as rx
55

6-
from pcweb.templates.docpage import docdemo, h1_comp, text_comp, docpage
6+
from pcweb.templates.docpage import docdemo, h1_comp, text_comp
77

88
SYNTHETIC_EVENTS = [
99
{

docs/api-reference/utils.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
```python exec
22
import reflex as rx
3-
from pcweb import constants, styles
43
```
54

65
# Utility Functions

docs/assets/upload_and_download_files.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
```python exec
22
import reflex as rx
3-
from pcweb.styles.styles import get_code_style
4-
from pcweb.styles.colors import c_color
53
```
64

75
# Files
@@ -33,24 +31,24 @@ rx.table.root(
3331
rx.table.row(
3432
rx.table.cell(rx.text("Location", font_weight="bold")),
3533
rx.table.cell(rx.hstack(
36-
rx.code("assets/", style=get_code_style("violet")),
34+
rx.code("assets/", style={"color": rx.color("violet", 11), "border_radius": "0.25rem", "border": f"1px solid {rx.color('violet', 5)}", "background": rx.color("violet", 3)}),
3735
rx.text(" folder or next to Python files (shared assets)"),
3836
spacing="2",
3937
)),
4038
rx.table.cell(rx.hstack(
41-
rx.code("uploaded_files/", style=get_code_style("violet")),
39+
rx.code("uploaded_files/", style={"color": rx.color("violet", 11), "border_radius": "0.25rem", "border": f"1px solid {rx.color('violet', 5)}", "background": rx.color("violet", 3)}),
4240
rx.text(" directory (configurable)"),
4341
spacing="2",
4442
)),
4543
),
4644
rx.table.row(
4745
rx.table.cell(rx.text("Access Method", font_weight="bold")),
4846
rx.table.cell(rx.hstack(
49-
rx.code("rx.asset()", style=get_code_style("violet")),
47+
rx.code("rx.asset()", style={"color": rx.color("violet", 11), "border_radius": "0.25rem", "border": f"1px solid {rx.color('violet', 5)}", "background": rx.color("violet", 3)}),
5048
rx.text(" or direct path reference"),
5149
spacing="2",
5250
)),
53-
rx.table.cell(rx.code("rx.get_upload_url()", style=get_code_style("violet"))),
51+
rx.table.cell(rx.code("rx.get_upload_url()", style={"color": rx.color("violet", 11), "border_radius": "0.25rem", "border": f"1px solid {rx.color('violet', 5)}", "background": rx.color("violet", 3)})),
5452
),
5553
rx.table.row(
5654
rx.table.cell(rx.text("When to Use", font_weight="bold")),

docs/custom-components/prerequisites-for-publishing.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22

33
```python exec
44
import reflex as rx
5-
from pcweb.styles.colors import c_color
65
image_style = {
76
"width": "400px",
87
"border_radius": "12px",
9-
"border": f"1px solid {c_color('slate', 5)}",
8+
"border": "1px solid var(--c-slate-5)",
109
}
1110
```
1211

docs/events/background_events.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
```python exec
22
import reflex as rx
3-
from pcweb import constants, styles
43
```
54

65
# Background Tasks

docs/getting_started/chatapp_tutorial.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ import os
44
import reflex as rx
55
import openai
66

7-
from pcweb.constants import CHAT_APP_URL
8-
from pcweb import constants
9-
107
from docs.getting_started import chat_tutorial_style as style
118
from docs.getting_started.chat_tutorial_utils import ChatappState
129

@@ -20,7 +17,7 @@ if "OPENAI_API_KEY" not in os.environ:
2017

2118
This tutorial will walk you through building an AI chat app with Reflex. This app is fairly complex, but don't worry - we'll break it down into small steps.
2219

23-
You can find the full source code for this app [here]({CHAT_APP_URL}).
20+
You can find the full source code for this app [here](https://github.com/reflex-dev/reflex-chat).
2421

2522
### What You'll Learn
2623

@@ -44,7 +41,7 @@ We will start by creating a new project and setting up our development environme
4441
~ $ cd chatapp
4542
```
4643

47-
Next, we will create a virtual environment for our project. This is optional, but recommended. In this example, we will use [venv]({constants.VENV_URL}) to create our virtual environment.
44+
Next, we will create a virtual environment for our project. This is optional, but recommended. In this example, we will use [venv](https://docs.python.org/3/library/venv.html) to create our virtual environment.
4845

4946
```bash
5047
chatapp $ python3 -m venv venv

docs/getting_started/installation.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
```python exec
2-
from pcweb import constants
32
import reflex as rx
43
app_name = "my_app_name"
54
default_url = "http://localhost:3000"
@@ -17,7 +16,7 @@ Reflex requires Python 3.10+.
1716

1817
We **highly recommend** creating a virtual environment for your project.
1918

20-
[uv]({constants.UV_URL}) is the recommended modern option. [venv]({constants.VENV_URL}), [conda]({constants.CONDA_URL}) and [poetry]({constants.POETRY_URL}) are some alternatives.
19+
[uv](https://docs.astral.sh/uv/) is the recommended modern option. [venv](https://docs.python.org/3/library/venv.html), [conda](https://conda.io/) and [poetry](https://python-poetry.org/) are some alternatives.
2120

2221
# Install Reflex on your system
2322

@@ -27,7 +26,7 @@ We **highly recommend** creating a virtual environment for your project.
2726

2827
## Install on macOS/Linux
2928

30-
We will go with [uv]({constants.UV_URL}) here.
29+
We will go with [uv](https://docs.astral.sh/uv/) here.
3130

3231
### Prerequisites
3332

@@ -83,7 +82,7 @@ For Windows users, we recommend using [Windows Subsystem for Linux (WSL)](https:
8382

8483
For the rest of this section we will work with native Windows (non-WSL).
8584

86-
We will go with [uv]({constants.UV_URL}) here.
85+
We will go with [uv](https://docs.astral.sh/uv/) here.
8786

8887
### Prerequisites
8988

@@ -134,7 +133,7 @@ Bun requires runtime components of Visual C++ libraries to run on Windows. This
134133

135134
---
136135

137-
Running `uv run reflex init` will return the option to start with a blank Reflex app, premade templates built by the Reflex team, or to try our [AI builder]({constants.REFLEX_BUILD_URL}).
136+
Running `uv run reflex init` will return the option to start with a blank Reflex app, premade templates built by the Reflex team, or to try our [AI builder](https://build.reflex.dev/).
138137

139138
```bash
140139
Initializing the web directory.

docs/getting_started/introduction.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
```python exec
22
import reflex as rx
3-
from pcweb import constants, styles
4-
from pcweb.styles.colors import c_color
5-
from pcweb.styles.fonts import base
6-
from pcweb.flexdown import markdown_with_shiki
73
```
84

95
<!-- TODO how do we consistently rename page title? -->
@@ -78,7 +74,7 @@ def tabs():
7874
),
7975
),
8076
rx.tabs.content(
81-
markdown_with_shiki(
77+
rx.markdown(
8278
"""The frontend is built declaratively using Reflex components. Components are compiled down to JS and served to the users browser, therefore:
8379
8480
- Only use Reflex components, vars, and var operations when building your UI. Any other logic should be put in your `State` (backend).
@@ -90,15 +86,15 @@ def tabs():
9086
class_name="pt-4"
9187
),
9288
rx.tabs.content(
93-
markdown_with_shiki(
89+
rx.markdown(
9490
"""Write your backend in the `State` class. Here you can define functions and variables that can be referenced in the frontend. This code runs directly on the server and is not compiled, so there are no special caveats. Here you can use any Python external library and call any method/function.
9591
""",
9692
),
9793
value="tab2",
9894
class_name="pt-4"
9995
),
10096
rx.tabs.content(
101-
markdown_with_shiki(
97+
rx.markdown(
10298
"""Each page is a Python function that returns a Reflex component. You can define multiple pages and navigate between them, see the [Routing](/docs/pages/overview) section for more information.
10399
104100
- Start with a single page and scale to 100s of pages.
@@ -335,11 +331,11 @@ For a glimpse of the possibilities, check out these resources:
335331

336332
- For a more real-world example, check out either the [dashboard tutorial](/docs/getting_started/dashboard_tutorial) or the [chatapp tutorial](/docs/getting_started/chatapp_tutorial).
337333
- Check out our open-source [templates](/docs/getting_started/open_source_templates)!
338-
- We have an AI Builder that can generate full Reflex apps or help with your existing app! Check it out at [Reflex Build]({constants.REFLEX_BUILD_URL})!
334+
- We have an AI Builder that can generate full Reflex apps or help with your existing app! Check it out at [Reflex Build](https://build.reflex.dev/)!
339335
- Deploy your app with a single command using [Reflex Cloud](https://reflex.dev/docs/hosting/deploy-quick-start/)!
340336

341337
If you want to learn more about how Reflex works, check out the [How Reflex Works](/docs/advanced_onboarding/how-reflex-works) section.
342338

343339
## Join our Community
344340

345-
If you have questions about anything related to Reflex, you're always welcome to ask our community on [GitHub Discussions]({constants.GITHUB_DISCUSSIONS_URL}), [Discord]({constants.DISCORD_URL}), [Forum]({constants.FORUM_URL}), and [X]({constants.TWITTER_URL}).
341+
If you have questions about anything related to Reflex, you're always welcome to ask our community on [GitHub Discussions](https://github.com/orgs/reflex-dev/discussions), [Discord](https://discord.gg/T5WSbC2YtQ), [Forum](https://forum.reflex.dev), and [X](https://twitter.com/getreflex).

docs/getting_started/open_source_templates.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ Check out what the community is building with Reflex. See 2000+ more public proj
66
import reflex as rx
77

88
from pcweb.components.code_card import gallery_app_card
9-
from pcweb.components.webpage.comps import h1_title
109
from pcweb.pages.gallery.sidebar import TemplatesState, pagination, sidebar
11-
from pcweb.templates.webpage import webpage
1210

1311

1412
@rx.memo

0 commit comments

Comments
 (0)