Closed N3C2L closed 1 month ago
How would gh know a url is associated with a tab root url?
How about using the tag system for this.
Associate tags with a tab root url?
That way the domain rules can be used too.
Or just add another property to domain rules.
Yeah I think a new property on domain rules would be the solution.
Ok, but for example edit title is also only for this tab. What if a user want's different Tab Root Urls for the same domain but on different tabs?
Ah right. Well I can add it per tab easily. I'll see how that goes.
Nice, thanks.
Short offtopic question here: Do you use other ff addons that can export the GH tabs? Background: I tried it with sidebery, but it seems this extension can not export and import my header tabs that I created in GH. So if I reimport the tabs that I have exported with sidebery, and then switching to the GH sidebar, the header tabs have no names in it, they are blank.
I don't use an addon for exporting tabs.
I think the header tabs are special pages made by the GH.
I'll check sidebery to see what it is exporting.
Can you tell me how to do that in Sidebery?
I think it's Create Snapshot.
Yeah Snapshots, saves tabs and can export to file formats.
Seems to restore fine, with the headers, when I click Open Window with the snapshot
Also if you previously changed the headers name with the edit title cmds?
No because the titles are saved on the tab data which gets wiped on snapshot load I guess
Yeah, too bad.
Well I can try saving the title to localStorage
The headers have that textarea thing I can use.
This would be great, thanks.
Nah nvm, the localStorage is shared among all headers, so they'll all have the same title.
Ok I did another test. It seems it's also the case when renaming non-header tabs. But if I rename a normal tab inside the sidebery interface, then take a snapshot, open this snapshot in a new window, the edited name of this tab is restored. Maybe you can look what they are doing different when renaming tabs.
They're using customTitle while I use custom_title.
What I'm gonna do is save both of those so they're compatible.
Much appreciated!
Sorry it seems the data is sandboxed per extension, for security most likely.
I had to debug a local instance of sidebery. I was using the same tab id etc, and I couldn't read sidebery's data, and thus it can't read gh's
Hm, ok. Maybe do you want to implement GH own tabs export feature in near future? 😁 For example save to json.
That's what I was thinking. Exporting is easy. Importing is a bit more tricky. I'll see what I can do.
Great!
Ok it's working beautifully. I won't make a snapshots manager or anything though, only copy/paste json.
It's aware of data so titles, colors, tags, notes, etc remain.
And the order is preserved. And pins.
Big update. Lots of stuff today.
Also signals have an option to include the tabs snapshot in the payload. So for instance you can send a signal to your personal web server to backup the snapshots periodically.
v3318
Added Root
property to tabs. They can be set per tab with the Edit Root
cmd, but also it's now a rule. You can set roots on domain rules.
The old Filter Root
command is now called Filter Nodes
. This command shows child nodes of a tab (opened through that tab). This is also added to the Item Menu.
Some code refactoring due to additions.
Close button now has a menu on right click. Configurable and it's a command.
Export Tabs and Import Tabs commands. This produce a json as described. Importing resolves the old nodes, the opener tab, so that isn't lost either.
Very good additions! Thanks a bunch! I am looking forward to give some feedback to this update tomorrow.
Thanks again! And here is my feedback:
I did try to unload the imports before but couldn't, I did it this time though, fixed.
There is now a Root Icon. Clicking this goes to root.
There is a Left/Right selector for all icons now.
About 3, seems like a limitation imposed by firefox, and thus not reporting the opener, nothing I can do.
Also when a tab has nodes, and you right click it to show the Item Menu, there is a Nodes
item at the very top. There is also a Root
item at the top if the item has a root.
Gonna add a Nodes icon to show it has nodes.
Middle Click nodes icon to close all nodes.
I did try to unload the imports before but couldn't, I did it this time though, fixed.
There is now a Root Icon. Clicking this goes to root.
There is a Left/Right selector for all icons now.
Thanks!
About 3, seems like a limitation imposed by firefox, and thus not reporting the opener, nothing I can do.
It's ok, I can filter unread tabs if needed.
Also when a tab has nodes, and you right click it to show the Item Menu, there is a
Nodes
item at the very top. There is also aRoot
item at the top if the item has a root.
Good to know!
Gonna add a Nodes icon to show it has nodes.
Middle Click nodes icon to close all nodes.
Thanks again, and middle click on nodes to close them, good one.
More work on icons. Added option for color icons as well.
Changing defaults to right
for notes icon and color icons.
Upload soon.
If it's ok I would continue my feedback for nodes / icons / roots:
I don't understand #1, moving a tab up or down doesn't change nodes.
Hm did you try with the mouse with drag and drop?
You mean between windows? Dragging tabs up or down doesn't change the tab tree
I'll do #3 and check why #4 is not working
Edit: Ok I was wrong, sorry, #1 is working, all good.
Not sure how to tackle #4 -- should I make delay per combo, or should I add a Sleep 1 Second
command hmm
Commands would be more fine grained, or? User is flexible with different ms or s of delay per combo.
I could just add a special sleep command you add to combos between items. like 500ms or 1 second and you just add them in between commands
Yes, that would be great.
About #2, remember that tabs can be parents and nodes at the same time. Also not sure how easy it would be to update the styling
There's gonna be a 500ms cmd and a 1000ms cmd
New version up.
Thanks! Ok, I didn't know that childs can also be parents, that would of course confuse the styling then. I remembered that other extensions like sidebery oder tree style tab provided different classes / css selectors for the parent and child tab for css styling.
Just realized that when I closed and reopened a child tab, I can't go back to the parent tab (no "has parent" icon anymore on the tab)
This problem is more visible when the icons for parent tabs and node tabs are activated: When I move a node child tab to another zone (without the parent tab), it would be helpful to delete the status of being a child tab or parent tab. Because this is then not relevant anymore in the other zone because the parent tab isn't there anymore. Maybe new commands could delete nodes child tab / parent tab status when needed? Because elsewhere the icons on the child tab would take me to a parent tab in the other zone.
It's not the same concept as tree style tabs. Parent only means that it was the tab that opened the node. For instance if you are in a forum and you open 5 threads through that tab, that is the parent of 5 nodes.
The internal firefox word is "opener".
Re-opening a tab deletes the opener
property.
I see. Thanks for the clarification.
I am also a guy who doesn't need tab groups at all, because I love it flat, and don't want that tabs to indent all the time. But I do think the opener concept could be visually more appealing if parent tabs and nodes could be differently tuned with css. Do you think it could be possible to provide an option, that a node tab can't be a also a parent tab? And if a user want that a node tab to be a parent tab, he needs to close and reopen this tab for example and add some nodes to it. The advantage would be that users could style this parent & node tabs differently like I described above with some css things.
I'd rather not do that sorry. I don't want to over-complicate simple links between tabs.
Well tabs have root urls now. So I'm closing this.
I'm gonna make it so the root icon only appears when going back a root is possible, that is, it's not already at the root.
Also going to give it a default icon since it's more useful now.
Gonna add a setting in Icons
to make it auto or not. Checkbox.
Originally posted by @N3C2L in https://github.com/madprops/grasshopper/issues/120#issuecomment-2379457875
@madprops Regarding a concept that takes me back to the root url of a tab. (you can change the names of the following cmds as you like, they should just demonstrate my idea) Perhaps something similar to the "Custom URL" feature, but maybe called "Tab Root URLs". Somewhere in the settings under Tab Root URLs, the user could enter Tab Root URLs. This would create a list of Tab Root URLs similar to Custom URLs. Once a user has entered a Tab Root URL, they can right-click on a tab and select a Root URL for this tab from the list of Tab Root URLs (this might be possible with a new command like "Set Root URL", where when activated the list of the Tab Root URLs will spawn to choose from). After the user has set a Root URL for a tab, they would then need a new command like "Go Tab Root" which would allow them to return to their Tab Root URL. It would also be great if the user could select multiple tabs and execute "Go Tab Root", so that all the selected tabs could return to their respective tab root URLs.