RetroShare / RSNewWebUI

30 stars 20 forks source link

Fix UI #77

Closed zelfroster closed 1 year ago

zelfroster commented 1 year ago

Since, There should be different options for the Appearance tab in webui. I needed to fix the typography first and make the UI a bit consistent.

I will do this bit by bit, but first I am going to fix the things which are most important and make sure that they look good enough and are usable.

Likewise, I have defined the typography and took inspiration from tailwindcss-font-sizes

And this is the homepage of webui which I have redefined. image

Please give some feedback @csoler @defnax

zelfroster commented 1 year ago

This is the Network tab where the content is scrollable but the heading remains fixed so that the search bar remains visible. And I will try to do this with every section with a consistent UI. image image

zelfroster commented 1 year ago

This is how People tabs look right now.

image image image

defnax commented 1 year ago

something in mails is broken? it does not show more the top field and columns

image

defnax commented 1 year ago

im not fan of big buttons i like more how on professional web mails with small buttons :) image

the subject field is on wrong place :) image

zelfroster commented 1 year ago

something in mails is broken? it does not show more the top field and columns

image

For now, everything else must look broken, which I have not fixed yet. So, just some more time needed.

zelfroster commented 1 year ago

Made Download UI a bit better. But getChunkStrategy() is not yet implemented, so I was trying to implement it myself today, I think I would be able to do it. image image

zelfroster commented 1 year ago

Fixed chunk strategy in downloads by implementing getChunkStrategy() and adding new method to load chunk Strategy separately.

image

zelfroster commented 1 year ago

I have also fixed the Chat UI overflow for now. image image

zelfroster commented 1 year ago

Fixed Channel Layout, Post Layout, and UI changes. image

zelfroster commented 1 year ago

I fixed the layouts for boards, but while fixing layout for forums, there was a bug which was causing webui to crash (a huge number of api calls). So, I will fix the layout after fixing the bug in Forums in the 2nd phase of GSoC (Improving Forums is already in my GSoC timeline).

Now, only mail layout is remaining to fix now in this PR.

zelfroster commented 1 year ago

Fixed the Mail UI, image image image image

@csoler @defnax I would love your suggestions, and please try this pr in your local machine. Please tell me any glitches or bugs you face at your end. This is finished for now, I will see for any issues and fix them until your reviews.

defnax commented 1 year ago

i has tested it not had time test on longer time looks more clean then before, i cant read my mails often it takes long to load.

i cant view attachments its hidden or my notebook screen it to small? i can click on up down on scrollbar then i see the attachments image

zelfroster commented 1 year ago

i has tested it not had time test on longer time looks more clean then before, i cant read my mails often it takes long to load.

i cant view attachments its hidden or my notebook screen it to small? i can click on up down on scrollbar then i see the attachments image

Ahh, I tried to make attachment section just like in the qt ui, fixed at bottom. But since I primarily use Firefox, it has thin scrollbar so its visible on my screen, I think I need to optimise it for smaller screens.

Thanks for testing it out. I will adjust it so it will be better to see attachments.

zelfroster commented 1 year ago

It should now show it correctly, @defnax image

defnax commented 1 year ago

thx, i will test it tonight

defnax commented 1 year ago

on myscreen chrome with 100% zoom (15,5 inch screen) image

75% zoom image

zelfroster commented 1 year ago

I work on a desktop with a 24-inch screen, so that's why I am able to see clearly 😅. I am thinking of an appearance setting where we can set the font-size accordingly, and It will make it easy to view on smaller screens comfortably.

defnax commented 1 year ago

i think i know why it takes so long with mails it loads 500 mails to get view my mails takes up to 30 seconds it needs this feature View only 50 mails per page no endless loading / not load all mails (low) image https://github.com/RetroShare/RSNewWebUI/issues/69

zelfroster commented 1 year ago

i think i know why it takes so long with mails it loads 500 mails to get view my mails takes up to 30 seconds it needs this feature View only 50 mails per page no endless loading / not load all mails (low) image https://github.com/RetroShare/RSNewWebUI/issues/69

