Skip to content
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

Fixed usage of config settings by removing default initialState #115

Merged
merged 1 commit into from
Mar 14, 2024

Conversation

jvdneut
Copy link
Contributor

@jvdneut jvdneut commented Mar 14, 2024

Description

Passing of config settings did not work because they were overwritten with the initial settings.

This fixes the passing of config settings when provided through the plugin:

import { vitePlugin as remix } from '@remix-run/dev';
import { defineConfig } from 'vite';
import { remixDevTools, defineRdtConfig } from 'remix-development-tools';

export default defineConfig({
	plugins: [
		remixDevTools(
			defineRdtConfig({
				client: {
					defaultOpen: false,
					panelLocation: 'top',
					position: 'top-right',
					hideUntilHover: true,
				},
			}),
		),
		remix(),
	],
});

Previously these settings were passed through (https://github.com/Code-Forge-Net/Remix-Dev-Tools/blob/main/src/client/context/RDTContext.tsx#L79), but overwritten by https://github.com/Code-Forge-Net/Remix-Dev-Tools/blob/main/src/client/context/RDTContext.tsx#L80 because the settings always included the default settings.

If this is a new feature please add a description of what was added and why below:

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

This has been tested locally, and can be tested with the above vite.config.ts.

  • Unit tests

Checklist:

  • My code follows the guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@AlemTuzlak
Copy link
Contributor

@jvdneut thank you for this!

@AlemTuzlak AlemTuzlak merged commit 14b3f02 into forge-42:main Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants