Skip to content

Conversation

IDisposable
Copy link
Contributor

Fixed the Tailwind CSS syntax for in (nested) selector
Added missing React dependency for useEffect

@IDisposable
Copy link
Contributor Author

@dlorch @ym this is a tiny change to cover the new Tailwind syntax (which changed between when #405 was started):
[.active_&]: -> in-[.active]:

Also adds the missing dependency for the useEffect

@IDisposable
Copy link
Contributor Author

Reverted the comment.

@@ -25,7 +25,7 @@ export default function SettingsKeyboardRoute() {
if ("error" in resp) return;
setKeyboardLayout(resp.result as string);
});
}, []); // eslint-disable-line react-hooks/exhaustive-deps
}, [send, setKeyboardLayout]);
Copy link
Contributor Author

@IDisposable IDisposable May 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change at minimum needs to be landed somehow. As it stand without those dependencies listed we're going send("getKeyboardLayout" message and call the get setKeyboardLayout(` every single render cycle.
☝️ @adamshiervani

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ym, this really needs to be merged... tons of React rerenders until we do...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty dependencies mean that it will behave like componentDidMount, running only once when the component mounts. I can also confirm that it does not re-render outside the case mentioned above.

@IDisposable IDisposable force-pushed the chore/css-fix branch 2 times, most recently from fecdfd6 to 5911b8a Compare May 30, 2025 16:16
 Fixed the Tailwind CSS syntax for `in` (nested) selector
Added missing React dependency for `useEffect`
@ym ym self-requested a review July 1, 2025 19:56
@@ -25,7 +25,7 @@ export default function SettingsKeyboardRoute() {
if ("error" in resp) return;
setKeyboardLayout(resp.result as string);
});
}, []); // eslint-disable-line react-hooks/exhaustive-deps
}, [send, setKeyboardLayout]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty dependencies mean that it will behave like componentDidMount, running only once when the component mounts. I can also confirm that it does not re-render outside the case mentioned above.

@adamshiervani adamshiervani merged commit 9ba97eb into jetkvm:dev Jul 11, 2025
1 of 2 checks passed
@IDisposable IDisposable deleted the chore/css-fix branch July 11, 2025 17:12
adammkelly pushed a commit to adammkelly/kvm that referenced this pull request Jul 15, 2025
Fixed the Tailwind CSS syntax for `in` (nested) selector
Added missing React dependency for `useEffect`
adammkelly pushed a commit to adammkelly/kvm that referenced this pull request Jul 15, 2025
Fixed the Tailwind CSS syntax for `in` (nested) selector
Added missing React dependency for `useEffect`
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.

4 participants