Jump to content
adrian

Tracy Debugger

Recommended Posts

I prefer buttons or links top left with descriptive text instead of icons...

  • Like 1

Share this post


Link to post
Share on other sites
1 minute ago, szabesz said:

I am really thinking of the basics here, nothing more: id, count() that's all that comes to my mind

It's not really that simple though - a page object doesn't have count. In the case of count(), it is relevant to PageArray, PageFiles, PageImages objects, but also to field types with multiple values. Then there are template, field, module etc objects - what should be displayed for those? 

  • Like 1

Share this post


Link to post
Share on other sites
1 minute ago, matjazp said:

I prefer buttons or links top left with descriptive text instead of icons...

 I don't disagree with you, but I also don't want to pollute the dump output with lots of extra stuff. It could easily look quite messy with several object dumps, all of which have text / button links to the debugInfo and Full Object versions.

 

  • Like 1

Share this post


Link to post
Share on other sites
5 minutes ago, adrian said:

Then there are template, field, module etc objects - what should be displayed for those? 

How about doing it only for objects with ID and Array/WireArray? Just a simple isset/instanceof to decide what to do?

Share this post


Link to post
Share on other sites

Im on mobile so I can't do a mock-up but I vote for a text based solution like matjazp mentioned and I would put the tabs above the dump. Just like the tabs in processpageedit. They would be code for the mouse and would not mess up alignments on the left or right.

I don't want any automatic additional info. As Adrian said the need is always different and the solution is just one extra dump away. Please save your time Adrian 😉 thanks for all your great work! Still waiting for a donation button 😉

  • Like 1

Share this post


Link to post
Share on other sites

Ok @bernhard - here's a try a tabs. I think this works ok and looks ok, although I am sure someone out there will want to tweak the look of it - looking at you @tpr 🙂 - and happy for your thoughts!

Is everyone happy enough with this so I can finish it up and commit?

image.png.0c38a7c9b4364b0e0353ec11af31b200.png 

  • Like 2

Share this post


Link to post
Share on other sites

@szabesz - this isn't the count of a PageArray that you were looking for, but it does return the ID of each page and is linked to the edit interface for the page. Is this at all useful? I think this is simple and clean enough not to be too messy

image.png.899a549e8ba85416bc92de149bbd3339.png

  • Like 2

Share this post


Link to post
Share on other sites

Is the white tab the active one? If not, I would change it so, and perhaps remove the bottom border.

However, perhaps pills instead tabs would look better here, I will make some mockups when I will have time.

  • Like 2

Share this post


Link to post
Share on other sites
7 hours ago, adrian said:

Is everyone happy enough with this so I can finish it up and commit?

Absolutely awesome 🙂 tpr is right about the bottom border but it's already great imho 🙂👍

for my understanding I'd also see the white tab as the active one (having the same colour as the dump section)

  • Like 1

Share this post


Link to post
Share on other sites

Thanks @tpr and @bernhard for the feedback - here is the new version with white tab as selected and also with no bottom border. I am going to go ahead and get this version ready for committing. If you guys want to tweak after that you can send me a PR.

image.png.b203d4c0c8fb000fe417477c29865edd.png

image.png.71350844ad6c158e3a8d5bc708151347.png

 

I was also playing with a version where both tabs are white, but I think it's a little less clear when it's so small like this:

image.png.6207f22cf352fdb8991e55e75828e679.png

Share this post


Link to post
Share on other sites

I like the first one. Is the dotted border style intentional or comes from tracy core? I think solid would be better.

The brown color is also from tracy core? Seems too old fashioned to me, I think very pale blue would be more modern, eg like borders in the reno theme.

  • Like 1

Share this post


Link to post
Share on other sites

The dotted style is what the Tracy core wraps around dumps. I suppose we could override it completely.

The brown - do you mean the non-active tab color? That is the color that you chose for the title header bar for all the panels. It looks browner than it really is when I do a copy/paste screenshot on my Mac - never bothered to find out why.

Do you want me to send you a copy before I commit that you can mess with, or are you happy enough?

Share this post


Link to post
Share on other sites

Just commit if you are ready, I will get back to this when I will nothing else to do 🙂

  • Like 1

Share this post


