piątek, 20 września 2019

Native widgets on mobile for Online - prototype

In the desktop suite we have the sidebar which is a context dependant feature improving user performance eg. in chart editing. Unfortunately it's not the perfect UI for a mobile clients, so the new concept is to tunnel the UI description to the browser and create native widgets there. I did some prototyping work in this area and I can see first results:

As we can see all basic widgets and layout are preserved. All sections are visible, it will be possible to create an UI where user will see only one section at time for better mobile experience. Complex controls like color selectors are not available yet (I'm going to use our color selector present in the toolbar). The development takes place in the feature branch.

czwartek, 5 września 2019

Hackerspace 3city - August with Open Source

This year in local Hackerspace in Gdańsk there was a series of meetups about Open Source related topics. I participated in one of them - IoT workshop about The Things Network and LoRaWAN by Inżynier Domu.
To be short: LoRaWAN is an open network for IoT devices which provides possibility to communicate eg. with a server side application. Interesting standard, but unfortunately not so popular in Poland yet (only one gateway in hs range - at Gdansk University of Technology).

Links to remember:
http://www.inzynierdomu.pl/lora-i-lorawan-czesc-1/
http://www.inzynierdomu.pl/lora-i-lorawan-czesc-2/
Photos from: https://www.facebook.com/pg/hackerspacetrojmiasto/posts

czwartek, 21 lutego 2019

Hack Week - Browsersync integration for Online

Recently my LibreOffice work is mostly focused on the Online. It's nice to see how it is growing with new features and has better UI. But when I was working on improving toolbars (eg. folding menubar or reorganization of items) I noticed one annoying thing from the developer perspective. After every small change, I had to restart the server to provide updated content for the browser. It takes few seconds for switching windows, killing old server then running new one which requires some tests to be passed.

Last week during the Hack Week funded by Collabora Productivity I was able to work on my own projects. It was a good opportunity for me to try to improve the process mentioned above.

I've heard previously about browsersync so I decided to try it out. It is a tool which can automatically reload used .css and .js files in all browser sessions after change detection. To make it work browsersync can start proxy server watching files on the original server and sending events to the browser clients if needed.

What is the advantage? Developer tools in the browser are not good enough?

  • Changes tracked by git - no need to copy changes from the browser's developer tools to the source files
  • You can setup testing matrix with all apps (writer, calc, impress) and all is reloaded instantly at one time (even on other devices like tablet or smartphone)
  • Fast prototyping

Disadvantages

  • You have to remember to run syntax tests before commiting the changes

To integrate browsersync I needed to do some build system changes. First, all static files are served from 'loleaflet/dist' directory. These files are not the original sources but copies. I modified the Makefiles to create symlinks instead if the browsersync is activated. Thanks to that we can modify sources tracked by git and proxy can detect changes.

To try it out on your own:

  1. Delete your 'loleaflet/dist' folder or
    make clean
    you might need to delete generated 'Makefile' if repository was used before
  2. Install browsersync:
    npm install -g browser-sync
  3. Run 'configure' script with additional --enable-browsersync argument
  4. Run server with:
    LOOL_SERVE_FROM_FS=1 make run
  5. In the other console run browsersync:
    make sync-[writer|calc|impress]
More information can be found in: 'loleaflet/README'

In the video below you can see how it works:

Next step will be to allow browsersync usage with cloud storage integrations like richdocuments, I noticed also some issues with access from other devices (app is still using original server for some resources).