default trigger image or not end user configurable #234
colelawrence
started this conversation in
Ideas
Replies: 1 comment
-
|
This approach is hacky, but it also worked for me. const permanentDefaults: import("@tanstack/react-devtools").TanStackDevtoolsReactInit["config"] = {
triggerImage: new URL("/devicon.png", BUILD_EDITOR_CONFIG.apiURL).toString(),
requireUrlFlag: false,
urlFlag: undefined,
triggerHidden: false,
};
const niceDefaults: import("@tanstack/react-devtools").TanStackDevtoolsReactInit["config"] = {
theme: "dark",
};
// replace tanstack_devtools_settings json value "triggerImage" with trigger image
if (typeof window !== "undefined") {
const tanstackDevtoolsSettings = JSON.parse(localStorage.getItem("tanstack_devtools_settings") || "{}");
localStorage.setItem(
"tanstack_devtools_settings",
JSON.stringify({ ...niceDefaults, ...tanstackDevtoolsSettings, ...permanentDefaults }),
);
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'd like every engineer on my team to have a consistent experience, even if they change some settings.
But it looks like if they accidentally change the setting for the image of the trigger, then they will be left with the TanStack logo inside of our product which appears in demos and is obviously non-ideal when the tools that we're using to host inside of TanStack dev tools are not exclusively for TanStack. This can lead to confusion.
I would propose that we have some default trigger image customization.
My current workaround is patching the TanStack dev tools directly and inserting my own data URI.
Beta Was this translation helpful? Give feedback.
All reactions