netcarver Posted September 21, 2018 Share Posted September 21, 2018 Hi @adrian thanks for the latest update to add autoload support (and to Ryan for putting it into the core this week) as I can now use Tracy in the preview tab in FormBuilder to do a little StreetAddress work. Much appreciated! 3 Link to comment Share on other sites More sharing options...
adrian Posted September 21, 2018 Author Share Posted September 21, 2018 On 9/21/2018 at 11:13 PM, netcarver said: Hi @adrian thanks for the latest update to add autoload support (and to Ryan for putting it into the core this week) as I can now use Tracy in the preview tab in FormBuilder to do a little StreetAddress work. Much appreciated! Expand Nice! Glad to hear it's already proving useful ? 4 Link to comment Share on other sites More sharing options...
adrian Posted September 24, 2018 Author Share Posted September 24, 2018 New version adds some configurable settings for the ACE code editor used in the Console panel and the File Editor panel: I went with the defaults I like, but adjust to suit your preferences - don't judge my use of spaces over tabs - it's mostly about consistency when pasting into web forums and other places, but if you need another reason: Developers Who Use Spaces Make More Money Than Those Who Use Tabs ? I am also a big fan of 4 character indentation but I do know that some people prefer 2, so take your pick. The one thing that is new is the intro of Show Invisibles being set to true. That results in the following which I find quite useful at times. Note the highlighted (in pink) character at the end. That actually isn't due to the Show Invisibles setting, but I thought I'd include in this screenshot to bring attention to this thread: https://processwire.com/talk/topic/19995-changing-structure-of-pages/?do=findComment&comment=173671 and how the Console panel can be a useful tool in finding non-printable characters that are causing syntax errors in your code. 4 Link to comment Share on other sites More sharing options...
szabesz Posted September 25, 2018 Share Posted September 25, 2018 On 9/24/2018 at 11:04 PM, adrian said: finding non-printable characters that are causing syntax errors in your code Expand I use this app on my Mac: https://www.bluem.net/en/projects/plain-clip/ Press SHIFT when launching Plain Clip.app to see its preferences settings panel. I use it by launching it with ctrl+option+command+V and afterwards my launcher app performs a paste operation by simulating command+V. This way I rarely run into copy/paste issues like that. 3 Link to comment Share on other sites More sharing options...
bernhard Posted September 25, 2018 Share Posted September 25, 2018 Did you read my mind or was that always there? I wanted to post this request yesterday but found all shortcuts in the docs... then I thought why bother adrian again with something that is already there ? awesome! thx 2 Link to comment Share on other sites More sharing options...
adrian Posted September 25, 2018 Author Share Posted September 25, 2018 On 9/25/2018 at 8:24 PM, bernhard said: Did you read my mind or was that always there? Expand It's been there for about a week - pretty much just after all the new fullscreen and pane sizing shortcuts were added. 1 1 Link to comment Share on other sites More sharing options...
adrian Posted September 25, 2018 Author Share Posted September 25, 2018 Latest version adds a new Inputfield Settings section to the RequestInfo panel when viewing a field in the admin. This is not turned on by default, so visit the module settings if you want to take it for a spin. Speaking of the module settings, all relevant panels now have direct links to their section in the module config settings, eg: The cog/gear icon at the bottom right will take you directly to this, which will hopefully make changes to panel settings much easier/quicker. Thanks to @bernhard for this suggestion. 5 Link to comment Share on other sites More sharing options...
bernhard Posted September 26, 2018 Share Posted September 26, 2018 Really great addition! Thank you! I wonder what others think of having the icon left instead of right. I think it'd be an improvement. Maybe if others think the same it would be worth the effort. If not, I'm also happy to have it on the right side now ? Thx again! 1 Link to comment Share on other sites More sharing options...
adrian Posted September 26, 2018 Author Share Posted September 26, 2018 On 9/26/2018 at 9:03 AM, bernhard said: I wonder what others think of having the icon left instead of right. Expand Sure. I have just made the change and spent some time refactoring the generation of the panel footer area to make future changes much easier. 1 Link to comment Share on other sites More sharing options...
bernhard Posted September 26, 2018 Share Posted September 26, 2018 absolutely awesome! thx! already using it ? 1 Link to comment Share on other sites More sharing options...
bernhard Posted September 27, 2018 Share Posted September 27, 2018 Hey @adrian thx again for the great panel settings shortcut. It already saved me from a lot of clicks ? For example today I added some todos in my code and activated the todo-panel. Then I had far too much todos indexed (from AOS and other modules) and I just clicked on the settings tab and added them to the list of not-to-index folders. Works great! One thing I noticed is that when I reload the page after adding a folder to the ignored-list the Todo-Panel was not activated any more. I activated it via the checkbox in the panel selector and clicked "sticky". After saving the module's settings this setting was gone. Is this a bug? Or can I activate this panel in another way? Thank you! Link to comment Share on other sites More sharing options...
adrian Posted September 28, 2018 Author Share Posted September 28, 2018 Hey @bernhard - glad you're enjoying it. Clearing of Tracy cookie settings (like sticky selected panels) when saving the module settings is intentional: https://github.com/adrianbj/TracyDebugger/commit/f26a46724f8d36b33a637835581128875b756e1e The trouble is that I am not sure why I did it ? I'll have to have a think about why I did this - I distinctly remember doing it for some reason but maybe that reason is no longer relevant due to other changes. I'll get back to you on this. On 9/27/2018 at 10:02 AM, bernhard said: Or can I activate this panel in another way? Expand Of course you can enable the panel permanently in the config settings, but I am pretty sure that's not what you mean. 1 Link to comment Share on other sites More sharing options...
adrian Posted September 28, 2018 Author Share Posted September 28, 2018 Some more keyboard shortcuts for the Console panel: CTRL + SHFT + PageUp | One less line in code pane CTRL + SHFT + PageDown | One more line in code pane Unlike the other pane resizing shortcuts, these two save the position of the divider so that it will restore to this position after a page reload. This matches the behavior when you drag the divider with the mouse. 2 Link to comment Share on other sites More sharing options...
bernhard Posted September 29, 2018 Share Posted September 29, 2018 On 9/28/2018 at 1:00 AM, adrian said: Of course you can enable the panel permanently in the config settings, but I am pretty sure that's not what you mean. Expand Hm. Somehow it didn't feel right to do it that way. But it's totally fine of course ? I was just curious of the reason... Link to comment Share on other sites More sharing options...
adrian Posted September 29, 2018 Author Share Posted September 29, 2018 Apparently I have a compulsion for new keyboard shortcuts ? Just added these: SHFT + Enter Expand to fit all code and add new line (saves position) SHFT + Backspace Contract to fit all code and remove line (saves position) I have also modified the drag resizing to automatically snap to row heights. 1 Link to comment Share on other sites More sharing options...
adrian Posted October 2, 2018 Author Share Posted October 2, 2018 Anyone have any thoughts for this new panel before I publish it? Pretty self-explanatory - it shows the status of the various permissions for the current page for all user roles. This should make it much easier to quickly check things if a client complains they don't have access to do a certain action on a specific page. I'll probably commit tomorrow, but just wondering if you guys have any other ideas for this first. Actually, I am now wondering if perhaps this should just be a new section in the RequestInfo panel, rather than a dedicated panel. Any thoughts on this? Thanks! 2 Link to comment Share on other sites More sharing options...
kongondo Posted October 2, 2018 Share Posted October 2, 2018 (edited) Thanks for the update @adrian On 10/2/2018 at 10:45 AM, adrian said: it shows the status of the various permissions for all user roles. This should make it much easier to quickly check things if a client complains they don't have access to do a certain action on a specific page. Expand For a task like this (wanting to check the a client's access RE a specific page), I'm thinking it would be more useful to actually see the permissions of that client in respect of the said page, rather than scrolling through a potentially long list of all roles (e.g. a large site). The difficulty I see is, obviously, the said client is not logged in when the admin is checking out the status ;-), so this may be wishful thinking. Just wondering... Could the colours please, somewhere, match the current colour scheme of the other panels? On 10/2/2018 at 10:45 AM, adrian said: Actually, I am now wondering if perhaps this should just be a new section in the RequestInfo panel, rather than a dedicated panel. Any thoughts on this? Expand I'm 50/50 on this. If I was able to view a page, put a clients name or id in an input and Tracy returns the permission panel, I wouldn't mind it being separate. Just my 2p. Edited October 2, 2018 by kongondo typos 2 Link to comment Share on other sites More sharing options...
gmclelland Posted October 2, 2018 Share Posted October 2, 2018 Good idea adrian! You might want to flip the table rows/columns? roles listed horizontally, permissions listed vertically. I was thinking that there will probably always be more permissions than roles. I would rather scroll vertically than horizontally. That is how Drupal's permission page works. This shows it enhanced with the https://www.drupal.org/project/instantfilter module for instant permission filtering like the AdminOnSteriods module does in Processwire. 1 Link to comment Share on other sites More sharing options...
gmclelland Posted October 2, 2018 Share Posted October 2, 2018 Another idea for you: Would it be possible on the Dumps and Dumps Recorder panels to auto expand the dump if there is only 1 dump? That way someone doesn't have to click the plus sign or arrow to open the dump every-time the page is refreshed? Currently by default it is always collapsed. No worries if you can't, just a suggestion. Appreciate all you do. 3 Link to comment Share on other sites More sharing options...
szabesz Posted October 2, 2018 Share Posted October 2, 2018 On 10/2/2018 at 10:45 AM, adrian said: it shows the status of the various permissions for the current page for all user roles. Expand Any chance of hints or links pointing to somewhere where superusers can get more info on how to adjust those permissions listed? Link to comment Share on other sites More sharing options...
bernhard Posted October 2, 2018 Share Posted October 2, 2018 On 10/2/2018 at 6:57 PM, szabesz said: Any chance of hints or links pointing to somewhere where superusers can get more info on how to adjust those permissions listed? Expand Are you talking about a link to the docs or about shortcut links to the settings page of the template where the admin can adjust those permissions? The latter would be great! Maybe there could also be a section where it shows which template setting is responsible, eg: path | template | active -----------------|--------------|-------------------------------- / | home | yes /foo | basic-page | yes /foo/bar | whatsoever | no (inherited from basic-page) The template strings could be linked to the access tab of the template settings. Not sure how complicated that would be to implement, but I think it could be helpful ? +1 for some more thoughts on the colors! I think the red is too loud. It's not a warning imho - it's just telling there is no permission. I think the red could be removed completely. I'm fine with the green - although I think it could also be more quiet... 1 Link to comment Share on other sites More sharing options...
szabesz Posted October 2, 2018 Share Posted October 2, 2018 On 10/2/2018 at 7:15 PM, bernhard said: or about shortcut links to the settings page of the template where the admin can adjust those permissions? The latter would be great! Maybe there could also be a section where it shows which template setting is responsible, eg: Expand I dared not write these down ? Link to comment Share on other sites More sharing options...
adrian Posted October 2, 2018 Author Share Posted October 2, 2018 Hi everyone, Thanks for all the good thoughts and ideas! On 10/2/2018 at 10:58 AM, kongondo said: For a task like this (wanting to check the a client's access RE a specific page), I'm thinking it would be more useful to actually see the permissions of that client in respect of the said page, rather than scrolling through a potentially long list of all roles (e.g. a large site). The difficulty I see is, obviously, the said client is not logged in when the admin is checking out the status ;-), so this may be wishful thinking. Just wondering... Expand There is of course the User Switcher panel which I use the all the time to check issues a client is having - that's the best way to see the site the way they are seeing it. I have just added a new row at the top of the table that shows the permissions for the current user (in this case "ajones"), so this is either you, or if you are using the UserSwitcher panel then it will obviously be for that user. Does that help with what you are looking for? On 10/2/2018 at 10:58 AM, kongondo said: Could the colours please, somewhere, match the current colour scheme of the other panels? Expand It is using the same colors as the other panels. The colors are all now defined as constants. in the main TracyDebugger class. I know it's a bit loud here, but the idea is for form over function in identifying which roles don't have a certain permission. That said, I'd also be ok with this if you guys prefer: On 10/2/2018 at 1:26 PM, gmclelland said: You might want to flip the table rows/columns? roles listed horizontally, permissions listed vertically. I was thinking that there will probably always be more permissions than roles. I would rather scroll vertically than horizontally. Expand The key thing I think is that I know how many permissions there are and they easily fit on the width of the screen. I don't know how many roles there will be. Does anyone else have any thoughts on this? On 10/2/2018 at 3:40 PM, gmclelland said: Would it be possible on the Dumps and Dumps Recorder panels to auto expand the dump if there is only 1 dump? Expand Not sure if I can because the script that handles the dump doesn't actually know how many dumps are coming, but maybe it can be done with JS after the fact - I'll take a look. On 10/2/2018 at 7:15 PM, bernhard said: Are you talking about a link to the docs or about shortcut links to the settings page of the template where the admin can adjust those permissions? The latter would be great! Maybe there could also be a section where it shows which template setting is responsible, eg: path | template | active -----------------|--------------|-------------------------------- / | home | yes /foo | basic-page | yes /foo/bar | whatsoever | no (inherited from basic-page) The template strings could be linked to the access tab of the template settings. Expand I'll need to think about this some more - I feel like we are starting to get into the territory of this module: http://modules.processwire.com/modules/process-access-overview/ which is not really the goal here, or at least it wasn't. I'll let you guys chime back in on what you think would actually be most useful. Thanks again for all the feedback - greatly appreciated! 1 Link to comment Share on other sites More sharing options...
kongondo Posted October 2, 2018 Share Posted October 2, 2018 On 10/2/2018 at 9:44 PM, adrian said: There is of course the User Switcher panel which I use the all the time to check issues a client is having - that's the best way to see the site the way they are seeing it. Expand Of course! ?. Shows you how precious little I know! The best I've been doing until recently is bd($foo, 'bar');! This week I started using the console, like seriously use it, yay! I've been blown away! Even a multi-line cursor! And bd() in the console! I was gonna ask @bernhard to recommend what else I should play with. I've been missing a lot! On 10/2/2018 at 9:44 PM, adrian said: The key thing I think is that I know how many permissions there are and they easily fit on the width of the screen. Expand So no custom permissions then? On 10/2/2018 at 9:44 PM, adrian said: That said, I'd also be ok with this if you guys prefer: Expand Looks better, thanks. 2 Link to comment Share on other sites More sharing options...
adrian Posted October 2, 2018 Author Share Posted October 2, 2018 On 10/2/2018 at 9:52 PM, kongondo said: This week I started using the console, like seriously use it, yay! I've been blown away! Expand Nice ? On 10/2/2018 at 9:52 PM, kongondo said: And bd() in the console! Expand Typically in the Console, you are better off using d() which dumps to the results panel below. On 10/2/2018 at 9:52 PM, kongondo said: So no custom permissions then? Expand This isn't about permissions in the sense you are talking about. It's just for these page permissions: https://github.com/processwire/processwire/blob/341342dc5b1c58012ae7cb26cffe2c57cd915552/wire/core/Page.php#L88-L107 Maybe it needs to be reimagined, but that was my initial goal for this. What does everyone think? 1 Link to comment Share on other sites More sharing options...
Recommended Posts