johnbillion / query-monitor

The developer tools panel for WordPress
https://querymonitor.com
GNU General Public License v2.0
1.58k stars 207 forks source link

Inline scripts and styles #110

Open szepeviktor opened 9 years ago

szepeviktor commented 9 years ago

Could you mark localized scripts (data) and inline styles (extra) in Scripts and Styles?

johnbillion commented 9 years ago

Yeah I probably could. Thanks for the suggestion.

crstauf commented 8 years ago

I've been working on implementing this, and I'm getting close:

screen shot 2016-07-22 at 2 44 07 pm

but can't determine the best way to handle large amounts of inline data:

screen shot 2016-07-22 at 2 45 27 pm

@johnbillion do you think simply limiting the output to a certain number of characters is a decent solution?

szepeviktor commented 8 years ago

Maybe get the first line and truncate it at 80 or 100 ms_strlen().

crstauf commented 8 years ago

I'm wondering, if it's even worth it to show the inline data... it's in the source of the page, so perhaps just indicating that there is inline data is sufficient (as if you're interested, you could go look find it in the source)?

crstauf commented 8 years ago

hmmm yeah I think providing the first 60 characters or so would be enough; user could grab the characters and search for them in the source. will do that.

szepeviktor commented 8 years ago

I'm wondering, if it's even worth it to show the inline data...

Yes, my issue was: "Could you mark ..."

crstauf commented 8 years ago

yeah, that's what got me thinking about even showing it... I do and don't like showing it; seems redundant, but also helpful for a quick glance. thinking it over

crstauf commented 8 years ago

thoughts, everyone?

screen shot 2016-07-22 at 3 08 59 pm

szepeviktor commented 8 years ago

Could you add the count? data and 2×after

crstauf commented 8 years ago

@szepeviktor count how many items are in the data and after keys? data is only a string, but after can have multiple items... is that what you're wanting? a count of how many inline scripts have been added?

crstauf commented 8 years ago

@szepeviktor how's this?

screen shot 2016-07-22 at 4 06 40 pm

szepeviktor commented 8 years ago

OK.

crstauf commented 5 years ago

@johnbillion Is there something in particular you're wanting to do with this, that kept it from going through in 2016? Please let me know; happy to do what needs to be done to get this into QM core.

johnbillion commented 5 years ago

I think I decided that I wanted to expose more information than this, or in a better way, but I ended up having decision paralysis. I'll check out your updated PR, thanks.

szepeviktor commented 5 years ago

decision paralysis

I know what that is!