Commit graph

440 commits

Author SHA1 Message Date
Chaitanya Raju
a33e557c79 Download Svg Button 2020-08-22 18:29:31 +05:30
David Roundy
a412eee7eb
clarify the units of WBO_MAX_EMIT_COUNT (#115) 2020-08-11 19:54:46 +02:00
Ophir LOJKINE
7dfd0577ec v1.6.3 2020-08-11 18:26:22 +02:00
Ophir LOJKINE
21229fe6fd Add information about the configuration to the README 2020-08-11 18:25:34 +02:00
Ophir LOJKINE
b1c00145f8 Allow 50% more points per second 2020-08-11 18:16:24 +02:00
David Roundy
407538af96
make pencil more responsive, and even more so if the server throttles its input less (addresses #81) (#114) 2020-08-11 18:00:08 +02:00
David Roundy
245e8fbffe
rename MAX_CURSOR_UPDATES_INTERVAL_MS to MIN_CURSOR_UPDATES_INTERVAL_MS since it is the minimum interval, not the maximum (#113) 2020-08-11 17:38:49 +02:00
Ophir LOJKINE
a6eba9b293 Fix #107 2020-07-27 12:11:27 +02:00
dependabot[bot]
37ba0c732d
Bump lodash from 4.17.15 to 4.17.19 (#106)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-16 18:15:44 +02:00
Ophir LOJKINE
636a15d851 Merge branch 'master' of github.com:lovasoa/whitebophir 2020-07-08 15:01:27 +02:00
Ophir LOJKINE
0e271eb17d v1.6.2 2020-07-08 15:00:54 +02:00
ovari
d808412eb9
Update the hungarian translation (#105) 2020-07-07 12:04:11 +02:00
Ophir LOJKINE
d33540c313 Fix grammar in README 2020-07-07 09:57:53 +02:00
Ophir LOJKINE
f81e72d9d9 Update the software license in translations
WBO switched from GPL to AGPL two years ago already.
2020-07-07 09:50:24 +02:00
Ophir LOJKINE
60a16a1719 fix french translation 2020-07-07 09:48:07 +02:00
ovari
04c9206776
Default en then alphabetically, hu locale, tidy-ups (#103)
* Update translations.json

Sort locale alphabetically

* Update translations.json

Default language `en` first, then alphabetically.

* Update translations.json

hu (Hungarian - magyar) locale

* Update translations.json

`en` does not have a space before the exclamation mark (!) and a few other tidy-ups.

* Update translations.json
2020-07-07 09:41:31 +02:00
Ophir LOJKINE
f6ffabf936
explain how translations work in the README
adds a link to a wiki page about translations.

Fixes #101.
2020-07-06 18:49:55 +02:00
Ophir LOJKINE
9216501301 v1.6.1 2020-07-03 10:46:57 +02:00
Ophir LOJKINE
b8a95f46b8 Add polyfills for es2017, es2018, es2019
Fixes #100
2020-07-03 10:37:13 +02:00
Ophir LOJKINE
7777c5bb42 Add apple-touch-icon-precomposed.png 2020-06-23 18:36:51 +02:00
ophir
c7d900d03f Merge branch 'master' into prod 2020-06-21 23:52:06 +02:00
Ophir LOJKINE
50da719bda
Move (#97)
* Add mover skeleton

Atm it is just the eraser with new icons and renamed variables

* The mover not detect the object to move

* We can move ellipses and rectangles

* The mover now moves all types of objects

* Add the move everything functionality

* Aesthetic changes

* Replace the use of const and let with classic var

* Undo few commits

* Start the transform-translate implementation

* Mover now moves with transform translate

* Put the function to get the translation matrix in the Tools

* Shapes (ellipse, line, pencil, rect, and text) now properly load translate coords

* Add the transform-translate to the createSVG functions

* Done movement using transform-translate

* Fix parenthesization bug in the SVG create

* Fix comment about mover states

* Undo translation loading from Ellipse, Mover, Pencil, and Text tools

* Makes the board send update message to the mover as needed

* Remove the old code from the line tool too

* Simplify the mover tool

See #86

* update the mover icon

* Merge the mover and the hand tools

* Improve preview for pre-rendered elements

* v1.6.0

Co-authored-by: Paolo Bolzoni <paolo.bolzoni1@studenti.unipr.it>
2020-06-21 23:48:32 +02:00
Ophir LOJKINE
8bdc9a780e
publish latest updates (#95)
* Allow parentheses in board names

* Pass over the string only once while escaping html special chars (#82)

Co-authored-by: Paolo Bolzoni <paolo@cagla.jp>

* Add a spanish translation

Thanks to @beccobunsen

See #94

* add an italian translation

Improve the spanish translation and

* Added "free online whiteboard" to the main title

* add translations for grid

* Fix translations for "white-out" in es and it

Co-authored-by: Paolo Bolzoni <paolo.bolzoni1@studenti.unipr.it>
Co-authored-by: Paolo Bolzoni <paolo@cagla.jp>
2020-06-21 13:11:12 +02:00
ophir
3b9a2e7259 Fix translations for "white-out" in es and it 2020-06-21 13:08:39 +02:00
ophir
c516fa448c add translations for grid 2020-06-21 13:06:38 +02:00
ophir
038e6d5259 Added "free online whiteboard" to the main title 2020-06-21 12:56:31 +02:00
ophir
d83461898c add an italian translation
Improve the spanish translation and
2020-06-21 12:46:40 +02:00
ophir
9b4649e58d Add a spanish translation
Thanks to @beccobunsen

See #94
2020-06-20 16:48:49 +02:00
Paolo Bolzoni
da5f40a75e
Pass over the string only once while escaping html special chars (#82)
Co-authored-by: Paolo Bolzoni <paolo@cagla.jp>
2020-05-27 10:11:30 +02:00
Ophir LOJKINE
3af91ce7ab Allow parentheses in board names 2020-05-15 14:09:39 +02:00
ophir
d086256a44 v1.5.0 2020-05-14 00:04:32 +02:00
ophir
b77d26a9e8 Add a square as a secondary tool for the rectangle 2020-05-14 00:02:14 +02:00
ophir
de973e0a05 Improve the straight line tool
The straight line tool can now draw "sticky" lines
which have a vertical angle that is a multiple of 2pi/16
2020-05-13 23:39:16 +02:00
finnboeger
740246528f
Add a whiteout tool as the secondary function of the pencil tool (#47)
* added whiteout icon made by Freeplk on flaticon.com

* added whiteout fluid icon (public domain).

* Added whiteout tool as secondary function of pencil tool.

Co-authored-by: Robert Beach <rdbeach@gmail.com>

* shrink icon width using stroke

* shrink whiteout icon properly

* shrink whiteout fluid icon

* reduce number of allowed messages

* simplify

* remove layer code

* renmove show/hide marker code

* change white to #ffffff

* make toggle function compatible with current implementation

* Revert changes unrelated to the whiteout tool

* Refactor secondary tool logic between ellipse and pencil

* Add translations for the whiteout pen

* Fix tests

Co-authored-by: Robert Beach <rdbeach@gmail.com>
Co-authored-by: ophir <pere.jobs@gmail.com>

(@rdbeach)
2020-05-13 22:15:11 +02:00
ophir
7cc186be80 Officially support node 8 2020-05-09 13:13:36 +02:00
ophir
9a1d03d921 Update dependencies 2020-05-09 13:11:36 +02:00
finnboeger
3a85e45439
Add a svg export with proper rounding (#58)
* make live version render single-point paths the same as preview does

* implemented smoothing in server side rendering

* separate preview from export

* ensure correct handling of paths with only one child

* break out rendering of 3rd point and up into separate function

* changed test for 2 points to math current implementation and added a test for a bezier curve with 3 lines

* deduplicate code to extrapolate points for bezier curves

* fix merge

* Factor more code between the client and the server

Completely remove the straight line approximation foor paths

Vastly improve preview performance

* Add support for opacity in preview

* Stream board previews to the browser

Previously, svg board previews were generated in memory
and then pushed to the client.

They are now streamed to the client without blocking the main thread.

# Performance

## Before

$ ab -n 30 -c 15 http://localhost:8080/preview/ic3
This is ApacheBench, Version 2.3 <$Revision: 1843412 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking localhost (be patient).....done

Server Software:
Server Hostname:        localhost
Server Port:            8080

Document Path:          /preview/ic3
Document Length:        14352691 bytes

Concurrency Level:      15
Time taken for tests:   19.499 seconds
Complete requests:      30
Failed requests:        0
Total transferred:      430588920 bytes
HTML transferred:       430580730 bytes
Requests per second:    1.54 [#/sec] (mean)
Time per request:       9749.374 [ms] (mean)
Time per request:       649.958 [ms] (mean, across all concurrent requests)
Transfer rate:          21565.33 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.1      0       0
Processing:   727 8885 1561.6   9220    9817
Waiting:      718 5380 2668.8   5569    9549
Total:        727 8885 1561.6   9220    9817

Percentage of the requests served within a certain time (ms)
  50%   9220
  66%   9239
  75%   9245
  80%   9248
  90%   9560
  95%   9811
  98%   9817
  99%   9817
 100%   9817 (longest request)

## After

$ ab -n 30 -c 15 http://localhost:8080/preview/ic3
This is ApacheBench, Version 2.3 <$Revision: 1843412 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking localhost (be patient).....done

Server Software:
Server Hostname:        localhost
Server Port:            8080

Document Path:          /preview/ic3
Document Length:        14352687 bytes

Concurrency Level:      15
Time taken for tests:   17.647 seconds
Complete requests:      30
Failed requests:        0
Total transferred:      430588020 bytes
HTML transferred:       430580610 bytes
Requests per second:    1.70 [#/sec] (mean)
Time per request:       8823.254 [ms] (mean)
Time per request:       588.217 [ms] (mean, across all concurrent requests)
Transfer rate:          23828.86 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.1      0       0
Processing:   719 8212 1440.6   8657    8810
Waiting:      701 4666 2324.8   4788    8769
Total:        719 8212 1440.6   8657    8811

Percentage of the requests served within a certain time (ms)
  50%   8657
  66%   8670
  75%   8691
  80%   8790
  90%   8802
  95%   8808
  98%   8811
  99%   8811
 100%   8811 (longest request)

* Write the element id and opacity only when needed

* Fix a bug in wbo_pencil_point

* Rework the integration tests for the pencil tool

* Test server-side rendering in integration tests

* Remove unused function

* Remove unused id fallback

* set return types

* fix rectangle

* set fill for rect in stylesheet instead

Co-authored-by: Ophir LOJKINE <pere.jobs@gmail.com>
2020-05-08 21:15:39 +02:00
finnboeger
edace1c293
add option to block tools (#66)
* add option to block tools

* use tool name instead of computing an id

Co-authored-by: Ophir LOJKINE <ophir.lojkine@auto-grid.com>

* require comma separated list as input of blocked tools environment variable

Co-authored-by: Ophir LOJKINE <ophir.lojkine@auto-grid.com>

* Log attempts to use blocked tools

Co-authored-by: Ophir LOJKINE <ophir.lojkine@auto-grid.com>

* fix syntax

* require tool names to not have a comma in them

* Update server/configuration.js

Co-authored-by: Ophir LOJKINE <pere.jobs@gmail.com>
2020-05-08 12:19:52 +02:00
Ophir LOJKINE
e6811518dc Add missing allowed board name characters 2020-05-07 22:43:17 +02:00
Ophir LOJKINE
b5bfc24a32 Merge branch 'master' into prod 2020-05-07 22:31:55 +02:00
Ophir LOJKINE
6f9ebf141c Rework the code for preview handling
- use promises instead of callbacks
  - avoid polluting stderr, and instead log rendering time in the standard log format
 - cache rendered boards for only 30 seconds
2020-05-07 22:29:48 +02:00
Ophir LOJKINE
fb93f09954 Merge branch 'master' of github.com:lovasoa/whitebophir 2020-05-07 22:10:52 +02:00
Ophir LOJKINE
5d74c2b47b Fix #72 2020-05-07 22:10:40 +02:00
finnboeger
c664d5bafe
Remove extra urlencode call (#70)
* remove extra urlencode call

* asser that board name only contains allowed characters

* Log the invalid board name on error

Co-authored-by: Ophir LOJKINE <pere.jobs@gmail.com>
2020-05-07 21:16:13 +02:00
Ophir LOJKINE
8daa48e84e Fix race condition in integration tests 2020-05-07 18:07:31 +02:00
Ophir LOJKINE
2aa00ce0ca Fix language detection when only a sub-locale is provided
Fixes #67
2020-05-05 15:31:10 +02:00
Ophir LOJKINE
710c13acf4 Fix meta description 2020-05-05 15:23:52 +02:00
Ophir LOJKINE
3e8a3524d7 Merge branch 'master' into prod 2020-05-05 14:54:44 +02:00
finnboeger
57a02c42d6
Improve compatibility with Internet Explorer (#63)
* include promise polyfill

* remove es6

* add viewBox to every icon

* change self closing to explicitly closing tags

* replace window.scroll.. with document.documentElement.scroll..

* verify document.activeElement.blur() is a function before calling

* fix visuals of color chooser (colorpicker still sometimes buggy)

* do not attach to mouseleave event in IE

* attempt removal with usecapture true in IE as well, this fixes the tool switching issue

* fix text tool for IE

* fix cursor for IE

* change curMode to boolean and rename to 'active'

* replace minified canvascolor with unminified code

* replace if else structure with switch statement

* compile polyfill for each browser individually

* remove static polyfills from board.js

* Fix broken js reference

* Fix unused variable and empty console log

* Allow serving non-minified polyfills for easier debugging

* Add proper caching for polyfill.js

This request is on the critical path, we should try to make it fast

* Include more polyfills

All the DOM polyfills were missing

* Update dependencies

* Add missing polyfill

Our custom polyfill was deleted, but the one from polyfill-library hadn't been added

* Remove feature detection for Node.contains

We now have the function in the polyfills

* Update polyfill caching logic

* Remove content-Length header

Co-authored-by: @lovasoa
2020-05-05 12:01:46 +02:00
Ophir LOJKINE
46c2737c00
move pattern definition back into (#65)
* .gitignore

* move pattern definition back into js (#64)

Co-authored-by: finnboeger <finnboeger@users.noreply.github.com>
2020-05-04 09:54:31 +02:00