adrian

Tracy Debugger

Recommended Posts

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 1

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

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 bernhard
      WHY?
      This module was built to fill the gap between simple $pages->find() operations and complex SQL queries.
      The problem with $pages->find() is that it loads all pages into memory and that can be a problem when querying multiple thousands of pages. Even $pages->findMany() loads all pages into memory and therefore is a lot slower than regular SQL.
      The problem with SQL on the other hand is, that the queries are quite complex to build. All fields are separate tables, some repeatable fields use multiple rows for their content that belong to only one single page, you always need to check for the page status (which is not necessary on regular find() operations and therefore nobody is used to that).
      In short: It is far too much work to efficiently and easily get an array of data based on PW pages and fields and I need that a lot for my RockGrid module to build all kinds of tabular data.

      Basic Usage

       
      Docs & Download
      https://modules.processwire.com/modules/rock-finder/
      https://gitlab.com/baumrock/RockFinder/tree/master
       
      Changelog
      180817, v1.0.6, support for joining multiple finders 180810, v1.0.5, basic support for options fields 180528, v1.0.4, add custom select statement option 180516, change sql query method, bump version to 1.0.0 180515, multilang bugfix 180513, beta release <180513, preview/discussion took place here: https://processwire.com/talk/topic/18983-rocksqlfinder-highly-efficient-and-flexible-sql-finder-module/
    • By OLSA
      Hello for all,
      ConfigurationForm fieldtype module is one my experiment from 2016.
      Main target to build this module was to store multiple setup and configuration values in just 1 field and avoid to use 1 db table to store just single "number of items on page", or another db table to store "layout type" etc. Thanks to JSON formatted storage this module can help you to reduce number of PW native fields in project, save DB space, and reduce number of queries at front-end.
      Install and setup:
      Download (at the bottom ), unzip and install like any other PW module (site/modules/...). Create some filed using this type of field (ConfigurationForm Fieldtype) Go to field setup Input tab and drag some subfields to container area (demo). Set "Name" and other params for subfields Save and place field to templates ("Action tab") How to use it:
      In my case, I use it to store setup and configurations values, but also for contact details, small content blocks... (eg. "widgets").
      Basic usage example:
      ConfigForm fieldtype "setup" has subfields:
      "limit", type select, option values: 5, 10, 15, 20
      "sort", type select, option values: "-date", "date",  "-sort", "sort"
      // get page children (items) $limit = isset($page->setup->limit) ? $page->setup->limit : 10; $sort = isset($page->setup->sort) ? $page->setup->sort : '-sort'; $items = $page->children("limit=$limit, sort=$sort");  
      Screenshots:


       
      Notes:
      Provide option to search inside subfields Provide multilanguage inputs for text and textarea field types Provide option for different field layout per-template basis Do not place/use field type "Button" or "File input" because it won't works. Please read README file for more details and examples Module use JSON format to store values. Text and textarea field types are multilanguage compatible, but please note that main target for this module was to store setup values and small content blocks and save DB space. Search part inside JSON is still a relatively new in MySQL (>=5.77) and that's on you how and for what to use this module.
      Thanks:
      Initial point for this fieldtype was jQuery plugin FormBuiled and thanks to Kevin Chappel for this plugin.
      In field type "link" I use javascript part from @marcostoll module and thanks to him for that part.
      Download:
      FieldtypeConfigForm.zip
      Edit: 14. August 2018. please delete/uninstall previously downloaded zip
      Regards.
         
    • By bernhard
      @Sergio asked about the pdf creation process in the showcase thread about my 360° feedback/survey tool and so I went ahead and set my little pdf helper module to public.
      Description from PW Weekly:
       
      Modules Directory: https://modules.processwire.com/modules/rock-pdf/
      Download & Docs: https://gitlab.com/baumrock/RockPdf
       
      You can combine it easily with RockReplacer: 
      See also a little showcase of the RockPdf module in this thread:
       
    • By Thomas Diroll
      Hi guys I'm relatively new to PW and just finished developing a page for a client. I was able to include all necessary functionality using the core fieldtypes but now I it seems that I need to extend them with a custom one. What I need is a simple button, that copies the absolute url (frontend not PW-backend) of the page which is currently edited to the clipboard. As this feature is only needed inside a specific template, I tend to use a custom fieldtype which provides this feature. I've been looking inside the core modules code (eg. FieldtypeCheckbox.module) but I don't really get the structure of it and how its rendered to the admin page. I also didn't find a lot of tutorials covering custom fieldtypes.
      Maybe some of you could give me some tips on how to write a basic custom fieldtype that renders a button which copies the value of
      page->httpUrl() to the clipboard using JS. Thanks!
    • By bernhard
      Some of you might have followed the development of this module here: https://processwire.com/talk/topic/15524-previewdiscussion-rockdatatables/ . It is the successor of "RockDataTables" and requires RockFinder to get the data for the grid easily and efficiently. It uses the open source part of agGrid for grid rendering.
       
      WHY?
      ProcessWire is awesome for creating all kinds of custom backend applications, but where it is not so awesome in my opinion is when it comes to listing this data. Of course we have the built in page lister and we have ListerPro, but none of that solutions is capable of properly displaying large amounts of data, for example lists of revenues, aggregations, quick and easy sorts by the user, instant filter and those kind of features. RockGrid to the rescue 😉 
       
      Features/Highlights:
      100k+ rows Instant (client side) filter, search, sort (different sort based on data type, eg "lower/greater than" for numbers, "contains" for strings) extendable via plugins (available plugins at the moment: fullscreen, csv export, reload, batch-processing of data, column sum/statistics, row selection) all the agGrid features (cell renderers, cell styling, pagination, column grouping etc) vanilla javascript, backend and frontend support (though not all plugins are working on the frontend yet and I don't plan to support it as long as I don't need it myself)  
      Limitations:
      While there is an option to retrieve data via AJAX the actual processing of the grid (displaying, filtering, sorting) is done on the client side, meaning that you can get into troubles when handling really large datasets of several thousands of rows. agGrid should be one of the most performant grid options in the world (see the official example page with a 100k row example) and does a lot to prevent problems (such as virtual row rendering), but you should always have this limitation in mind as this is a major difference to the available lister options that do not have this limitation.
      Currently it only supports AdminThemeUikit and I don't plan to support any other admin theme.
       
      Download: https://gitlab.com/baumrock/RockGrid
      Installation: https://gitlab.com/baumrock/RockGrid/wikis/Installation
      Quikckstart: https://gitlab.com/baumrock/RockGrid/wikis/quickstart
      Further instructions: https://gitlab.com/baumrock/RockGrid/wikis/quickstart#further-instructions
       
      Module status: alpha, License: MIT
      Note that every installation and uninstallation sends an anonymous google analytics event to my google analytics account. If you don't want that feel free to remove the appropriate lines of code before installation/uninstallation.
       
      Contribute:
      You can contribute to the development of this and other modules or just say thank you by
      testing, reporting issues and making PRs at gitlab liking this post buying me a drink: paypal.me/baumrock/5 liking my facebook page: facebook.com/baumrock hiring me for pw work: baumrock.com  
      Support: Please note that this module might not be as easy and plug&play as many other modules. It needs a good understanding of agGrid (and JavaScript in general) and it likely needs some looks into the code to get all the options. Please understand that I can not provide free support for every request here in the forum. I try to answer all questions that might also help others or that might improve the module but for individual requests I offer paid support for 60€ per hour.
       
      Changelog
      180730 support subdir installations 180711 bugfix (naming issue) 180630 alpha realease  
      Use Cases / Examples:
      Colored grid cells, Icons, Links etc. The Grid also has a "batcher" feature built in that helps communicating with the server via AJAX and managing resource intensive tasks in batches:

      Filters, PW panel links and instant reload on panel close:

      You can combine the grid with a chart library like I did with the (outdated) RockDataTables module: