Skip to content

Conversation

@nstrayer
Copy link
Collaborator

@nstrayer nstrayer commented Dec 6, 2023

No description provided.

@github-actions github-actions bot temporarily deployed to pr-46 December 6, 2023 22:46 Destroyed
@github-actions github-actions bot temporarily deployed to pr-46 December 7, 2023 21:25 Destroyed
@nstrayer
Copy link
Collaborator Author

nstrayer commented Dec 7, 2023

It's not critical but some of the stuff in the article would benefit by posit-dev/py-shiny#874 being merged so that the templates the users would get when "playing along" match the article code more closely.

@nstrayer nstrayer requested review from gshotwell and wch December 7, 2023 21:30
@github-actions github-actions bot temporarily deployed to pr-46 December 7, 2023 21:33 Destroyed
@github-actions github-actions bot temporarily deployed to pr-46 December 8, 2023 16:29 Destroyed
Copy link
Contributor

@wch wch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm only partway through, but I'm submitting this now to get some comments out.

@github-actions github-actions bot temporarily deployed to pr-46 December 8, 2023 18:19 Destroyed
@github-actions github-actions bot temporarily deployed to pr-46 December 8, 2023 20:07 Destroyed
@github-actions github-actions bot temporarily deployed to pr-46 December 8, 2023 20:07 Destroyed
@github-actions github-actions bot temporarily deployed to pr-46 December 8, 2023 20:07 Destroyed
@github-actions github-actions bot temporarily deployed to pr-46 December 8, 2023 20:08 Destroyed
@github-actions github-actions bot temporarily deployed to pr-46 December 8, 2023 20:08 Destroyed
@github-actions github-actions bot temporarily deployed to pr-46 December 8, 2023 20:08 Destroyed
@github-actions github-actions bot temporarily deployed to pr-46 December 8, 2023 20:09 Destroyed
@github-actions github-actions bot temporarily deployed to pr-46 December 8, 2023 20:12 Destroyed
@github-actions github-actions bot temporarily deployed to pr-46 December 8, 2023 20:12 Destroyed
@github-actions github-actions bot temporarily deployed to pr-46 December 8, 2023 20:15 Destroyed

`_fn` is the function that is being decorated. Aka the function that goes below the `@render_tabulator()` in your app's server code. In this case we are expecting that that function returns either a pandas dataframe or `None`.

In the code above we use types so that we can get some type checking in our IDE, but these are not required. Also note that the decorated function is an async function, so we need to use the `await` keyword when we call it for `resolve_value_fn()`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the sudden talk about async might confuse people or scare them here. We should tell people if the function must be async, or if it is just optionally async.

If it must be async, we should tell people that, and also say they can just write their code in a way that ignores that.

If it is optional whether the function is async, then I think it would be better if example was not async, and then mention in a sentence or a callout that it can be async.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved some stuff around and added a callout about the async-ness. It's a bit awkward because it's required to allow the user to be uninhibited with their function return type, but in this article, we are the user so in theory that flexibility is not needed.

@github-actions github-actions bot temporarily deployed to pr-46 December 11, 2023 20:31 Destroyed
@github-actions github-actions bot temporarily deployed to pr-46 December 11, 2023 20:36 Destroyed
@github-actions github-actions bot temporarily deployed to pr-46 December 11, 2023 21:36 Destroyed
@github-actions github-actions bot temporarily deployed to pr-46 December 12, 2023 16:14 Destroyed
@github-actions github-actions bot temporarily deployed to pr-46 December 12, 2023 16:18 Destroyed
Copy link
Contributor

@gshotwell gshotwell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought I submitted these earlier, so feel free to ignore them if the draft has moved past them. The main suggestion is to use the templating flag shiny create -t js-react to get people right to the template.

@github-actions github-actions bot temporarily deployed to pr-46 December 13, 2023 18:59 Destroyed
@github-actions github-actions bot temporarily deployed to pr-46 December 13, 2023 19:02 Destroyed
@github-actions github-actions bot temporarily deployed to pr-46 December 13, 2023 19:05 Destroyed
@nstrayer nstrayer requested a review from wch December 13, 2023 19:07
@github-actions github-actions bot temporarily deployed to pr-46 December 13, 2023 19:11 Destroyed
@nstrayer nstrayer marked this pull request as ready for review January 2, 2024 15:24
@jcheng5 jcheng5 merged commit 59f66c1 into main Jan 2, 2024
@jcheng5 jcheng5 deleted the custom-components branch January 2, 2024 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants