Skip to content

Conversation

@jrandolf-google
Copy link
Contributor

@jrandolf-google jrandolf-google commented Sep 11, 2023

@jrandolf-google jrandolf-google force-pushed the jrandolf/file-dialog branch 2 times, most recently from d9162e9 to 4d4f3bf Compare September 11, 2023 13:43
@OrKoN OrKoN requested review from sadym-chromium and removed request for jgraham and whimboo September 11, 2023 13:48
@OrKoN
Copy link
Contributor

OrKoN commented Sep 11, 2023

We are going to review internally first.

element: script.SharedReference,
files: [*text]
input.SetFilesParameters = input.FileDialogInfo .and {
files: [*text]
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 instead we should provide the element reference in the interception event and allow setting files both with and without the dialog.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is there a use-case for setting files when the user was never prompted for a dialog?

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 use case would be to fill out the forms without testing/verifying if they really result in a dialog (that is an existing use case supported by Puppeteer).

index.bs Outdated

</div>

#### The input.displayFileDialog Command #### {#command-input-displayFileDialog}
Copy link
Contributor

Choose a reason for hiding this comment

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

what's the use case for displaying the dialog to the user?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It allows introspection of file dialog prompt if a manual workflow. I believe this makes this feature complete, but we can omit this for the initial proposal.

Copy link
Contributor

@OrKoN OrKoN left a comment

Choose a reason for hiding this comment

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

Let's update the spec with the following:

  1. mention that the dialog is not blocking and it is automatically dismissed.
  2. add a shared reference to the element that is the target of the dialog.
  3. keep the shared reference as the parameter on setFiles

@jgraham
Copy link
Member

jgraham commented Sep 25, 2023

mention that the dialog is not blocking and it is automatically dismissed.

I'm actually not sure we agreed to that (maybe by default if you're subscribed to the events?) But we need some kind of per-session configuration that enables either auto-dissmiss or not depending on the use case.

@jrandolf-google
Copy link
Contributor Author

jrandolf-google commented Sep 25, 2023

mention that the dialog is not blocking and it is automatically dismissed.

I'm actually not sure we agreed to that (maybe by default if you're subscribed to the events?) But we need some kind of per-session configuration that enables either auto-dismiss or not depending on the use case.

I think @OrKoN meant that it is automatically dismissed when a session is subscribed to the event.

But we need some kind of per-session configuration that enables either auto-dismiss or not depending on the use case.

So if one session is subscribed to the interception event, other sessions cannot be not auto-dismiss for the same reason multiple users of the same browser cannot use the browser if any of the users is picking a file.

@jgraham jgraham mentioned this pull request Sep 25, 2023
@whimboo
Copy link
Contributor

whimboo commented Oct 9, 2023

@jrandolf could you maybe explain why this PR got closed?

@jrandolf-google
Copy link
Contributor Author

@jrandolf could you maybe explain why this PR got closed?

I'll be separating this PR into smaller, more independent features.

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