decent-chat / decent

Open source messaging platform for the modern web
https://meta.decent.chat
GNU General Public License v3.0
21 stars 5 forks source link

Organize Components #292

Closed PullJosh closed 6 years ago

PullJosh commented 6 years ago

This one's a biggie. The idea is to organize the client's components in a consistent manner. The big benefit here is that our directory structure now allows components to be nested with a clear hierarchy. I wanted to do this so that working on the two additional tabs of the right sidebar would be a clean and easy process.

This is a pretty massive change, which is why I'm not pushing straight to preact. I want your feedback first. With that in mind, here are the pros/cons of the new layout:

Pros:

Cons:

Let me know what you think! Personally, I love the new structure, but wouldn't be upset if anybody disagrees. It's definitely a large change, and I didn't really give any warning before this PR, so a small riot is only acceptable. :stuck_out_tongue:

bates64 commented 6 years ago

Haven't yet looked at the code, but this looks awesome.

PullJosh commented 6 years ago

The code hasn't been changed much. It's mostly just modifying require locations and breaking App into separate components.

bates64 commented 6 years ago

requireing becomes a bit more verbose With the new system, in which the component lives in a directory of its same name, you need to name the component twice when requireing.

Gonna take a look into resolving this - I've seen browserify plugins for it, I think. Or I can write one.

PullJosh commented 6 years ago

I've seen browserify plugins for it, I think. Or I can write one.

Woah! I had no idea there was so much you could do with those plugins! (It makes sense, I suppose, but I've never seen it done.)

Best of luck!

bates64 commented 6 years ago

:tada:

You can now: