ElectronDisplay.jl icon indicating copy to clipboard operation
ElectronDisplay.jl copied to clipboard

New menu

Open TonyLianLong opened this issue 6 years ago • 12 comments

This fixes #69.

TonyLianLong avatar Mar 02 '20 02:03 TonyLianLong

Cool! I'm testing on different platforms.

On Windows, I get:

image

  • [ ] I think we don't need the whole top-level Window menu, can you remove that?
  • [ ] Can you remove the dev tool window item? I don't think we should expose that to normal users.
  • [ ] I wonder whether we could enable/disable the zoom menu items depending on whether the active plot is one where these commands work? If that works we could also remove the text (For Static Images) because that would be kind of obvious in that case, right?

Everything else seems to work :) I'll test on Linux and Mac next.

davidanthoff avatar Mar 10 '20 23:03 davidanthoff

Here are my Mac comments:

  • [ ] There is a menu Window -> Window, that should probably be removed?
  • [ ] Could we rename the main menu (the one in bold) from Julia to ElectronDisplay?
  • [ ] The Edit menu has a submenu speech? Does that do anything?
  • [ ] There is also a "Start dictation" and emoji menu, do these do anything?

davidanthoff avatar Mar 10 '20 23:03 davidanthoff

And Linux:

  • [ ] There is also a Window menu that I think can go entirely.

davidanthoff avatar Mar 10 '20 23:03 davidanthoff

Oh, and for some reason tests fail? Probably also needs some update to fix that?

davidanthoff avatar Mar 10 '20 23:03 davidanthoff

Windows:

  • [x] I think we don't need the whole top-level Window menu, can you remove that?

Removed

  • [x] Can you remove the dev tool window item? I don't think we should expose that to normal users.

Removed

  • [ ] I wonder whether we could enable/disable the zoom menu items depending on whether the active plot is one where these commands work? If that works we could also remove the text (For Static Images) because that would be kind of obvious in that case, right?

It's possible, but it's hard and it's likely the code will be messy because this is dynamic in plotgallery.

TonyLianLong avatar Mar 14 '20 23:03 TonyLianLong

Mac:

  • [x] There is a menu Window -> Window, that should probably be removed?

Yes.

  • [ ] Could we rename the main menu (the one in bold) from Julia to ElectronDisplay?

It depends on Electron.jl which generates the application.

  • [ ] The Edit menu has a submenu speech? Does that do anything?

That's Mac's. Most if not all windows have them. I can't remove them in the code.

  • [ ] There is also a "Start dictation" and emoji menu, do these do anything?

Same.

Linux menu has been dealt while removing the Window menu.

TonyLianLong avatar Mar 14 '20 23:03 TonyLianLong

Problem with changing the name in menu for mac: https://discuss.atom.io/t/change-app-name-in-menu-bar/39839

TonyLianLong avatar Mar 14 '20 23:03 TonyLianLong

I have looked into test.jl. It does not work because the stringmime in vega.jl returns Base64, which is unwanted. I tried replacing stringmime with repr, but it does not work either. I'm not familiar with this part. Can you look into it? @davidanthoff

TonyLianLong avatar Mar 14 '20 23:03 TonyLianLong

Should I quote the base64 image with quotes in line 329 and 338 of ElectronDisplay.jl? I mean change them to displayplot(d, "image", "'" + imgdata + "'").

TonyLianLong avatar Mar 14 '20 23:03 TonyLianLong

@TonyLianLong I added some methods in a commit in this branch that I believe should fix the base64 problem, i.e. with those methods I think stringmime should now just return text, if I understand this stuff properly. Can you give it a try?

davidanthoff avatar Apr 08 '20 01:04 davidanthoff

Now these tests run successfully on my computer. Although not all plots are able to load on the window, there is no error on the Julia side (this could be an issue with fetch API on the JavaScript side, which we are currently not fixing). Let's see what will happen on CI.

TonyLianLong avatar Apr 13 '20 02:04 TonyLianLong

@davidanthoff The tests are successful, but some are cancelled after being successful. Does that mean I still have some code in the test files need to fix, or it is caused by Github Actions?

TonyLianLong avatar Apr 19 '20 00:04 TonyLianLong