Skip to content

Commit 50c26e4

Browse files
authored
Docs updates & Docs CI concurrency fix (#249)
- Minor improvements to docs clarity. - Prevent concurrent docs publishing runs from stomping on each other.
1 parent 8531c04 commit 50c26e4

17 files changed

+277
-265
lines changed

.github/workflows/publish-develop-docs.yml

+2
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,5 @@ jobs:
2121
git config user.email [email protected]
2222
cd docs
2323
mike deploy --push develop
24+
concurrency:
25+
group: publish-docs

.github/workflows/publish-release-docs.yml

+2
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,5 @@ jobs:
2121
git config user.email [email protected]
2222
cd docs
2323
mike deploy --push --update-aliases ${{ github.event.release.name }} latest
24+
concurrency:
25+
group: publish-docs

CHANGELOG.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ Using the following categories, list your changes in this order:
2828
2929
### Security
3030
- for vulnerability fixes.
31-
-->
31+
32+
Don't forget to remove deprecated code on each major release!
33+
-->
3234

3335
<!--changelog-start-->
3436

docs/overrides/home-code-examples/add-interactivity.py

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
1+
# pylint: disable=assignment-from-no-return, unnecessary-lambda
12
from reactpy import component, html, use_state
23

34

4-
def filter_videos(videos, search_text):
5-
return None
5+
def filter_videos(*_, **__): ...
66

77

8-
def search_input(dictionary, value):
9-
return None
8+
def search_input(*_, **__): ...
109

1110

12-
def video_list(videos, empty_heading):
13-
return None
11+
def video_list(*_, **__): ...
1412

1513

1614
@component
@@ -20,7 +18,7 @@ def searchable_video_list(videos):
2018

2119
return html._(
2220
search_input(
23-
{"on_change": lambda new_text: set_search_text(new_text)},
21+
{"onChange": lambda new_text: set_search_text(new_text)},
2422
value=search_text,
2523
),
2624
video_list(
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,20 @@
11
from reactpy import component, html
22

33

4-
def thumbnail(video):
5-
return None
4+
def thumbnail(*_, **__): ...
65

76

8-
def like_button(video):
9-
return None
7+
def like_button(*_, **__): ...
108

119

1210
@component
13-
def video(video):
11+
def video(data):
1412
return html.div(
15-
thumbnail(video),
13+
thumbnail(data),
1614
html.a(
17-
{"href": video.url},
18-
html.h3(video.title),
19-
html.p(video.description),
15+
{"href": data.url},
16+
html.h3(data.title),
17+
html.p(data.description),
2018
),
21-
like_button(video),
19+
like_button(data),
2220
)

docs/overrides/home-code-examples/write-components-with-python.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
from reactpy import component, html
22

33

4+
def video(*_, **__): ...
5+
6+
47
@component
58
def video_list(videos, empty_heading):
69
count = len(videos)
@@ -11,5 +14,5 @@ def video_list(videos, empty_heading):
1114

1215
return html.section(
1316
html.h2(heading),
14-
[video(video) for video in videos],
17+
[video(x, key=x.id) for x in videos],
1518
)

0 commit comments

Comments
 (0)