Jump to content

Option to have Adminer not use iframe


Robin S
 Share

Recommended Posts

Hi @adrian,

Thanks for the recent Tracy updates!

Once change I noticed is that Setup > Adminer now displays within an iframe in the PW admin. There might be some advantages to this but it means that you lose your location when you refresh the page because the query string isn't in the browser address bar any more. I often want to navigate to a particular table or row and then refresh the page to observe the changes after some API operation. So could there be an option to have Setup > Adminer load without an iframe (i.e. how it was in previous Tracy versions)?

Link to comment
Share on other sites

Ah yes OK - sorry about that @Robin S - I thought I was making things better by embedding it within the PW admin so it has the header menu etc. While I think about it, you can for now simply load /setup/adminer-renderer/ instead and you'll get what you're looking for. You can even unhide that page and hide the other one if you want.

image.png.d30c6c1c04d11e450b59775f7bebe588.png

It's funny really - now that the "Edit in Adminer" links open the panel version, I never use the standalone one at all, but I can understand why you might prefer it still, especially for the query string reloading.

  • Like 1
Link to comment
Share on other sites

Still, I wonder if I should revert the behaviour to the just having the standalone version?

Or maybe with a new config setting ("Display standalone") I could have it redirect from /setup/adminer to /setup/adminer-renderer/ - maybe that's the best of both?

Any thoughts?

  • Like 1
Link to comment
Share on other sites

1 minute ago, adrian said:

Still, I wonder if I should revert the behaviour to the just having the standalone version?

Or maybe with a new config setting ("Display standalone") I could have it redirect from /setup/adminer to /setup/adminer-renderer/ - maybe that's the best of both?

I'd be happy with either of those - would be good to have something to make it a bit easier to effectively go back to the previous behaviour because I have quite a few sites that I'll be updating Tracy on.

Link to comment
Share on other sites

Hi @Robin S - the latest version has that new "Standalone mode" setting, but I also modified things so that all changes to the query string in the iframed version are now propagated to the parent so if you do want to use the iframed version, you'll now be able to reload the page and it will work as you're used to in standalone mode.

I have also added a new option for opening adminer links from Tracy or the page editor - if you hold down "shift" while clicking, they will open in the full version of Adminer (standalone or iframed depending on your settings), rather than in the Adminer panel.

Hope that helps, but let me know if you have any other feedback.

  • Like 1
Link to comment
Share on other sites

Hi @adrian, those features sound cool, thanks! But after upgrading one of my test sites to the latest version I first got this when visiting Setup > Adminer:

image.png.ad0a5f36aa453972ba2c6f9cf26679cb.png

Then after a modules refresh I got a better looking result but the query string doesn't seem to be doing what it's supposed to:

image.png.9f787df8533cf1f4b7cd3df6a16b53f5.png

Link to comment
Share on other sites

Hey @Robin S - I am not surprised about the need for a modules refresh - I have seen the same and honestly not sure what to do about that - seems like one of those situations where PW is holding off updating a module until it is called, but by the time it is called, it's too late and the error has already happened.

I am confused by the object in the query string. Could you possibly help by debugging the value of queryStr here: https://github.com/adrianbj/TracyDebugger/blob/c9cb0670f039fb59b1608300b0b12aba322eef45/panels/Adminer/scripts/main.js#L3 and event.data here: https://github.com/adrianbj/TracyDebugger/blob/c9cb0670f039fb59b1608300b0b12aba322eef45/ProcessTracyAdminer.module.php#L37

Thanks.

  • Like 1
Link to comment
Share on other sites

12 hours ago, adrian said:

It looks like there is a clash with the Wappalyzer Chrome extension. When I log event.data it fires many times with results like this:

image.png.f7984a8b3dcba108f32148a5a9347572.png

Hopefully there's a way to allow it to coexist with Wappalyzer because I find it a useful extension.

I forgot to mention before that I also see this notice:

image.png.82024b02624d96eb080a35054592ce75.png

Thanks.

  • Like 1
Link to comment
Share on other sites

12 minutes ago, adrian said:

both issues should be fixed now.

Fantastic, thanks! I think I'll use standalone mode because its more efficient in screen real estate and I always open Adminer in a new tab, but it's really nifty how you solved the query string issue for the iframe option.

  • Like 1
Link to comment
Share on other sites

I have to admit that I kinda like the standalone mode better as well. I thought I was making things better by being able to include the PW menu, but it is kinda ugly, especially with PW's giant <h1> page titles :)

postMessage() is definitely a cool little tool for stuff like this.

Maybe if I get enough feedback along these lines, I'll remove it at some point.

Link to comment
Share on other sites

PS I'd love to know whether you have kept the new Adminer field edit links enabled or not - I can see why they might visually annoy some folks, but I am finding them really useful - it's weird how often I actually want to see (and sometimes edit) the raw database value for a field.

Link to comment
Share on other sites

1 minute ago, adrian said:

especially with PW's giant <h1> page titles

OMG, yes. That's one of the things I override in my custom mods as the default is crazy big. Off topic, but I really think AdminThemeUikit could be improved if some of the Uikit defaults were overridden in the module. Because the default sizing and white space is just too much for an admin panel where the focus should be on functionality and efficiency. And if a few basic things like that were done then users might not feel the need to make custom themes which from past experience I think are the wrong way to go (maintenance nightmare).

6 minutes ago, adrian said:

PS I'd love to know whether you have kept the new Adminer field edit links enabled or not

I did turn them off, mainly because of the screen efficiency thing again. Ideally there would be some way to have them appear without increasing the overall size of the field (maybe on hover or some other way of activating them on demand), but I can see how that would be tricky. Maybe the core should provide for a flyout menu per inputfield that other modules could add links/icons to? Just thinking out loud.

Link to comment
Share on other sites

4 minutes ago, Robin S said:

That's one of the things I override in my custom mods as the default is crazy big

I do the same via admin.less which is nice way to make these sorts of changes - skinning vs a new theme.

9 minutes ago, Robin S said:

I did turn them off, mainly because of the screen efficiency thing again

I did make some quick attempts at a hover approach, but honestly didn't think that took up too much space so didn't persevere too much. I was thinking about a similar approach to the field edit links that AOS adds, but of course the two together get very messy. I'll mull it over and see if I can think of a better solution.

Link to comment
Share on other sites

Maybe still not your thing, but the edit link is now smaller, floated right, and I don't think it takes up any additional space within the inputfield wrapper.

  • Like 1
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...