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

Implement "Open file" dialog on Web #3068

Merged
merged 4 commits into from Aug 22, 2023
Merged

Implement "Open file" dialog on Web #3068

merged 4 commits into from Aug 22, 2023

Conversation

emilk
Copy link
Member

@emilk emilk commented Aug 22, 2023

file-open

Future work

We should maybe use AsyncFileDialog on native too

Checklist

@emilk emilk requested a review from abey79 August 22, 2023 13:05
@emilk emilk added 🕸️ web regarding running the viewer in a browser ui concerns graphical user interface labels Aug 22, 2023
@rerun-io rerun-io deleted a comment from github-actions bot Aug 22, 2023
@emilk emilk marked this pull request as ready for review August 22, 2023 13:27
@rerun-io rerun-io deleted a comment from github-actions bot Aug 22, 2023
Copy link
Contributor

@abey79 abey79 left a comment

Choose a reason for hiding this comment

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

Very nice to have!

{
use re_ui::UICommandSender;
use re_ui::UICommandSender as _;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is that still needed?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, the trait import is needed for send_ui. I added the as _ because of https://github.com/rerun-io/rerun/blob/main/CODE_STYLE.md#style

@jprochazk
Copy link
Member

jprochazk commented Aug 22, 2023

@abey79
Copy link
Contributor

abey79 commented Aug 22, 2023

One annoying thing is that once you have the dialog up, it seems that you can't escape out of it. The only way is to actually load a RRD file.

@emilk
Copy link
Member Author

emilk commented Aug 22, 2023

One annoying thing is that once you have the dialog up, it seems that you can't escape out of it. The only way is to actually load a RRD file.

I can, by pressing "OK", which is quite confusing. I filed an issue:

@abey79
Copy link
Contributor

abey79 commented Aug 22, 2023

Oh yeah, that worked in safari as well. My brain forbid me to even think of clicking a disabled button.

@abey79
Copy link
Contributor

abey79 commented Aug 22, 2023

Actually, on Safari the OK button looks disabled throughout. It's not very nice :/

image

@abey79
Copy link
Contributor

abey79 commented Aug 22, 2023

I guess that can be dealt with using CSS.

@rerun-io rerun-io deleted a comment from github-actions bot Aug 22, 2023
@emilk emilk merged commit 05dfb2d into main Aug 22, 2023
18 checks passed
@emilk emilk deleted the emilk/open-file-on-web branch August 22, 2023 15:37
@rerun-io rerun-io deleted a comment from github-actions bot Aug 22, 2023
@PolyMeilex
Copy link

I guess that can be dealt with using CSS.

Yep I consider the css elements ids a part of public API, and they have same stability guaranties as any other Rust function in the crate. So style it hewer you see fit for your app.

That being said the button looks weird, I'm pretty sure I don't style it, it's just a <button> html tag, so I would expect it to look enabled, just like in any other browser, so that's surprising.

@jprochazk
Copy link
Member

jprochazk commented Aug 22, 2023

That being said the button looks weird, I'm pretty sure I don't style it, it's just a html tag, so I would expect it to look enabled, just like in any other browser, so that's surprising

It looks "disabled" because of our global css on that page. We set the default font color to a very light one:

Which in combination with the light background produces this effect. We'll fix it on our side. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ui concerns graphical user interface 🕸️ web regarding running the viewer in a browser
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants