Geopard
Geopard copied to clipboard
New bookmark backend + UI
This PR will contain an dedicated window for bookmarks management, Add Bookmark popover and redesigned bookmarks structure based on TOML file format.
Things to do:
- [ ] Create dedicated bookmarks window:
- [x] Create initial, proof-of-concept UI file and Rust code
- [ ] Add edit bookmark functionality
- [ ] Implement basic list management (edit, select, delete)
- [x] Integrate logic with new bookmark format
- [ ] Add
New Tabview - [x] Implement new bookmark format similar to Geopard's configuration
- [ ] Create
Add Bookmarkpopover
| Bookmarks Window | New Tab View |
|---|---|
I appreciate it. Though I wouldn't save the bookmarks to a toml file. I'd keep a .gemini format. Bookmarks are a list of links anyways and Gemini can fully describe that.
I see, but I wanted to switch to TOML to allow users to set custom descriptions and tags for better organizing. A bookmark structure similar to the config one is much more flexible and will easily allow more features to be added in the future, such as custom icons (when icons will eventually be supported).
Also, I will write migration code for users upgrading from older bookmarks format, so no manual migration will be needed.
If there's an automatic migration, I approve
@ranfdev This is the current draft structure for bookmarks file:
[bookmark.1]
title = "TestSite0"
description = "Test Site no. 0"
url = "gemini://example.com"
[bookmark.2]
title = "TestSite1"
url = "gemini://example.com"
[bookmark.3]
title = "TestSite2"
description = "Test Site no. 2"
url = "gemini://example.com"
[bookmark.5]
title = "TestSite4"
description = "Test Site no. 4"
url = "gemini://example.com"
Looks good? or would you like something changed?
What's the advantage of using the syntax
[bookmark.$i] instead of [[bookmarks]] (array of tables, https://toml.io/en/v1.0.0#array-of-tables)?
I think having an ID for a bookmark will make it easier to retrieve a particular bookmark struct in BookmarksWindow's item search and sorting.
I think the [[bookmarks]] syntax makes it easier to edit the file by hand, because the user doesn't have to manually track which id is already used. But in 99.99% of cases the user won't edit the file manually, so feel free to decide what's more practical.
I'll see. If I could make edit functionality to work reliably with vector indexes, then for simplicity (and for those who like fiddling with bookmark files), I will switch to [[bookmarks]] syntax.
Here's current new tab design:
I have mixed feelings about it. The design doesn't feel quite in line with the rest of the GNOME apps. Compared to an Adw.StatusPage, I can see the following differences:
- spacing between title and logo
- border radius of the search bar vs border radius of the adwaita boxed list
- list row items usually don't have an icon at the start. And the internal left margin is different
Also, this feels like a slight loss of functionality. Before, the user could see his bookmarks as soon as possible. Now he gets a new tab page with duplicate functionality, because the search bar already exists (and is focused by default).
The new tab page is seen a lot, so I do care a lot about it.
The border radius and margin are different, because this is just a SearchEntry with set height request.
About spacing between logo and title, here's an updated design using StatusPage:
Also, this feels like a slight loss of functionality. Before, the user could see his bookmarks as soon as possible. Now he gets a new tab page with duplicate functionality, because the search bar already exists (and is focused by default).
How about adding something similar to what Firefox has with "Shortcuts"? It could show 5 newest bookmarks, or like in Chrome and Opera, it could show sites that user frequently visits (but this would need to be set manually by user, as we don't have persistent history).
Reference images:
Firefox:
Opera:
Chrome:
Also, here's the design for bookmark popover:
Imagine if bookmarks had tags. At that point the new tab page could show bookmarks tagged with "new_tab", below the search bar similar to what Firefox is doing.
Then you could add some default bookmarks with that tag, so that new users have an initial list of websites to discover the Gemini space
@ranfdev I'll be splitting this PR into several smaller ones, as it will be easier for me to develop those changes one at the time (and for you to review them afterwards).