d_run
2020-8-7 10:38:24

@d_run has joined the channel


jcmdln425
2020-8-7 18:44:30

Next issue I’m looking at is https://github.com/racket/racket/issues/936


jcmdln425
2020-8-7 18:45:20

I understand the intention of adding the query string, but looking at racket/scribble it should be reasonable to hack together the behavior I personally want


samth
2020-8-7 18:45:59

This is definitely still there, and I wish it was fixed. So I’m excited to have you work on it!


jcmdln425
2020-8-7 18:46:14

jcmdln425
2020-8-7 18:47:09

A little prodding at the javascript might be all that’s needed from my cursory skim, but I’m still at work right now so I’ll have to give this a deeper look later on


jcmdln425
2020-8-7 18:50:38

hopefully my synopsis of the issue and a path toward “expected behavior” makes sense


jcmdln425
2020-8-7 19:00:35

@sorawee added some context I didn’t account for. The search field will automatically update the results, but not the query string in the url


samth
2020-8-7 19:02:19

I think a use of the JS history API should be sufficient here


sorawee
2020-8-7 19:06:46

If it needs to be more advanced, cookies or localstorage should be employed instead of query string.


sorawee
2020-8-7 19:07:48

localStorage is semantically more correct for our purpose, but old browsers wouldn’t support it. So probably cookies?


sorawee
2020-8-7 19:08:54

Oh, JS history API is cool.


sorawee
2020-8-7 19:09:13

But I think older browsers wouldn’t support it, too, right?



sorawee
2020-8-7 19:09:26

Only added in IE 10


sorawee
2020-8-7 19:10:43

https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie

Cookies on the other hand was supported since IE4


jcmdln425
2020-8-7 19:11:05

History API with a cookie fallback seems reasonable


jcmdln425
2020-8-7 19:23:35

Ah, setting cookies vi JS could result in XSS attacks. Resolving this “the right way” might require a few layers of changes, but not an insurmountable problem


sorawee
2020-8-7 19:25:12

@jcmdln425 if you want to rewrite the search in reactive style, you can consider doing something similar to https://github.com/racket/racket-lang-org/pull/123/files


sorawee
2020-8-7 19:25:48

Though it could be that this feature is very simple that reactive style wouldn’t simplify your life much


jcmdln425
2020-8-7 19:29:14

Hmm, interesting. I may need to chew on the possible solutions and dig through some RFCs to make sure I don’t make things worse


jcmdln425
2020-8-7 19:29:41

I’m free this weekend though, so I’m not scared


jcmdln425
2020-8-7 19:32:37

server-side, when a search is completed I’d like for an HTTP cookie to be set. This can be handled bidirectionally in JS or Racket, so I’ll see what seems like “the right way”. Coupling that with the History API and invalidating stale cookies, if set, seems to cover most of the cases I can think of.

Something about that doesn’t seem right, so I’ll do some research later


sorawee
2020-8-7 19:33:18

Thank you so much btw for tacking this problem! I think everyone agrees that the current behavior is annoying.


jcmdln425
2020-8-7 19:34:07

Thanks for helping bounce ideas! I’m mostly driven to solve this one because I also find the behavior odd, but well-intended


samth
2020-8-7 19:40:39

Note that there is no server side for the docs


jcmdln425
2020-8-7 19:42:17

I forgot to replace the link with the HTTP cookie document url, lol


jcmdln425
2020-8-7 19:43:01

oh


jcmdln425
2020-8-7 19:43:06

I misunderstood


jcmdln425
2020-8-7 19:43:17

Hmm, I’ll make a note


sorawee
2020-8-7 19:51:14

Another thing that is worth thinking about: how would this work with raco docs, which opens up the documentation locally in your computer.


sorawee
2020-8-7 19:51:37

sorawee
2020-8-7 19:51:56

But considering that it’s a fallback method, it’s probably fine?


jcmdln425
2020-8-7 19:53:51

provided I can change the URL and register a dom update, most browsers treat that as a “new page” so forward/backward navigation will work. I’ll test locally with raco docs primarily, later testing on github pages before submitting the PR


jcmdln425
2020-8-7 19:54:47

I’ll see how some JS frameworks handle this and make some trivial scaffolding to prove a path forward


alexharsanyi
2020-8-7 22:24:30

@alexharsanyi has joined the channel


alexharsanyi
2020-8-7 22:24:30

@alexharsanyi has joined the channel


alexharsanyi
2020-8-7 22:27:56

I think this issue can be closed. The requested functionality is available as a separate package, and I don’t think anyone will work on it to add native support for “cue text”: https://github.com/racket/gui/issues/133


alexharsanyi
2020-8-7 22:30:03

This can also be closed for the same reason: https://github.com/racket/gui/issues/16


alexharsanyi
2020-8-7 22:37:52

This issue should also probably be closed, as the code works as documented. If there are plans to change how snips and snip classes work, it should be done as a separate issue: https://github.com/racket/gui/issues/157


alexharsanyi
2020-8-7 22:44:47

This could also be closed as it is not a Racket GUI Bug (see comments): https://github.com/racket/gui/issues/149


sorawee
2020-8-8 00:40:26

If you don’t mind, I will try to push for your cue text to go into mred. I would need to ask you to relicense the gui-widget-mixins to MIT/Apache 2 to be compatible with Racket though, if you are willing.


samdphillips
2020-8-8 00:53:03

@samdphillips has joined the channel


samdphillips
2020-8-8 00:54:44

thanks for suggesting this. I’ve thought about this occasionally myself, but I just didn’t have the energy to do something


alexharsanyi
2020-8-8 00:58:42

Racket gui already has a cue text mixin, although it works differently (and in my opinion, more complex to use). https://github.com/racket/gui/blob/001c57b86c624ad367354d6bf168f55f82e79c20/gui-lib/embedded-gui/private/cue-text.rkt


alexharsanyi
2020-8-8 01:01:53

If you do the work and have it approved for merge into mred, I will re-license my code so it is compatible with the Racket license.


sorawee
2020-8-8 01:31:08

Now that 7.8 is released, I think we also should go over https://github.com/racket/racket/pulls?q=is%3Aopen+is%3Apr+label%3APR-good-to-merge and try to get them merged before we forget them


samth
2020-8-8 02:17:33

Mostly those are waiting for comments from the person I assigned them to


samth
2020-8-8 02:17:43

If there are any exceptions, let me know


notjack
2020-8-8 03:54:16

this issue drives me up a wall, so I’m very excited at the prospect of it getting fixed


maburns
2020-8-8 06:31:49

@maburns has joined the channel