mirror of
https://github.com/jkingsman/Remote-Terminal-for-MeshCore.git
synced 2026-08-10 18:53:03 +02:00
Fix clipping on integration add drop down
This commit is contained in:
+5
-1
@@ -194,7 +194,11 @@ def normalize_contact_route(
|
|||||||
expected_bytes = normalized_len * bytes_per_hop
|
expected_bytes = normalized_len * bytes_per_hop
|
||||||
if actual_bytes > expected_bytes >= 0:
|
if actual_bytes > expected_bytes >= 0:
|
||||||
normalized_path = normalized_path[: expected_bytes * 2]
|
normalized_path = normalized_path[: expected_bytes * 2]
|
||||||
elif actual_bytes < expected_bytes and bytes_per_hop > 0 and actual_bytes % bytes_per_hop == 0:
|
elif (
|
||||||
|
actual_bytes < expected_bytes
|
||||||
|
and bytes_per_hop > 0
|
||||||
|
and actual_bytes % bytes_per_hop == 0
|
||||||
|
):
|
||||||
normalized_len = actual_bytes // bytes_per_hop
|
normalized_len = actual_bytes // bytes_per_hop
|
||||||
|
|
||||||
return normalized_path, normalized_len, normalized_mode
|
return normalized_path, normalized_len, normalized_mode
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ export function SettingsModal(props: SettingsModalProps) {
|
|||||||
const shouldRenderSection = (section: SettingsSection) =>
|
const shouldRenderSection = (section: SettingsSection) =>
|
||||||
!externalDesktopSidebarMode || desktopSection === section;
|
!externalDesktopSidebarMode || desktopSection === section;
|
||||||
|
|
||||||
const sectionWrapperClass = 'overflow-hidden';
|
const sectionWrapperClass = '';
|
||||||
|
|
||||||
const sectionContentClass = externalDesktopSidebarMode
|
const sectionContentClass = externalDesktopSidebarMode
|
||||||
? 'mx-auto w-full max-w-[800px] space-y-4 p-4'
|
? 'mx-auto w-full max-w-[800px] space-y-4 p-4'
|
||||||
|
|||||||
@@ -231,6 +231,17 @@ describe('SettingsModal', () => {
|
|||||||
expect(screen.queryByLabelText('Preset')).not.toBeInTheDocument();
|
expect(screen.queryByLabelText('Preset')).not.toBeInTheDocument();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('does not clip the fanout add-integration menu in external desktop mode', () => {
|
||||||
|
renderModal({
|
||||||
|
externalSidebarNav: true,
|
||||||
|
desktopSection: 'fanout',
|
||||||
|
});
|
||||||
|
|
||||||
|
const addIntegrationButton = screen.getByRole('button', { name: 'Add Integration' });
|
||||||
|
const wrapperSection = addIntegrationButton.closest('section');
|
||||||
|
expect(wrapperSection).not.toHaveClass('overflow-hidden');
|
||||||
|
});
|
||||||
|
|
||||||
it('applies the centered 800px column layout to non-fanout settings content', () => {
|
it('applies the centered 800px column layout to non-fanout settings content', () => {
|
||||||
renderModal({
|
renderModal({
|
||||||
externalSidebarNav: true,
|
externalSidebarNav: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user