Got it 👍🏻, so now what we need is pagination. I will try to implement it in another PR.

csoler commented 1 year ago

probably the transfer of mail data between libretroshare and webui is the bottleneck here.

csoler commented 1 year ago

it's a bit weird on the user's point of view that you can change the chunk strategy but you cannot really see which chunks are available or not. Would it be complicated to draw the progress bar using colored chunk (blue/red/yellow) as we do in Qt? I suppose one major challenge is to make it appear clean whatever the scale. Qt does the filtering for us, but maybe JS will not.

zelfroster commented 1 year ago

Would it be complicated to draw the progress bar using colored chunk (blue/red/yellow) as we do in Qt?

I think yes it's going to be complicated, but I will have to see what data are we getting from the FileDownloadChunkDetails() endpoint, which I suppose returns the individual chunks for a file being downloaded.

csoler commented 1 year ago

you'd need to use the list of chunks (a table) in FileChinkInfo structure, especially the member "chunks".

zelfroster commented 1 year ago

you'd need to use the list of chunks (a table) in FileChinkInfo structure, especially the member "chunks".

Yup, I tried that endpoint, This was the response for a file. 1687959718_Jun28_19:11:58 1687959736_Jun28_19:12:16

I don't know what does 0, 2 etc stand for. I will look it up in the libretroshare.

zelfroster commented 1 year ago

Also, Eid Mubarak @rottencandy 🫂☪️

zelfroster commented 1 year ago

@rottencandy If you have time then please look into this code https://github.com/zelfroster/RSNewWebUI/blob/mail-section/webui-src/app/mail/mail_compose.js, It's not working correctly. Even though I am trying to trigger a re-render manually, It is not working. I am not able to figure out what's the issue as it should work. Please help. re-render-issue

rottencandy commented 1 year ago

The reason it's not working is because we're using popupMessageCompose which uses m.render() to show the modal. It draws outside of the main mounted tree and will not respond to redraw calls or state changes: https://mithril.js.org/render.html#differences-from-other-api-methods

We have this same issue with other modals as well, and we should really stop using m.render and switch to creating modals inside the main tree soon.

For now I think the only way might be to create a new route & page for composing : (

defnax commented 1 year ago

oh as page the mail composer will look unprofessional

rottencandy commented 1 year ago

Alternatively we could use datalist as a temporary workaround

https://stackoverflow.com/a/19779010/7683374

zelfroster commented 1 year ago

Alternatively we could use datalist as a temporary workaround

https://stackoverflow.com/a/19779010/7683374

At first, I had tried datalist only, but it's the same issue.

zelfroster commented 1 year ago

We have this same issue with other modals as well, and we should really stop using m.render and switch to creating modals inside the main tree soon.

I think, this is something I can do, I will give it a try. Thanks for helping 😃

zelfroster commented 1 year ago

I think everything is fine in this PR now. @csoler

zelfroster commented 1 year ago

I tried to move the modal-container inside the main div and changed m.render to m.mount. But it still doesn't work.

I had also tried this guide https://mithril-by-examples.js.org/examples/modal-2/ , but no success. the state doesn't update tried on flems.io, the count doesn't update.

zelfroster commented 1 year ago

I had also tried this guide https://mithril-by-examples.js.org/examples/modal-2/ , but no success.

It creates and attaches a vdom node to the dom and creates the overlay container which contains the modal container. But still redraw doesn't seem to work.

rottencandy commented 1 year ago

Ah if you're moving the modal div inside the main div you can't use a second m.mount, since it is part of the parent mount it should just be used as a regular component. This would require reimplementing the create modal handler and components in a way that doesn't use another mount or render.

rottencandy commented 1 year ago

For the flems example you would need a component variable. updated code

zelfroster commented 1 year ago

For the flems example you would need a component variable. updated code

Ohh, this is great. And, I since I was unable to make the modal-container work. I just simply rendered a component using m() and It is working. https://github.com/zelfroster/RSNewWebUI/tree/mail-section

zelfroster commented 1 year ago

So, for now @rottencandy, can this PR be approved?