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

Vanilla Inputs.file #266

Merged
merged 4 commits into from
Aug 27, 2024
Merged

Vanilla Inputs.file #266

merged 4 commits into from
Aug 27, 2024

Conversation

mbostock
Copy link
Member

@mbostock mbostock commented Aug 27, 2024

For observablehq/framework#1608, also makes Inputs.file usable “out of the box” albeit with a vanilla File instead of an Observable FileAttachment, but that seems reasonable.

@mbostock mbostock requested a review from Fil August 27, 2024 03:03
@Fil
Copy link
Collaborator

Fil commented Aug 27, 2024

How do we document the change for people who used fileOf (maybe the only one who did so was the unit test :-) ).

@mbostock
Copy link
Member Author

I don’t think we need to say anything else. It was an internal method.

@mbostock mbostock changed the title pass file.size to AbstractFile Vanilla Inputs.file Aug 27, 2024
@mbostock
Copy link
Member Author

I think this is a nice improvement to the usability of Inputs in a vanilla context, and offers a cleaner separation to avoid the circular dependency between Inputs and the Observable standard library. What do you think, @Fil?

Copy link
Collaborator

@Fil Fil left a comment

Choose a reason for hiding this comment

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

lgtm

@mbostock mbostock merged commit 7ae53c7 into main Aug 27, 2024
1 check passed
@mbostock mbostock deleted the mbostock/file-size branch August 27, 2024 16:08
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.

2 participants