-
-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Enhancement]: Pass in (some) default settings to init!. #379
Labels
Comments
Hey @sirmspencer, thanks for the idea.
This sounds like the most reasonable to me. More specifically: if the local-storage key exists, use that. If not, save the new config value to local-storage. I think this would do the trick: modified src/day8/re_frame_10x/events.cljs
@@ -24,7 +24,7 @@
(rf/inject-cofx ::local-storage/load {:key "external-window-dimensions" :or {:width 800 :height 800 :top 0 :left 0}})
(rf/inject-cofx ::local-storage/load {:key "show-epoch-traces?" :or true})
(rf/inject-cofx ::local-storage/load {:key "using-trace?" :or true})
- (rf/inject-cofx ::local-storage/load {:key "ignored-events" :or {}})
+ (rf/inject-cofx ::local-storage/load {:key "ignored-events" :or (into {} (get-in project-config [:re-frame-10x :ignored-events]))})
(rf/inject-cofx ::local-storage/load {:key "low-level-trace" :or {:reagent true :re-frame true}})
(rf/inject-cofx ::local-storage/load {:key "filtered-view-trace" :or (let [id1 (random-uuid)
id2 (random-uuid)] A PR would be great, if you have an easy way to implement |
kimo-k
added a commit
that referenced
this issue
Jul 27, 2023
kimo-k
added a commit
that referenced
this issue
Jul 27, 2023
kimo-k
added a commit
that referenced
this issue
Jul 27, 2023
kimo-k
added a commit
that referenced
this issue
Jul 27, 2023
kimo-k
added a commit
that referenced
this issue
Jul 27, 2023
kimo-k
added a commit
that referenced
this issue
Jul 27, 2023
Duplicate of #202 |
kimo-k
added a commit
that referenced
this issue
Jul 27, 2023
kimo-k
added a commit
that referenced
this issue
Nov 30, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What do you suggest?
We have app wide events that can be ignored by all devs. It would be great if I could pass in those events so each dev doesn't need to figure that part out.
I can manage to put up a PR for that, except I am not sure how the project owner wants to handle that default value and local storage. Should I merge events on the ignore list, prefer only defaults, or prefer local storage.
The text was updated successfully, but these errors were encountered: