Skip to content

Commit 335f922

Browse files
authored
Merge branch 'main' into lendemor/warn_aggrid
2 parents 7ac4cc1 + fe2a619 commit 335f922

File tree

8 files changed

+68
-26
lines changed

8 files changed

+68
-26
lines changed

.github/workflows/unit_tests.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ env:
1111

1212
on:
1313
push:
14-
branches: ['main']
14+
branches: ["main"]
1515
pull_request:
16-
branches: ['main']
16+
branches: ["main"]
1717
workflow_dispatch:
1818
inputs:
1919
reflex_dep:
@@ -33,16 +33,16 @@ jobs:
3333
fail-fast: false
3434
matrix:
3535
os: [ubuntu-latest]
36-
python-version: ['3.11.5', '3.12.0']
36+
python-version: ["3.11.5", "3.12.0"]
3737
runs-on: ${{ matrix.os }}
3838
steps:
3939
- uses: actions/checkout@v4
4040
- name: Install Requirements for reflex-web and reflex
4141
run: |
42-
pip install '${{ github.event.inputs.reflex_dep || env.REFLEX_DEP }}' -r requirements.txt pytest playwright pytest-playwright
42+
pip install '${{ github.event.inputs.reflex_dep || env.REFLEX_DEP }}' -r requirements.txt pytest playwright pytest-playwright uvicorn
4343
playwright install --with-deps
4444
- name: Run unit tests
4545
run: |
4646
export PYTHONUNBUFFERED=1
4747
reflex init
48-
pytest tests
48+
pytest tests

assets/robots.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
User-agent: PerplexityBot
2+
Allow: /
3+
4+
User-agent: *
5+
Allow: /

blog/2023-10-25-implementing-sign-in-with-google.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ and effectively log the user out of the app.
193193

