knowthelist / ftui

FTUI version 3
MIT License
32 stars 21 forks source link

Absolute path fixes #30

Closed HaraldR42 closed 2 years ago

HaraldR42 commented 2 years ago

At the moment FTUI requires a certain position of the html files inside the FTUI tree. Eg. what works is the following hierarchy:

What I want to have is:

I want to be able to decouple that, so can use the FTUI tree as is, placing my html files (or internal extensions) outside of the FTUI tree. Main reasons for this not being possible today are fixed paths in the code for loading the component specific CSS files. Having a central config variable would have been one solution. This pull request calculates these paths dynamically, so even a config variable is not needed.

knowthelist commented 2 years ago

Sorry, I don't see need for this change. To load CSS from an extra file is inherently slower than have the CSS rule included, but to determine even the path before is not helpful for the performance, I think.

HaraldR42 commented 2 years ago

Thanks for having a look. Performance wise you're right to some extent. To determine the path does cost some extra cycles once. But loading the CSS is magnitudes more expensive anyway. I thought gaining the flexibility would have been worth the price. Thanks anyways.