bookmarks for search pages prompt the user to input the search term #29
Labels
No Label
blocked
bug
build
documentation
duplicate
enhancement
finger
gemini
gopher
help wanted
http
in progress
invalid
local
needs-info
non-code
non-functional
non-urgent
question
release
rendering
suggestion
telnet
terminal
urgent
wontfix
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sloum/bombadillo#29
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hi Sloum!
Bookmarked search pages do not show the results, but instead prompt the user to perform another search. Pressing enter with no search then shows the bookmarked page.
I can reproduce this issue by doing the following:
gopher.floodgap.com:70/7/v2/vs
:add . test
:bookmarks n
where n is the bookmark numberInstead of showing the results page, the user is prompted to perform the search again.
Enter form input:
is shown at the bottom of the screen.Pressing
enter
with no text entry then brings up the expected page.I took a look to try to understand this, but could not figure it out yet. Here's where I'm at so far:
main.go
, when a search is identified, the URL is sent to thesearch
function. This function will always prompt for search input.I thought that modifying the search function to check for a URL containing a search term could fix this. Like:
This does not work though as the user is still prompted. I can try to get back to this later with a bit more time.
edit: this does actually work i was running the wrong binary lmao
lol, I run the wrong binary all the time! Yeah, you solved it more or less the way I was going to suggest (though in a slightly different place). I had taken a step back from this project since my development time is small and it has gotten complicated enough that I dont want to break something and donk things up for users and then not have time to fix it. That said, this issue seems very clearly fixable to me.
I see two paths:
Do as above and check for a tab and avoid prompting in that case. This has some flaws: more overhead, does not solve issues rendering plaintext as gophermap.
When a user submits a query, have the type overridden for the response to type 1. That way checks dont have to be done at all for querystrings, a search response would always return a gophermap... the only issue with this approach is that I do not believe all searches will return a gophermap. This will necessitate a slight change to gophermap rendering. I think this might be the better way to handle things, but I am not certain. Not knowing whether plaintext or a gophermap will be returned (or anything else) is one of the big issues with gopher as a protocol (one that project gemini is attempting to solve), and this falls into that territory.
I will try to start working on this asap, likely tomorrow. That said, if you'd rather have a go and want to submit a PR just let me know :)
OK, I'm happy to try this, just want to clarify the detail as I'm learning all this as I go:
For a search in veronica2 with search term
golang
, the URL requested of the server is this:The suggestion is that the page showing results should be returned as type 1, meaning the URL displayed for it would become:
If this page is bookmarked, the search results should be shown without a search prompt.
I tested by changing the bookmarks manually from type 7 to type 1. The pages display correctly and without a search prompt.
For reference, I had a look at other clients.
gopher
saves the bookmark as type 1,lynx
saves it as type 7 but does not prompt,vf1
seems to have the same issue we are discussing.Yeah, you've got the gist of it. The only issue with changing it to type one is if the response is not a gophermap. I need to change how gophermaps are parsed to allow for plaintext lines. I can handle that part if you want to handle the other :)
@asdf I had some time today and worked through a version of how this could be handled. I am still very open to a solution of yours and would love to see a PR if you started on a solution. I have created a PR ( #30 ) in order to get comments from you, or anyone else, regarding this issue. I have tested the code in a local build and it seems to solve the issue pretty well.
Let me know if you'd like me to proceed with merging that PR in or if you will have one forthcoming or if you have concerns or comments. As always, thanks for contributing!
Closed by #30