Gravit Designer discussion

A couple of questions regarding Plugin Starter

Greetings!

I have a couple of questions regarding the plugin starter.

  1. Autoreload not working out of the box
  2. UI frozen on startup
  3. Which Gravit Designer version is used?
  4. How to use finished plugins

1. Autoreload not working out of the box

I am having trouble getting the autoreload working. There are either some pieces missing, or my setup does not work properly.

In the /gulpfile.js I had to change the line

gulp.watch('./src/**/*.{js,html,css}', server.reload());

to:

gulp.watch('./src/**/*.{js,html,css}', server.reload);

Since a callback has to be passed.

Then I had to inject the electron client into the head via /main.js start() (as described here:

var script = document.createElement('script');
script.innerHTML = "require('electron-connect').client.create()";
document.getElementsByTagName('head')[0].appendChild(script);

Now, whenever I save, the whole app reloads.

But that is quite tedious to develop with, since everything is at square one, documents are closed, the greeting overlay is shown and so on.

Can this process be optimized somehow?

2. UI frozen on startup

The UI is completely frozen for about 5-8 seconds on start.

And there are thrown a bunch of warnings and errors in the console:

designer.electron.js:2 [Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.
i._resolveAssetsFont @ designer.electron.js:2
designer.electron.js Failed to load resource
i._resolveAssetsFont @ designer.electron.js:2
designer.electron.js Failed to load resource
i.updateLocalFont @ designer.electron.js:36
designer.electron.js Failed to load resource
i._resolveAssetsFont @ designer.electron.js:2
designer.electron.js Failed to load resource
i.updateLocalFont @ designer.electron.js:36
cloud.gravit.io/user Failed to load resource: the server responded with a status of 403 (Forbidden)
cloud.gravit.io/user Failed to load resource: the server responded with a status of 403 (Forbidden)
designer.electron.js:36 [2018-02-26T19:44:07.793Z] [electron-connect] [client: 1] connected to server
designer.electron.js:36 Access denied to font:/System/Library/Fonts/SFNSText-Regular.otf
warn @ designer.electron.js:36
designer.electron.js:36 Access denied to font:/System/Library/Fonts/SFNSText-RegularG1.otf
warn @ designer.electron.js:36
designer.electron.js:36 Access denied to font:/System/Library/Fonts/SFNSText-RegularG2.otf
warn @ designer.electron.js:36
designer.electron.js:36 Access denied to font:/System/Library/Fonts/SFNSText-RegularG3.otf
warn @ designer.electron.js:36
designer.electron.js:36 Access denied to font:/System/Library/Fonts/SFNSText-RegularItalic.otf
warn @ designer.electron.js:36
designer.electron.js:36 Access denied to font:/System/Library/Fonts/SFNSText-RegularItalicG1.otf
warn @ designer.electron.js:36
designer.electron.js:36 Access denied to font:/System/Library/Fonts/SFNSText-RegularItalicG2.otf
warn @ designer.electron.js:36
designer.electron.js:36 Access denied to font:/System/Library/Fonts/SFNSText-RegularItalicG3.otf
warn @ designer.electron.js:36
designer.electron.js:36 Access denied to font:/System/Library/Fonts/SFNSText-Semibold.otf
warn @ designer.electron.js:36
designer.electron.js:36 Access denied to font:/System/Library/Fonts/SFNSText-SemiboldItalic.otf
warn @ designer.electron.js:36
cloud.gravit.io/user Failed to load resource: the server responded with a status of 403 (Forbidden)

3. Which Gravit Designer version is used?

Is the system installed version spawned, or is it coming from npm? Is is updated regularily like the main app?

4. How to use finished plugins

Where to put the finished plugin to be used within the actual app and not in dev enviroment?

Thanks in advance
Christian

1 Like

Hi @owzim.

Thanks for noticing it. It’s indeed a bug and we’ll fix it. The development version of Gravit Designer is pretty much the same as the production version, so it will work as the production version works. Mind sharing with us if you have ideas on how to optimize the development process?

I were not able to reproduce this here. Can you check if your installation of Gravit Designer (production version) also takes this long to start?

We install Gravit Designer as a dependency of the plugin project. We do that by, using the build script, downloading the last available production version from https://designer.io/. Unfortunately, currently, to update Gravit Designer dependency, it’s needed to remove gravit-designer folder from node_modules and execute the build script again, but we may change that in future for a better experience.

Currently, the production version of Gravit Designer is not ready to run plugins. We are planning to build a plugin marketplace where users can upload and install plugins, with auto updates included, and also a full development documentation to support plugins creations, but we don’t have a release date for such features yet.

Let me know if you have further questions. Thanks.

1 Like

Thanks for the insight @denner.erthal.

1. Autoreload not working out of the box

I might investigate further and get back at you, or make a PR on GitHub so you can decide what to include from that.

2. UI frozen on startup

Unfortunately yes, it also takes as long to start my macOS standalone version on macOS 10.11.6, with the same output in the console. I can file a separate bug report for this in the bugs section.

3. Which Gravit Designer version is used?

Good to know, I will make a PR on GitHub to add this info if you don’t mind.

4. How to use finished plugins

I read somewhere on this forum that a community participation is encouraged. Is the documentation even half ready? Perhaps one could read through that and even add knowledge gained from the already existing parts.

Thanks, feel free to make a PR on GitHub if you want.

Indeed it would be better to file a separate bug report in the bugs section, as this is not related to the plugins project but with Gravit Designer itself, so the request will have the attention it needs there.

Sure, as said before, feel free to make a PR with anything you want.

We still don’t have any of it as currently we have limited resources to focus on it. We expect that to change soon but we still don’t have a defined starting date. Also, if you want to share your plugins, feel free to make a PR with them on GitHub in the folder /examples, we would love to see what you created.

Let me know about further questions. Thanks!

1 Like