Deltachat-desktop: Tweak css from conversations folder

Created on 7 Jan 2019  ยท  2Comments  ยท  Source: deltachat/deltachat-desktop

Current state:

$ tree conversations/
conversations/
โ”œโ”€โ”€ build
โ”‚ย ย  โ””โ”€โ”€ manifest.css
โ””โ”€โ”€ stylesheets
    โ”œโ”€โ”€ _conversation.scss
    โ”œโ”€โ”€ _debugLog.scss
    โ”œโ”€โ”€ _emoji.scss
    โ”œโ”€โ”€ _global.scss
    โ”œโ”€โ”€ _index.scss
    โ”œโ”€โ”€ _lightbox.scss
    โ”œโ”€โ”€ manifest.scss
    โ”œโ”€โ”€ _mixins.scss
    โ”œโ”€โ”€ _modal.scss
    โ”œโ”€โ”€ _modules.scss
    โ”œโ”€โ”€ _options.scss
    โ”œโ”€โ”€ _progress.scss
    โ”œโ”€โ”€ _recorder.scss
    โ”œโ”€โ”€ _settings.scss
    โ””โ”€โ”€ _variables.scss

I propose we change it to:

$ tree css/
css/
โ”œโ”€โ”€ _conversation.scss
โ”œโ”€โ”€ _debugLog.scss
โ”œโ”€โ”€ _emoji.scss
โ”œโ”€โ”€ _global.scss
โ”œโ”€โ”€ _index.scss
โ”œโ”€โ”€ _lightbox.scss
โ”œโ”€โ”€ manifest.scss
โ”œโ”€โ”€ _mixins.scss
โ”œโ”€โ”€ _modal.scss
โ”œโ”€โ”€ _modules.scss
โ”œโ”€โ”€ _options.scss
โ”œโ”€โ”€ _progress.scss
โ”œโ”€โ”€ _recorder.scss
โ”œโ”€โ”€ _settings.scss
โ””โ”€โ”€ _variables.scss

Also, we should change the output file from conversations/build/manifest.css to e.g. static/manifest.css.

Another thing that I was wondering about, is why we load manifest.css using insert-css:

https://github.com/deltachat/deltachat-desktop/blob/f1bdc9ed43f6ed226af5f16bec59ecfb2b1a74d7/src/main/ipc.js#L58-L62

Why can't we just load it like any other css files from main.html?

maintenance

Most helpful comment

We also should think about removing usused css and starting with #409 while were already at it

this might be hard as we can't really be sure if we need that css stuff or not depending on how good conversations was modularized. Maybe there are some tree shaking tools for css, but don't know much about that.

I would propose another folder structure where we have all conversations related scss stuff in a own folder.

$ tree css/
css/
โ”œโ”€โ”€ conversations
          โ”œโ”€โ”€ _conversation.scss
          โ”œโ”€โ”€ _debugLog.scss
          โ”œโ”€โ”€ _emoji.scss
          โ”œโ”€โ”€ _global.scss
          โ”œโ”€โ”€ _index.scss
          โ”œโ”€โ”€ _lightbox.scss
          โ”œโ”€โ”€ manifest.scss
          โ”œโ”€โ”€ _mixins.scss
          โ”œโ”€โ”€ _modal.scss
          โ”œโ”€โ”€ _modules.scss
          โ”œโ”€โ”€ _options.scss
          โ”œโ”€โ”€ _progress.scss
          โ”œโ”€โ”€ _recorder.scss
          โ”œโ”€โ”€ _settings.scss
          โ””โ”€โ”€ _variables.scss

This makes it clear that this is used from src/rendered/components/conversations/*

All 2 comments

We also should think about removing usused css and starting with #409 while were already at it

We also should think about removing usused css and starting with #409 while were already at it

this might be hard as we can't really be sure if we need that css stuff or not depending on how good conversations was modularized. Maybe there are some tree shaking tools for css, but don't know much about that.

I would propose another folder structure where we have all conversations related scss stuff in a own folder.

$ tree css/
css/
โ”œโ”€โ”€ conversations
          โ”œโ”€โ”€ _conversation.scss
          โ”œโ”€โ”€ _debugLog.scss
          โ”œโ”€โ”€ _emoji.scss
          โ”œโ”€โ”€ _global.scss
          โ”œโ”€โ”€ _index.scss
          โ”œโ”€โ”€ _lightbox.scss
          โ”œโ”€โ”€ manifest.scss
          โ”œโ”€โ”€ _mixins.scss
          โ”œโ”€โ”€ _modal.scss
          โ”œโ”€โ”€ _modules.scss
          โ”œโ”€โ”€ _options.scss
          โ”œโ”€โ”€ _progress.scss
          โ”œโ”€โ”€ _recorder.scss
          โ”œโ”€โ”€ _settings.scss
          โ””โ”€โ”€ _variables.scss

This makes it clear that this is used from src/rendered/components/conversations/*

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Simon-Laux picture Simon-Laux  ยท  3Comments

ralphtheninja picture ralphtheninja  ยท  5Comments

webratte picture webratte  ยท  3Comments

Jikstra picture Jikstra  ยท  3Comments

hpk42 picture hpk42  ยท  6Comments