Fork me on GitHub
#fulcro
<
2022-07-26
>
tony.kay00:07:54

I don’t know how recursive calls to parse work. you might ask on the #pathom channel.

Quentin Le Guennec07:07:23

I asked already and it didn’t seem to be surprising to people.

Quentin Le Guennec07:07:01

@U0CKQ19AQ it’s working as expected if I do this:

(parser
          {:fulcro-parser parser}
          [{[:account/id "EJ2NCAPPk6WSpuv7bwvHAK8sVGV4htZFir242pVCzUEb"]
            [:account/stakes]}])
Then use fulcro-parser in the :account/stakes resolver. Would you accept a PR to always have this?

Quentin Le Guennec12:07:43

nvm, it couldn’t work like this. I’m kind of lost here. We rely heavily on this feature. I’ll see what I can do.

Quentin Le Guennec09:07:57

They said it’s supposed to work.

janezj16:07:33

I am deploying my apps to be relative to context-root. Not my choice, I just have to do it that way. So I start immutant.web {:port 3000, :host "0.0.0.0", :path "/apps/monitor"} I need that url is /report/ is set as /apps/monitor/report/ So how can I solve the history context-root handling; in index.html I will write <script>const csroot='/apps/monitor' </script> Now I have to modify history rewriting. Is html5-history/apply-route! right candidate?

tony.kay22:07:22

The adapting between URL and your internal routing can be a generalized function in plain Fulcro, but if you’re using RAD, then yes you’ll have to copy some of the code there and augment it. I don’t have a hook for prefixing built in. Happy to take a PR to add that option to the system. It already has an option to make the routes hash-based, so you could add one for base-url-prefix

tony.kay22:07:24

might want to start carrying those things around as options 😛 But as you can see it is protocol-based and very simply, so implementing your own version isn’t more than 30 lines of code…but in this case augmented option is fine.

❤️ 1
tony.kay15:07:56

Great. So, I would probably do a few things at this point, since the arglist is getting a little long here. I don’t make breaking changes to existing API, so here’s what I’d do: • Instead of adding a parameter to html5-history (which is a non-breaking change, but is starting to get messy) I’d make a new function named new-html5-history that takes a single arg, a map, and put all three options in there. If you want prefix, you use the new constructor function. • I’d refactor the old function html5-history to call the new one, and put a comment in the docstring that you should prefer using the new one, since it supports more options • Make sure the docstrings include details on what the option does.

janezj15:07:28

Ok, I will refactor it.

janezj15:07:51

But I have a huge problem with reports, I would like to have a hidden column, or [{:station/status (comp/get-query Status)}] to be inserted into into generated load! is it possible?

sheluchin16:07:09

See ro/row-query-inclusion and ro/query-inclusions. You can add queries for whatever you want, and if you don't list the RAD attributes under ro/columns, they are "hidden columns".

janezj16:07:14

Thanks, I was completely blind for ro/row-query-inclusion. I read the source and only see without row- prefix.

sheluchin16:07:43

Also check out ro/load-options for more advanced cases.