Link to post
Share on other sites

Ok, new version just committed with the tabbed debugInfo / Full Object interface for dumps and barDumps.

Please test and let me know if you notice any problems or have ideas for improvements. 

Don't forget to do a hard reload to get the new css/js that this feature requires.

Thanks to everyone for your feedback on this - it's made it significantly better!

Share this post


Link to post
Share on other sites

Thanks, I gave it a go and it was almost perfect 🙂 The main issue I found is that you applied the padding to the list items and not to the links inside them so not the whole tabs were clickable (or at least the links weren't entirely fill the tabs). I also enlarged the tab sizes to make them easier to click on. Plus I removed the dotted border styles, for me it now looks less "crowded". I needed to replace these items in 2 CSS files as I remember, but perhaps there are other places too (#D9E1EA is the new border-color I used):

dotted silver => solid #D9E1EA

As for hiding the active tab's bottom border, I enlarged the link's bottom padding by one pixel and applied a negative 1px bottom margin (instead of the existing box-shadow). I have also added some padding to the edit link at the end of the tab bar for easier click.

I didn't like the white background on hover because it looked the same as the active item, so I made it slightly darker instead.

tracydumptabs.gif.415fe699fc72791cd63fedd5539a659b.gif

Feel free to add/modify these if you feel so.

styles.css

  • Like 1

Share this post


Link to post
Share on other sites

Thanks - I like the darker hover (instead of white). I am not sure about the increased size of the tabs though - they take up a lot of space and I think they look a bit weird when you have added a title - see how they are taller than the title element.

image.png.ce740b132b6e5b3d20444eb425d417ed.png

5 minutes ago, tpr said:

The main issue I found is that you applied the padding to the list items and not to the links inside them so not the whole tabs were clickable (or at least the links weren't entirely fill the tabs)

Good catch - thanks.

6 minutes ago, tpr said:

I removed the dotted border styles, for me it now looks less "crowded"

Did you do this in the core Tracy files? If we're going to take this approach, I'd rather override if possible, rather than hacking the core. Did you try that and have problems?

Thanks again - always super-appreciative of your skill with this stuff.

Share this post


Link to post
Share on other sites

@tpr - can you live with this? I overrode the dotted border in the module's css file and obviously reduced the padding on the tabs again.

image.png.d966ce52d85586e6ade4798216dfb38b.png

styles.css

Share this post


Link to post
Share on other sites

I haven't taken the title into account, sorry.

How about using no background for titles? That would solve this issue and even make the panel clearer.

They could be made smaller but eg touchpad users would easier target larger tabs.

Edit: of course I can live with that 🙂

Share this post


Link to post
Share on other sites
2 minutes ago, tpr said:

How about using no background for titles? That would solve this issue and even make the panel clearer.

I'm not really sure how to make it look decent without a background - with this the title just looks out of place to me. But I'd love to see your idea for how it might look!

image.png.b97ba620cc532571bba5098779f33314.png

3 minutes ago, tpr said:

They could be made smaller but eg touchpad users would easier target larger tabs.

Do you think TD is getting much use on a touch screen? I have done small amounts of work like that, but mostly drives me crazy!

Share this post


Link to post
Share on other sites

Compromise in tab height which I think is probably a decent alternative.

image.png.41e029d2bf9903ea3e292c66c865ce59.png

 

CSS attached:

 

styles.css

Share this post


Link to post
Share on other sites

Yes, I thought about something like this, with some additional bottom margin in the title, and perhaps a little larger font size but that would not add too much difference. Like headlines in documents. Anyway it's ok to me leaving as it was but I feel that the new tab bar and the title with background is too boxy. 

Alternatively if the whole tab block would have the same bg color as the title (so making the title and the tabs one unit) then that could have the best of the two worlds. So on your last screenshot the area to the right of the last tab would not be white but the same as the inactive tab, even when there is no title. I can upload a preview tomorrow if you need.

Touch screen: I meant a notebook touch pad, and I sometimes have to use it, eg on a train.

Share this post


Link to post
Share on other sites
1 hour ago, tpr said:

Alternatively if the whole tab block would have the same bg color as the title (so making the title and the tabs one unit) then that could have the best of the two worlds. So on your last screenshot the area to the right of the last tab would not be white but the same as the inactive tab, even when there is no title. I can upload a preview tomorrow if you need.

Yeah, I think this could work quite well. If you feel like having a go at this tomorrow, that would be great thanks!  You can start from the latest styles.css I attached above.

 

1 hour ago, tpr said:

Touch screen: I meant a notebook touch pad, and I sometimes have to use it, eg on a train.

Sorry, I understand - I actually use my touchpad exclusively these days - never thought I would give up a mouse, but I actually prefer it now that I am on a Mac and the touchpad is actually decent, although I am sure new Windows ones are good these days too. Anyway, I think the size I have it at now should be fine.

 

Share this post


Link to post
Share on other sites

Thanks, I finally got it the way i like, I think it's pretty neat now:

tracydumptabs02.gif.0f14fc7f2be5a10a848e98116d220365.gif

styles.css

  • Like 1

Share this post


Link to post
Share on other sites

hey @adrian thanks for the great updates!

$results = $pages->find('template=xyz,limit=10');
foreach($results as $i=>$p) {
    $i++;
    d($p);
    $p->save();
}

this does not dump anything. as soon as i remove $p->save() it dumps the correct object.

Share this post


Link to post
Share on other sites

Thanks @tpr - that looks really great! There was only one issue - in the Console panel, the page ID link was positioned at the far right of the console, rather than the dump element. Attached version fixes that if you want to take a look before I commit.

@bernhard - not sure what's going on there, it seems to work fine here. Could you try to debug why it's not working at your end please?

image.png.d8af02f6f4a6728accbfc24e2b16802c.png

 

 

styles.css

  • Thanks 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By MoritzLost
      This is a new module that provides a simple solution to clearing all your cache layers at once, and an extensible interface to perform various cache-related actions.
      The simple motivation behind this module was that I was tired of manually clearing caches in several places after deploying a change on a live site. The basic purpose of this module is a simple Clear all caches link in the Setup menu which clears out all caches, no matter where they hide. You can customize what exactly the module does through it's configuration menu:
      Expire or delete all cache entries in the database, or selectively clear caches by namespace ($cache API) Clear the the template render cache. Clear out specific folders inside your site's cache directory (/site/assets/cache) Refresh version strings for static assets to bust client-side browser caches (this requires some setup, see the full documentation for details). This is the basic function of the module. However, you can also add different cache management action through the API and execute them through the module's interface. For this advanced usage, the module provides:
      An interface to see all available cache actions and execute them. A system log and logging output on the module page to see verify what the module is doing. A CacheControlTools class with utility functions to clear out different caches. An API to add cache actions, execute them programmatically and even modify the default action. Permission management, allowing you granular control over which user roles can execute which actions. The complete documentation can be found in the module's README.
      Beta release
      Note that I consider this a Beta release. Since the module is relatively aggressive in deleting some caches, I would advise you to install in on a test environment before using it on a live site.
      Let me know if you're getting any errors, have trouble using the module or if you have suggestions for improvement!
      In particular, can someone let me know if this module causes any problems with the ProCache module? I don't own or use it, so I can't check. As far as I can tell, ProCache uses a folder inside the cache directory to cache static pages, so my module should be able to clear the ProCache site cache as well, I'd appreciate it if someone can test that for me.
      Future plans
      If there is some interest in this, I plan to expand this to a more general cache management solution. I particular, I would like to add additional cache actions. Some ideas that came to mind:
      Warming up the template render cache for publicly accessible pages. Removing all active user sessions. Let me know if you have more suggestions!
      Links
      https://github.com/MoritzLost/ProcessCacheControl ProcessCacheControl in the Module directory

    • By joshua
      This module is (yet another) way for implementing a cookie management solution.
      Of course there are several other possibilities:
      - https://processwire.com/talk/topic/22920-klaro-cookie-consent-manager/
      - https://github.com/webmanufaktur/CookieManagementBanner
      - https://github.com/johannesdachsel/cookiemonster
      - https://www.oiljs.org/
      - ... and so on ...
      In this module you can configure which kind of cookie categories you want to manage:

      You can also enable the support for respecting the Do-Not-Track (DNT) header to don't annoy users, who already decided for all their browsing experience.
      Currently there are four possible cookie groups:
      - Necessary (always enabled)
      - Statistics
      - Marketing
      - External Media
      All groups can be renamed, so feel free to use other cookie group names. I just haven't found a way to implement a "repeater like" field as configurable module field ...
      When you want to load specific scripts ( like Google Analytics, Google Maps, ...) only after the user's content to this specific category of cookies, just use the following script syntax:
      <script type="optin" data-type="text/javascript" data-category="statistics" data-src="/path/to/your/statistic/script.js"></script> <script type="optin" data-type="text/javascript" data-category="marketing" data-src="/path/to/your/mareketing/script.js"></script> <script type="optin" data-type="text/javascript" data-category="external_media" data-src="/path/to/your/external-media/script.js"></script> <script type="optin" data-type="text/javascript" data-category="marketing">console.log("Inline scripts are also working!");</script> The type has to be "optin" to get recognized by PrivacyWire, the data-attributes are giving hints, how the script shall be loaded, if the data-category is within the cookie consents of the user. These scripts are loaded asynchronously after the user made the decision.
      If you want to give the users the possibility to change their consent, you can use the following Textformatter:
      [[privacywire-choose-cookies]] It's planned to add also other Textformatters to opt-out of specific cookie groups or delete the whole consent cookie.
      You can also add a custom link to output the banner again with a link / button with following class:
      <a href="#" class="privacywire-show-options">Show Cookie Options</a> <button class="privacywire-show-options">Show Cookie Options</button> This module is still in development, but we already use it on several production websites.
      You find it here: https://github.com/blaueQuelle/privacywire/tree/master
      Download: https://github.com/blaueQuelle/privacywire/archive/master.zip
      I would love to hear your feedback 🙂
      Edit: Updated URLs to master tree of git repo
       
    • By David Karich
      Admin Page Tree Multiple Sorting
      ClassName: ProcessPageListMultipleSorting
      Extend the ordinary sort of children of a template in the admin page tree with multiple properties. For each template, you can define your own rule. Write each template (template-name) in a row, followed by a colon and then the additional field names for sorting.
      Example: All children of the template "blog" to be sorted in descending order according to the date of creation, then descending by modification date, and then by title. Type:
      blog: -created, -modified, title  Installation
      Copy the files for this module to /site/modules/ProcessPageListMultipleSorting/ In admin: Modules > Check for new modules. Install Module "Admin Page Tree Multible Sorting". Alternative in ProcessWire 2.4+
      Login to ProcessWire backend and go to Modules Click tab "New" and enter Module Class Name: "ProcessPageListMultipleSorting" Click "Download and Install"   Compatibility   I have currently tested the module only under PW 2.6+, but think that it works on older versions too. Maybe someone can give a feedback.     Download   PW-Repo: http://modules.processwire.com/modules/process-page-list-multiple-sorting/ GitHub: https://github.com/FlipZoomMedia/Processwire-ProcessPageListMultipleSorting     I hope someone can use the module. Have fun and best regards, David
    • By dimitrios
      Hello,
      this module can publish content of a Processwire page on a Facebook page, triggered by saving the Processwire page.
      To set it up, configure the module with a Facebook app ID, secret and a Page ID. Following is additional configuration on Facebook for developers:
      Minimum Required Facebook App configuration:
      on Settings -> Basics, provide the App Domains, provide the Site URL, on Settings -> Advanced, set the API version (has been tested up to v3.3), add Product: Facebook Login, on Facebook Login -> Settings, set Client OAuth Login: Yes, set Web OAuth Login: Yes, set Enforce HTTPS: Yes, add "https://www.example.com/processwire/page/" to field Valid OAuth Redirect URIs. This module is configurable as follows:
      Templates: posts can take place only for pages with the defined templates. On/Off switch: specify a checkbox field that will not allow the post if checked. Specify a message and/or an image for the post.
      Usage
      edit the desired PW page and save; it will post right after the initial Facebook log in and permission granting. After that, an access token is kept.
       
      Download
      PW module directory: http://modules.processwire.com/modules/auto-fb-post/ Github: https://github.com/kastrind/AutoFbPost   Note: Facebook SDK for PHP is utilized.


×
×
  • Create New...