@circfruit there is already a search in announces!
searching in nomadnet pages would be useful indeed! hopefully it can be the same logic sometimes afterwards to also search into the conversations! that would be _extremely_ useful to me!.but... one step at a time! congrats on your current achievement! ;)
@circfruit No, it's only searching the text of the currenty open page, much like pressing ctrl+f in a typical browser. The ctrl+f keybinding was already taken, so I settled on alt+f instead.
I was able to find the function that turns Micron markup into widgets to be rendered in the browser. This enabled me to pop a shim in there that I can use to edit the markup before passing it to the function. I'm thinking of doing something simple, like putting bold tags around instances of the selected text. A bit of a crude solution perhaps, but it gets the job (at least partially) done.
Considering I'm working in an unfamiliar codebase and an unfamiliar language, I'm happy with my progress so far.
As I think more about it, don't think this shim approach is the right one. Sure, I can mutate the markup before passing it to the rendering function, but if I just go adding tags all willy nilly (e.g.: inside if an existing link tag) things can go very wrong. In order to tell whether or not it's safe to alter a piece of markup, I'd need to first parse the markup to do it.
I'm now thinking it's best instead to add an additional optional search_text argument to the parser and make edits to its code directly instead, a tricker approach, but less likely to blow up in my face.
circfruit
in reply to Jonathan Lamothe • • •Jérémie Zimmermann🎶💗🧀🫖
in reply to circfruit • • •@circfruit there is already a search in announces!
searching in nomadnet pages would be useful indeed! hopefully it can be the same logic sometimes afterwards to also search into the conversations! that would be _extremely_ useful to me!.but... one step at a time! congrats on your current achievement! ;)
Jonathan Lamothe
in reply to circfruit • •ctrl+fin a typical browser. Thectrl+fkeybinding was already taken, so I settled onalt+finstead.Jonathan Lamothe
in reply to Jonathan Lamothe • •I made some more progress on this feature.
I was able to find the function that turns Micron markup into widgets to be rendered in the browser. This enabled me to pop a shim in there that I can use to edit the markup before passing it to the function. I'm thinking of doing something simple, like putting bold tags around instances of the selected text. A bit of a crude solution perhaps, but it gets the job (at least partially) done.
Considering I'm working in an unfamiliar codebase and an unfamiliar language, I'm happy with my progress so far.
#Reticulum #NomadNet
fedipossible reshared this.
Jonathan Lamothe
in reply to Jonathan Lamothe • •As I think more about it, don't think this shim approach is the right one. Sure, I can mutate the markup before passing it to the rendering function, but if I just go adding tags all willy nilly (e.g.: inside if an existing link tag) things can go very wrong. In order to tell whether or not it's safe to alter a piece of markup, I'd need to first parse the markup to do it.
I'm now thinking it's best instead to add an additional optional
search_textargument to the parser and make edits to its code directly instead, a tricker approach, but less likely to blow up in my face.#NomadNet #reticulum
tom grzybow likes this.
fedipossible reshared this.