From time to time I have bugs or suggestions and I want to reduce the effort to communicate them. Therefore I create this topic and simply add a new post in here for every new bug/suggestion. With that, the community even have the possibility to comment/help/upvote these contents.
First few things:
Suggestion: Close tabs without confirmation popups (at least “Discard All” option) - try to close 20+ IntelliShell/import/export tabs, you will be clicking a lot
Suggestion: Get collection info (info popup on collection mouseover) for every collection of a database (or maybe all collection on all databases) in a table to quickly see through and even export/copy info out of it. Currently I have to hover over all collections, look at the data and type it elsewhere by hand because it can’t be copied.
Bug: When dropping ObjectIds to the Visual Query Builder opens two yellow info popups, one after another. This happens since months and many versions, unchanged unwanted behaviour. In some edge cases (which I could not reproduce at this time) these info popups can stack and one have to “click away” a dozen times. Video of that:
New suggestion: Export all collections of a database except specific collection(s).
Solved:
There is a “Close tab (no prompt)” feature that you can use via keyboard shortcut. You can find your preset shortcut under Edit → Preferences → Keymap → search for “close”. It is most likely Ctrl + Shift + F4 or Ctrl + Shift + W, but you can set it as you wish.
Summary
(I have a DB with 70 collections and some of them are big, like enormous. I don’t need them so I want to export without these. If I select all collection in the collection tree by selecting with Shift and deselect some with Ctrl, and do right click → Export collections, Studio open a single export tab for each collection. So Studio stops responding for 10-15secs while opening all these tabs. Afterwards you get a job overview with all exports in it, which you could run, but you can not edit. If I want to change settings or the destination folder for all jobs, Studio again opens all 60+ export tabs, killing it once more. Thats not practical.)
There’s already a quicker way to close windows - You can speed up by using Shift-[Control/Command]-W to close a window. That automatically discards changes without clicking (and it’s faster than focussing on the tab close button to click).
(Windows users should use Control-F4 and Shift-Control-F4)
And one way to get that collection information without having to copy it all down is to run this…
delete colls
var colls=db.getCollectionNames()
for (coll of colls) {
var info=db.getCollection(coll).stats(1024);
printjson(info);
}
In an Intellishell opened on the database. Just be prepared to see all the stats. If there’s only a subset you are interested in, you could create an object with just those values and printjson() that.
var dbs=db.getMongo().getDBNames();
for(adb of dbs) {
var colls=db.getSiblingDB(adb).getCollectionNames()
for (coll of colls) {
var info=db.getSiblingDB(adb).getCollection(coll).stats(1024);
if(info.ok) {
//printjson({ns:info.ns,size:info.size,count:info.count});
printjson(info);
}
}
}
It will dump the entire set of stats for every collection in every database, only skipping when there’s an error (like a collection is really a view).
It should also work when connected to any collection, database or server in Studio 3T’s IntelliShell.
Uncomment the commented out line for an example of printing out selected values and don’t forget to comment out the following line.
I tested that, it doesn’t work for me. Neither Ctrl+W nor Shift+Ctrl+W close neither a normal collection tab nor an export tab.
“A few minutes later”: Is that maybe a user specific keymapping of yours? I’ve found different keymaps after looking into my settings:
Yeah, as you say, “historical inconveniences” - I would never voluntarily press F4 in any program because of the fear to close it entirely. Ctrl+W is way more known to close sub-parts of a program nowadays. Maybe a suggestion to adjust the install-default for Windows in Studio3T. I don’t think I’m the only Windows user being overcautious with F4 shotcuts
Suggestion: I often use “Follow reference” on ObjectIds, nice feature. It would be nice to be able to search for references to an ObjectId more freely. Searching references is generally somthing that you need complex scripts/aggregates for, unfortunately. It would be nice to select an ID (even _id), optionally select a collection and all fields of this collection that contain UserIds (even if nested in arrays or object) will get searched for that ObjectId. I get that this will be a difficult feature to code because you would have to adapt the search based on what content that collection holds. But it would be nice.
Bug: Select ID → Follow Reference → [Enter] does not submit the popup, you need to press [Tab] [Enter] or use the mouse. That habbit to submit with [Enter] is hard to overcome.
You can see it on the second try: The duplicated tab quickly flashes and disappears again. This happens every time, the GIF just didn’t got an image of that millisecond the first time.
I don’t know why but it doesn’t work anymore at all: local DB and cloud DB, collection tab with and without query filter, different collection sizes, never works at all.
This bug can be fixed by restarting Studio3T. But even after restarting, it occured again today. I’ve just now updated to 2022.8.1, I will update here if that happens again.
Nothing new - sometimes it works, sometimes it doesn’t, currently it is not working and I would have to restart Studio3T to get it working, which is a bigger effort than just reopening the tab and copy-paste query & stuff. Still got no clue which trigger breaks it.
The “Duplicate Tab” feature is my “baby” so I don’t like to see it malfunctioning. Any chance you could check if there’s an error in the log.txt that might tell us what’s going on here?
Hey Rico, welcome to Studio3T Community! (The system demanded to welcome you after your first post )
Yes of course I could take a look, and even better: I will send you the log file (tomorrow at work) so that you can have a look, you most likely will do better analysing the contents. I’m here for you if you need any testing in this broken state.