vanstyn / Rapi-Fs

Filesystem browser written in RapidApp
Other
11 stars 4 forks source link

Feature request - Render html file instead of showing it raw #5

Open rai-gaurav opened 3 years ago

rai-gaurav commented 3 years ago

First of all, thank you for creating RapidApp and I was looking for a usecase to use it since last year. I got one use case where I can use Rapi-Fs.

In my use case there are lot of html files which contains various results(pass/fail etc). The coloring of html files changes based on these. In markup format, it is difficult to understand/find especially if it a big file.

It would be good to enable rendering of html by default. Or have a toggle button for user to switch between them so that user can use any format based on his requirements ?

rai-gaurav commented 3 years ago

Just browsing through the codebase, I found one comment - https://metacpan.org/source/VANSTYN/Rapi-Fs-1.104/lib/Rapi/Fs/Driver/Filesystem.pm#L286

I think this is something you already considered sometime back.

vanstyn commented 3 years ago

This is honestly a very complex thing. "Rendering HTML" isn't as straightforward as it may seem, due in large part to the local CSS. There are ways around it, like with iframes. A lot of this problem domain I've been tackling in the Rapi::Blog project, and a lot of that work could find its way back into Rapi::Fs. Unfortunately, Rapi::Fs isn't that high of a priority, although, if there are people out there actually using it, like you, I may rethink this. We could collaborate to make improvements if you're interested. I warn you though the codebase is quite complex and there is a learning curve to be able work on it in a meaningful way.. But if you are up to it I can help you. Otherwise, there is a very low chance I will be putting serious time into Rapi::Fs anytime soon.

And, regardless, I'm currently very tied up on several other projects at the moment, so it will be a minute before I can do any deep work with you

rai-gaurav commented 3 years ago

Thanks for the info. Mine use-case is also small and I am using it in my dev machine (planning it to extend it to my team but only for dev purpose). For now as a workaround, I have just commented the line mention above for html returning markup and everything is working as I need.

I am also new to Moose and I agree about the complexity. Let me find my way, if I found a cleaner solution and able to implement it, I will create a pull request otherwise you can carry it on whenever you find it appropriate. Nothing urgent.