CodeIgniter icon indicating copy to clipboard operation
CodeIgniter copied to clipboard

Separate profiler view to a template file

Open ashiina opened this issue 8 years ago • 6 comments

A PR for this issue: https://github.com/bcit-ci/CodeIgniter/issues/4477

This PR simply removes the HTML from libraries/Profiler.php , and instead reads from a separate HTML template file application/views/profiler/profiler_template.php . Developers will be free to modify the template to suit their needs.

ashiina avatar May 29 '16 06:05 ashiina

Haven't looked into it yet, just referencing #3847 as relevant.

narfbg avatar May 30 '16 11:05 narfbg

@narfbg Thanks for the reference; didn't know there was a similar PR before. Since my current commit requires a newly implemented view, it will apply to your past comment:

If 3.0.0 requires nothing for this to work, and then you change it in 3.0.1 to require a view, how is it not a BC break?

To keep BC I cannot introduce any new files, so frankly I will propose just sticking the content of application/views/profiler/profiler_template.php into my newly refactored Profiler.php as a separate method or something. Not pretty, I admit, but much better than the current state of Profiler.php.

Please let me know if I am heading the wrong direction.

ashiina avatar May 30 '16 12:05 ashiina

This is targeting 3.1.0, where we'll have a few minor BC breaks like this, so ... no, you don't need to do that.

narfbg avatar May 31 '16 09:05 narfbg

@narfbg Great, thanks! I personally prefer a separate view for the profiler (even by breaking BC) so that's good news. Please let me know if there are any poor code or design decisions which require fixing or explaining. Thanks!

ashiina avatar May 31 '16 09:05 ashiina

+1 :+1: I support this.

Ema4rl avatar Jul 31 '16 08:07 Ema4rl

Sorry all that I've left this one to rot. The Profiler has always been just an uninteresting chore for me.

@gxgpet I don't know if there are still people interested, but feel free to make any decision on this one.

narfbg avatar Jan 05 '22 20:01 narfbg