Skip to content

Commit

Permalink
Docs updates & Docs CI concurrency fix (#249)
Browse files Browse the repository at this point in the history
- Minor improvements to docs clarity.
- Prevent concurrent docs publishing runs from stomping on each other.
  • Loading branch information
Archmonger authored Sep 24, 2024
1 parent 8531c04 commit 50c26e4
Show file tree
Hide file tree
Showing 17 changed files with 277 additions and 265 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/publish-develop-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ jobs:
git config user.email [email protected]
cd docs
mike deploy --push develop
concurrency:
group: publish-docs
2 changes: 2 additions & 0 deletions .github/workflows/publish-release-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ jobs:
git config user.email [email protected]
cd docs
mike deploy --push --update-aliases ${{ github.event.release.name }} latest
concurrency:
group: publish-docs
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ Using the following categories, list your changes in this order:
### Security
- for vulnerability fixes.
-->
Don't forget to remove deprecated code on each major release!
-->

<!--changelog-start-->

Expand Down
12 changes: 5 additions & 7 deletions docs/overrides/home-code-examples/add-interactivity.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
# pylint: disable=assignment-from-no-return, unnecessary-lambda
from reactpy import component, html, use_state


def filter_videos(videos, search_text):
return None
def filter_videos(*_, **__): ...


def search_input(dictionary, value):
return None
def search_input(*_, **__): ...


def video_list(videos, empty_heading):
return None
def video_list(*_, **__): ...


@component
Expand All @@ -20,7 +18,7 @@ def searchable_video_list(videos):

return html._(
search_input(
{"on_change": lambda new_text: set_search_text(new_text)},
{"onChange": lambda new_text: set_search_text(new_text)},
value=search_text,
),
video_list(
Expand Down
18 changes: 8 additions & 10 deletions docs/overrides/home-code-examples/create-user-interfaces.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
from reactpy import component, html


def thumbnail(video):
return None
def thumbnail(*_, **__): ...


def like_button(video):
return None
def like_button(*_, **__): ...


@component
def video(video):
def video(data):
return html.div(
thumbnail(video),
thumbnail(data),
html.a(
{"href": video.url},
html.h3(video.title),
html.p(video.description),
{"href": data.url},
html.h3(data.title),
html.p(data.description),
),
like_button(video),
like_button(data),
)
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
from reactpy import component, html


def video(*_, **__): ...


@component
def video_list(videos, empty_heading):
count = len(videos)
Expand All @@ -11,5 +14,5 @@ def video_list(videos, empty_heading):

return html.section(
html.h2(heading),
[video(video) for video in videos],
[video(x, key=x.id) for x in videos],
)
Loading

0 comments on commit 50c26e4

Please sign in to comment.