194194
```python
195195
import json
196+
from typing import Any
196197

197198
class State(rx.State):
198199
id_token_json: str = rx.LocalStorage()
@@ -201,7 +202,7 @@ class State(rx.State):
201202
self.id_token_json = json.dumps(id_token)
202203

203204
@rx.var(cache=True)
204-
def tokeninfo(self) -> dict[str, str]:
205+
def tokeninfo(self) -> dict[str, Any]:
205206
try:
206207
return verify_oauth2_token(
207208
json.loads(self.id_token_json)["credential"],
@@ -347,9 +348,9 @@ def protected() -> rx.Component:
347348

348349
## Putting the Pieces Together
349350

350-
All of the code for this example is available in the
351-
["google_auth"](https://github.com/reflex-dev/reflex-examples/tree/a4ffe6cacf8f38b54b95b72b0d525a91b69da3b3/google_auth)
352-
subdirectory inside the `reflex-examples` repo.
351+
The production code for this example has been published as a reuable third-party
352+
component, [`reflex-google-auth`](https://github.com/masenf/reflex-google-auth)
353+
and can be used directly in any Reflex app.
353354

354355
### react_oauth_google.py
355356

@@ -378,6 +379,7 @@ import functools
378379
import json
379380
import os
380381
import time
382+
from typing import Any
381383

382384
from google.auth.transport import requests
383385
from google.oauth2.id_token import verify_oauth2_token
@@ -396,7 +398,7 @@ class State(rx.State):
396398
self.id_token_json = json.dumps(id_token)
397399

398400
@rx.var(cache=True)
399-
def tokeninfo(self) -> dict[str, str]:
401+
def tokeninfo(self) -> dict[str, Any]:
400402
try:
401403
return verify_oauth2_token(
402404
json.loads(self.id_token_json)["credential"],
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# Authentication Overview
32

43
Many apps require authentication to manage users. There are a few different ways to accomplish this in Reflex:
@@ -9,7 +8,6 @@ We have solutions here:
98
2. Google Auth: Uses sign in with Google: https://reflex.dev/blog/2023-10-25-implementing-sign-in-with-google/
109
3. Captcha: Generates tests that humans can pass but automated systems cannot: https://github.com/masenf/reflex-google-recaptcha-v2
1110
4. Magic Link Auth: A passwordless login method that sends a unique, one-time-use URL to a user's email: https://github.com/masenf/reflex-magic-link-auth
12-
5. Clerk Auth: A community member wrapped this component and hooked it up in this app: https://github.com/kroo/reflex-clerk
13-
11+
5. Clerk Auth: A community member wrapped this component and hooked it up in this app: https://github.com/TimChild/reflex-clerk-api
1412

15-
More auth documentation on the way. Check back soon!
13+
More auth documentation on the way. Check back soon!

docs/database/tables.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ field in the record.
88

99
## Creating a Table
1010

11-
To create a table make a class that inherits from `rx.Model`.
11+
To create a table, make a class that inherits from `rx.Model`.
1212

1313
The following example shows how to create a table called `User`.
1414

pcweb/pages/changelog.py

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,40 @@ def change(
4848

4949
def changelog_content():
5050
return rx.el.ul(
51+
change(
52+
"2025-03-24",
53+
"v0.7.4",
54+
"SASS/SCSS support with libsass package",
55+
[
56+
"bun as primary package installer/runtime",
57+
"call reflex apps with an ASGI framework",
58+
"specify multiple env files",
59+
],
60+
"https://github.com/reflex-dev/reflex/releases/tag/v0.7.4",
61+
),
62+
change(
63+
"2025-03-17",
64+
"v0.7.3",
65+
"New .get var operation",
66+
[
67+
", and _ options for formatted numbers",
68+
"added raw headers to router headers",
69+
"exposed SVG elements at the el level",
70+
],
71+
"https://github.com/reflex-dev/reflex/releases/tag/v0.7.3",
72+
),
73+
change(
74+
"2025-03-12",
75+
"v0.7.2",
76+
"Use .f format spec with Vars",
77+
[
78+
"Deprecated Component.__init__",
79+
"Allow overwriting serializers",
80+
"React 19 post mitigations",
81+
"Performance improvements to evaluation time 👀",
82+
],
83+
"https://github.com/reflex-dev/reflex/releases/tag/v0.7.2",
84+
),
5185
change(
5286
"2025-02-25",
5387
"v0.7.1",

pcweb/pages/docs/custom_components.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,13 +347,13 @@ def add_item(category: dict) -> rx.Component:
347347
rx.box(
348348
rx.box(
349349
component_name(name),
350-
download_count(category["downloads_last_month"]),
350+
# download_count(category["downloads_last_month"]),
351351
class_name="flex flex-row justify-between items-center w-full gap-3 p-[10px_12px_0px_12px]",
352352
),
353353
rx.box(
354354
install_command("pip install " + category["package_name"]),
355355
download(category["download_url"]),
356-
demo(category),
356+
# demo(category),
357357
title="pip install " + category["package_name"],
358358
class_name="flex flex-row justify-between items-center w-full gap-1.5 p-[0px_6px_6px_6px]",
359359
),

pcweb/templates/docpage/docpage.py

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ def wrapper(*args, **kwargs) -> rx.Component:
473473
rx.box(
474474
"Next",
475475
get_icon(icon="arrow_right"),
476-
class_name="flex flex-row justify-center lg:justify-start items-center gap-2 rounded-lg w-full self-end",
476+
class_name="flex flex-row lg:justify-start items-center gap-2 rounded-lg w-full self-end",
477477
),
478478
underline="none",
479479
href=next.link,
@@ -511,7 +511,7 @@ def wrapper(*args, **kwargs) -> rx.Component:
511511
rx.box(
512512
rx.box(
513513
breadcrumb(path=path, nav_sidebar=nav_sidebar),
514-
class_name="px-0 lg:px-24",
514+
class_name="px-0 lg:px-20",
515515
),
516516
rx.box(
517517
rx.el.article(comp),
@@ -520,7 +520,7 @@ def wrapper(*args, **kwargs) -> rx.Component:
520520
class_name="flex flex-row gap-2 mt-8 lg:mt-10 mb-6 lg:mb-12",
521521
),
522522
docpage_footer(path=path.rstrip("/")),
523-
class_name="lg:mt-0 mt-6 px-4 lg:px-24",
523+
class_name="lg:mt-0 mt-6 px-4 lg:px-20",
524524
),
525525
class_name="h-full w-full"
526526
+ (
@@ -541,7 +541,7 @@ def wrapper(*args, **kwargs) -> rx.Component:
541541
rx.el.li(
542542
rx.link(
543543
text,
544-
class_name="font-small text-slate-9 hover:!text-slate-11 truncate transition-color",
544+
class_name="font-small text-slate-9 hover:!text-slate-11 whitespace-normal transition-color",
545545
underline="none",
546546
href=path
547547
+ "#"
@@ -553,7 +553,7 @@ def wrapper(*args, **kwargs) -> rx.Component:
553553
rx.list_item(
554554
rx.link(
555555
text,
556-
class_name="font-small text-slate-9 hover:!text-slate-11 truncate transition-color",
556+
class_name="font-small text-slate-9 hover:!text-slate-11 whitespace-normal transition-color",
557557
underline="none",
558558
href=path
559559
+ "#"
@@ -565,7 +565,7 @@ def wrapper(*args, **kwargs) -> rx.Component:
565565
rx.link(
566566
text,
567567
underline="none",
568-
class_name="pl-6 font-small text-slate-9 hover:!text-slate-11 truncate transition-color",
568+
class_name="pl-6 font-small text-slate-9 hover:!text-slate-11 transition-color",
569569
href=path
570570
+ "#"
571571
+ text.lower().replace(" ", "-"),
@@ -577,15 +577,18 @@ def wrapper(*args, **kwargs) -> rx.Component:
577577
],
578578
class_name="flex flex-col gap-4 list-none",
579579
),
580-
class_name="fixed flex flex-col justify-start gap-4 p-[0.875rem_0.5rem_0px_0.5rem] w-full max-w-[300px] max-h-[80vh] overflow-hidden",
580+
class_name="fixed flex flex-col justify-start gap-4 p-[0.875rem_0.5rem_0px_0.5rem] max-h-[80vh] overflow-y-scroll",
581+
style={
582+
"width":"inherit"
583+
}
581584
),
582-
class_name="h-full shrink-0 w-[16%]"
585+
class_name="shrink-0 w-[16%]"
583586
+ rx.cond(
584587
HostingBannerState.show_banner,
585588
" mt-[146px]",
586589
" mt-[90px]",
587590
)
588-
+ (" hidden xl:flex" if right_sidebar else " hidden"),
591+
+ (" hidden xl:flex xl:flex-col" if right_sidebar else " hidden"),
589592
),
590593
class_name="justify-center flex flex-row mx-auto mt-0 max-w-[94.5em] h-full min-h-screen w-full",
591594
),

0 commit comments

Comments
 (0)