marcelklehr / socialcalc

Web-based spreadsheet editor with support for real-time collaboration
Other
16 stars 23 forks source link

Big PR is coming... #50

Open seballot opened 5 years ago

seballot commented 5 years ago

Hello there ! I wanted to work a bit on ethercalc to improve the UI, so I endup looking into socialcalc.js, and... woh, that's a mess ! :) It seems the code is mostly very old (from 2010), I guess no one could afford working on it since a while.

So I start digging a bit, and I'm now changing a lot of things. My goal was mostly to improve the UI and the UX, but finally I end up splitting the multi thousand lines files into dedicated files, introducing templating with nunjucks, introducing saas and stop using css code inside the Constant javascript file etc... There is so much to do, but I will not do everything right now !

I've been working on it 2 days, here is my work in progress

image

image

I would like to know if this work would be welcome to be merged when it will be complete? And if you have advice please go ahead !!

Hoping to help such a great project to get up to date with 2019 standards !

eddyparkinson commented 5 years ago

Thanks, your help is much appreciated.

Please edit the right source files. The main source files are in:

https://github.com/marcelklehr/socialcalc/tree/master/js https://github.com/audreyt/ethercalc/tree/master/src

Many of the other files are auto created from these files. Check the files you edit are not auto generated using files in the above 2 folders.

E.g
https://github.com/marcelklehr/socialcalc/blob/master/dist/SocialCalc.js is created from https://github.com/marcelklehr/socialcalc/tree/master/js

UI improvement - wrap One common problem is cell text wrap. I have seen people flag this problem a few times. If you look at google sheets, you can see they have a better solution.

I am happy to help if you have questions.

Thanks. Eddy.

seballot commented 5 years ago

Hello @eddyparkinson ! Thanks for your message !

I do have a question :)

What the formData is for? I can see in the html there is two main node

te_toplevel and #te_formData

the second one contain the same structure than the first one, but with an empty table

Could you please help me understand?

seballot commented 5 years ago

And another question, the idPrefix used everywhere is important? is it used for multi spreadsheet?

eddyparkinson commented 5 years ago

FormData

What the formData is for?

Simple example: type here: https://ethercalc.org/ge3v1u75bqro/app result here: https://ethercalc.org/ge3v1u75bqro_formdata

Example 2: http://sheet.cellmaster.com.au/exampleform/appeditor

GUI widgets http://sheet.cellmaster.com.au/examples

idPrefix

Sorry, I don't know why it exists.

the idPrefix used everywhere is important?

I suspect a lot of code would want changing if you tried to remove it. Big risk of it causing bugs. Is there not a better solution, what is the issue?

seballot commented 5 years ago

Woh, I didn't knew all those features !!

So I understand now what is form data, but still I did not understand why there is a te_formData always empty and hidden

image

No matter I got to https://ethercalc.org/ge3v1u75bqro_ixqcyxi75q5t https://ethercalc.org/ge3v1u75bqro_ixqcyxi75q5t/app https://ethercalc.org/ge3v1u75bqro_formdata

The te_formData is always hidden and empty

re idPrefix, there is no issue, it's just that is not very convenient, but anyway I will leave it !

eddyparkinson commented 5 years ago

te_formData

It looks to be used by formdata maybe in appeditor mode

e.formDataViewer=new t.SpreadsheetViewer("te_FormData-")

seballot commented 5 years ago

Ok, I still do not understand this part, but that's not a problem !

Other questions if you don't mind :

eddyparkinson commented 5 years ago

graph tab

why the graph tab is in ethercalc code and not in socialcalc code?

graph tab was created by https://github.com/audreyt
socialcalc is from https://github.com/DanBricklin/socialcalc

history

There is a lot of history. Dan & Audrey know more than me. Dan Bricklin is famous, he invented spreadsheets. note there is also sandstorm as well and a group in France. Both make contributions from time to time.

brackets

the brackets are indented a bit weird to me like

I am guessing the was Dan, I don't mind much. Change it if you want.

Quality Control

Quality control numbers, hope they help. Quality control is an old topic, I like these numbers. They show combing design review, code review, testing steps etc saves time and produces fewer bugs. see the numbers here https://docs.google.com/spreadsheets/d/1h1bpuggseVZ65KiuPdNDrnvomfH5-lXHBMiCyyr4mRk/edit#gid=0

gigincg commented 4 years ago

@seballot Did you drop the idea of a PR after getting to know the details?

seballot commented 4 years ago

Hello @gigincg, well, I have been working during two full weeks on it last summer, and made quite good improvements but did not finished the work. There is so much to fix it's a bit discouraging ! And then I get distracted by a lot of other project and I didn't touch it since...

Also now cryptpad provide the nice only office calc editor without login, I can of have lost my motivation...

If you want to take over, my changes are here : https://github.com/seballot/socialcalc