Skip to main content

Command Palette

Search for a command to run...

APEX 26.1 Object Browser in Page Designer

Updated
4 min read
APEX 26.1 Object Browser in Page Designer
M

With around 20 years on the job, Matt is one of the most experienced software developers at Pretius. He likes meeting new people, traveling to conferences, and working on different projects.

He’s also a big sports fan (regularly watches Leeds United, Formula 1, and boxing), and not just as a spectator – he often starts his days on a mountain bike, to tune his mind.

Hey , I saw this tweet by Andrew, almost a year ago now, and I haven't been able to stop thinking about it.

It would be really flipping good if we could have Object Browser smack in the middle of Page Designer. Typically I do have both page designer and logic browser open as two tabs but as of late I'm an alt-tabbing in between page designer and VS Code now.

Most of the time I'm just quickly looking up a column, a table, a naming convention of an object, that kind of thing. Rather than leaving my browser tab and train of thought, it'd be really good if we could just have an object browser in the middle pane of Page Designer.

First things first though. Let's try to add Object Browser. This kind of thing can be done with Tampermonkey and have you seen from my blogs recently I've done quite a lot of Tampermonkey enhancements.

After some lengthy conversations with my AI friend the results are pretty awesome

By the way if you're curious why my black navigation bar is at the top of the page and you want the same, check out my collection of Page Designer mods here

There were some interesting moments in the build of this object browser in Page Designer.

  • A thing that I'm noticing quite a lot is that Tampermonkey fires before components like apex.env are available on the page. apex.env is critical because it contains the session ID, the Apex version, and all interesting things that are required for a Tampermonkey script to run. You can get it to run late, however for things like styling issues, including CSS, there is a noticeable lag so there is a trade-off between disruption on the page and functionality.

  • Lots of tab labels and icons disappearing after drag-in. This is because APEX redraws the bars from its own metadata when you move a tab and it continually tries to wipe things out. I have to continuously reapply the label, icon, and link every time the DOM changes, which is a bit annoying.

  • A tonne of JavaScript errors in the console. There are several workarounds that I tried to apply , one of which broke everything. Sometimes the control panel on the layouts tab has suddenly appeared in Object Browser.

  • Yeah one thing that I'm not proud of is that I can make the object browser bigger but I can't make it smaller. If you want to make it smaller, you'll have to change tab, make it smaller, and then go to object browser. Sorry about this. If I find something better I will definitely update this script.

  • One thing that you need to look out for is that the object browser navigator panel can be collapsed. This is part of the splitter functionality. However there are already several splitters on Page Designer anyway so you have to find the right pixel to expand the navigation in the object browser if it is collapsed. Yeah once again not proud about this but if there's a fix that appears I'll definitely apply it.

  • Also you need quite a wide screen because page designer requires more space than just running in a splitter region tab.

  • Two pane mode is my daily driver so I needed to make sure it works for everybody because the APEX default is three pane mode. So it had to work for everyone. According to the stats only 18.2% of APEX developers use two-panel mode. Hey, you should set yourself a challenge of moving to two-panel mode. In my experience it's far superior 😁

Here's a little video that I made of it in operation editing code this time

Okay so now I'll let you know how to install it. See you below.

Instructions

  1. Install Tampermonkey Browser Extension

  2. Click Browser Extension > Right Click > Create a new Script

  3. Paste over the starter script with this script

  4. Ctrl + S to save

  5. Refresh your browser

Want more mods? my full set of mods can be found here

ENJOY!

What's the picture? The beautiful rose gardens at Royal House, Harrogate. Visit Yorkshire

O

Great Matt, is Tampermonkey safe to use BRs

M

It's as safe as the user scripts that you install. If you can use Violentmonkey, then choose that, however it doesn't work in Chrome anymore

O

Thanks, Your reply is clear, so no hidden scripts or Trojans,..etc. Are you using it in PROD environments? y