Skip to content
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

rc: v1.0.0 #167

Merged
merged 35 commits into from
Jul 18, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
9e8979f
Add documentation for testing (#165)
karangattu Jun 26, 2024
1c72579
Add `Chat` to component gallery (#173)
cpsievert Jul 16, 2024
f87ea2a
v0.10.0: Rename `@render.data_frame` method `.input_cell_selection()`…
schloerke Jul 17, 2024
cbab81a
fix(docs): rename testing.qmd to unit_testing.qmd (#168)
karangattu Jul 17, 2024
ca92d0e
Improvements to testing articles
cpsievert Jul 17, 2024
ee77694
Change link to quickstart section (for blog post)
cpsievert Jul 17, 2024
640eea4
polars support update (#177)
schloerke Jul 17, 2024
c243b2d
make link for DataTable 'data-table'; Add redirect
schloerke Jul 18, 2024
391486f
update py-shiny to latest main
schloerke Jul 18, 2024
af734ff
add more venv support to the Makefile commands
schloerke Jul 18, 2024
45de6eb
More redirects
schloerke Jul 18, 2024
4d13c20
Update py-shiny
schloerke Jul 18, 2024
d02fea9
More redirect updates
schloerke Jul 18, 2024
aab418d
Add styles app and variation section for DF
schloerke Jul 18, 2024
024ae57
Update app code and livelinks
schloerke Jul 18, 2024
7969761
Create .gitignore
schloerke Jul 18, 2024
e12c0b5
Copy testing over as is
schloerke Jul 18, 2024
9609e25
Add data, data view, and editable variations of DataTable and DataGrid
schloerke Jul 18, 2024
cb98b70
render.display -> render.express
cpsievert Jul 18, 2024
6dff203
Consolidate imports
schloerke Jul 18, 2024
870d1e2
Add `update_filter()` and `update_sort()` entries
schloerke Jul 18, 2024
63a5126
Merge branch 'rc-v1' of https://github.com/posit-dev/py-shiny-site in…
schloerke Jul 18, 2024
ac36a1b
Update shinylive to 0.5.0
wch Jul 18, 2024
61ca3d9
Update py-shiny package for API docs
wch Jul 18, 2024
995fef8
Add info about using modules in Express
wch Jun 6, 2024
2f25579
More module doc updates
wch Jul 18, 2024
5a0338b
Add info about relative and absolute imports
wch Jul 18, 2024
b706671
Merge branch 'main' into rc-v1
schloerke Jul 18, 2024
14aa30b
Remove note
wch Jul 18, 2024
adadfc7
Update titles and content
schloerke Jul 18, 2024
d58aa9d
Shim a header into the testing api. Rename `playwright-testing` to `e…
schloerke Jul 18, 2024
75e7ab2
Make sure api/testing is **actually** rendered
schloerke Jul 18, 2024
7203a8a
Do not redirect testing URLs
schloerke Jul 18, 2024
52bb2a9
bump py-shiny version to bug followups
schloerke Jul 18, 2024
e227fbc
Update filter app to include text filter. Fix sort and filter app loc…
schloerke Jul 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
# =====================================================
- uses: quarto-dev/quarto-actions/setup@v2
with:
version: 1.4.549
version: 1.4.557

- name: Build site
run: |
Expand Down
6 changes: 6 additions & 0 deletions _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ website:
href: api/express/index.qmd
- text: "Shiny Core"
href: api/core/index.qmd
- text: "Testing"
href: api/testing/index.qmd
tools:
- icon: discord
href: https://discord.gg/yMGCamUMnS
Expand Down Expand Up @@ -255,6 +257,10 @@ website:
contents:
- docs/modules.qmd
- docs/module-communication.qmd
- section: "Testing"
contents:
- docs/testing.qmd
- docs/playwright-testing.qmd
- section: "Extending"
contents:
- docs/custom-component-one-off.qmd
Expand Down
22 changes: 22 additions & 0 deletions components/display-messages/chat/app-core.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from shiny import App, ui

app_ui = ui.page_fillable(
ui.panel_title("Hello Shiny Chat"),
ui.chat_ui("chat"), # <<
fillable_mobile=True,
)


def server(input):
# Create a chat instance and display it
chat = ui.Chat(id="chat") # <<
chat.ui() # <<

# Define a callback to run when the user submits a message
@chat.on_user_submit # <<
async def _(): # <<
# Simply echo the user's input back to them
await chat.append_message(f"You said: {chat.user_input()}") # <<


app = App(app_ui, server)
18 changes: 18 additions & 0 deletions components/display-messages/chat/app-express.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from shiny.express import ui

ui.page_opts(
title="Hello Shiny Chat",
fillable=True,
fillable_mobile=True,
)

# Create a chat instance and display it
chat = ui.Chat(id="chat") # <<
chat.ui() # <<


# Define a callback to run when the user submits a message
@chat.on_user_submit # <<
async def _(): # <<
# Simply echo the user's input back to them
await chat.append_message(f"You said: {chat.user_input()}") # <<
19 changes: 19 additions & 0 deletions components/display-messages/chat/app-preview-code.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from shiny.express import ui

# Set some Shiny page options
ui.page_opts(
title="Hello Shiny Chat",
fillable=True,
fillable_mobile=True,
)

# Create a chat instance and display it
chat = ui.Chat(id="chat")
chat.ui()


# Define a callback to run when the user submits a message
@chat.on_user_submit
async def _():
# Append a response to the chat
await chat.append_message(f"You said: {chat.user_input()}")
38 changes: 38 additions & 0 deletions components/display-messages/chat/app-preview.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
from shiny.express import ui

# Set some Shiny page options
ui.page_opts(
title="Hello Shiny Chat",
fillable=True,
fillable_mobile=True,
)

# Create a welcome message
welcome = ui.markdown(
"""
Hi! This is a simple Shiny `Chat` UI. Enter a message below and I will
simply repeat it back to you. For more examples, see this
[folder of examples](https://github.com/posit-dev/py-shiny/tree/main/examples/chat).
"""
)

# Create a chat instance
chat = ui.Chat(
id="chat",
messages=[welcome],
)

# Display it
chat.ui()


# Define a callback to run when the user submits a message
@chat.on_user_submit
async def _():
# Get the chat messages.
messages = chat.messages()
# Typically you'd pass messages to an LLM for response generation,
# but for this example, we'll just echo the user's input
user = messages[-1]["content"]
# Append a response to the chat
await chat.append_message(f"You said: {user}")
Loading
Loading