Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
0e6930c
feat: Introduce Layout component and refactor App structure
musale Jan 14, 2025
4bee68b
feat: Enhance Layout component with sample query handling and add Lay…
musale Jan 14, 2025
04d798f
feat: Add resize functionality to Layout component with new resize ha…
musale Jan 14, 2025
f213121
feat: Refactor Layout and Sidebar components for improved styling and…
musale Jan 14, 2025
df538fe
feat: Update Layout and LayoutResizeHandler components for improved s…
musale Jan 14, 2025
a4123db
feat: Update layout styles and structure for improved responsiveness …
musale Jan 14, 2025
5e95f9a
feat: Refactor Layout component structure and enhance notification ha…
musale Jan 14, 2025
3ef0331
feat: Update layout and sidebar styles for improved visual consistenc…
musale Jan 14, 2025
4ab3a3a
feat: Enhance Layout and LayoutResizeHandler components with improved…
musale Jan 14, 2025
5921c64
feat: Update background color in index.html and modify hover styles i…
musale Jan 14, 2025
83c0417
feat: Enhance layout styles and notification handling for improved us…
musale Jan 15, 2025
abf4096
feat: Remove background color from responseArea for improved design c…
musale Jan 15, 2025
d9a9fb2
feat: Update sidebar size to 460px for improved layout consistency
musale Jan 15, 2025
85e2c40
feat: Refactor layout styles and clean up unused CSS classes for impr…
musale Jan 15, 2025
4378202
feat: Remove unused Monaco styles and refactor RequestBody and Monaco…
musale Jan 15, 2025
06422c9
feat: Add convertPercentToPx function and update layout resizing logi…
musale Jan 15, 2025
21b896b
feat: Refactor HeadersList component to use Fluent UI Table and impro…
musale Jan 15, 2025
09b9359
feat: Remove background color from RequestHeadersV9 component for imp…
musale Jan 15, 2025
7e83d8a
feat: Enhance header styling in HeadersList component by making colum…
musale Jan 15, 2025
8dc18b1
feat: Update HeadersList component to use index as key for TableRow m…
musale Jan 15, 2025
366636a
feat: Remove unused useId import from HeadersList component
musale Jan 15, 2025
1c80f69
Merge branch 'feat/fluent-v9-upgrade' into feat/ui-resize-v9
musale Jan 16, 2025
9ec53d3
fix: enhance request permissions tab (#3543)
musale Jan 16, 2025
49e4330
fix: improve the request body tab layout (#3540)
musale Jan 16, 2025
45ebdd3
fix: improve request auth tab (#3544)
musale Jan 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
"@azure/msal-browser": "3.26.1",
"@babel/core": "7.26.0",
"@babel/runtime": "7.26.0",
"@fluentui-contrib/react-resize-handle": "^0.6.1",
"@fluentui/react": "8.122.4",
"@fluentui/react-components": "9.56.8",
"@fluentui/react-icons": "2.0.270",
"@fluentui/react": "8.122.4",
"@fluentui/react-icons-mdl2": "1.3.80",
"@microsoft/applicationinsights-react-js": "17.3.4",
"@microsoft/applicationinsights-web": "3.3.4",
Expand Down Expand Up @@ -131,4 +132,4 @@
"reportFile": "test-report.xml",
"indent": 4
}
}
}
5 changes: 3 additions & 2 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,10 @@
}

body {
height: 100vh;
margin: 0;
padding: 0;
border: 0;
display: flex;
flex-direction: column;
}

@keyframes lds-ring {
Expand Down
11 changes: 11 additions & 0 deletions src/app/services/context/resize-context/ResizeContext.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { createContext } from 'react';

interface ResizeContext {
sidebarSize: number;
responseAreaSize: number;
dragValue: number;
parentHeight: number;
initiator: string;
}

export const ResizeContext = createContext<ResizeContext>({} as ResizeContext);
53 changes: 53 additions & 0 deletions src/app/services/context/resize-context/ResizeProvider.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import { ReactNode, useEffect, useMemo, useState } from 'react';
import { ResizeContext } from './ResizeContext';

interface ResizeProviderProps {
children: ReactNode;
}
export const ResizeProvider = (props: ResizeProviderProps) => {
const { children } = props;
const [sidebarSize, setSidebarSize] = useState(0);
const [responseSize, setResponseSize] = useState(0);
const [parentHeight, setParentHeight] = useState(0);
const [initiatorValue, setInitiatorValue] = useState('');
const [dragValue, setDragValue] = useState(-1);

useEffect(() => {
const handleResize = (e: Event) => {
const layout = document.getElementById('layout');
if (layout) {
const parentOffset = layout.parentElement?.offsetHeight ?? 0;
setParentHeight(parentOffset);
const customEvent = e as CustomEvent;
const { initiator, value } = customEvent.detail as {
initiator: string;
value: number;
};
if (initiator === 'responseSize') {
setResponseSize(value);
} else if (initiator === 'sidebar') {
setSidebarSize(value);
}
setInitiatorValue(initiator);
setDragValue(value);
}
};
window.addEventListener('onResizeDragEnd', handleResize);
return () => window.removeEventListener('resize', handleResize);
}, []);

const contextValue = useMemo(() => {
return {
sidebarSize,
responseAreaSize: responseSize,
parentHeight,
initiator: initiatorValue,
dragValue
};
}, [sidebarSize, responseSize, parentHeight, initiatorValue, dragValue]);
return (
<ResizeContext.Provider value={contextValue}>
{children}
</ResizeContext.Provider>
);
};
179 changes: 90 additions & 89 deletions src/app/views/App.styles.ts
Original file line number Diff line number Diff line change
@@ -1,93 +1,94 @@
import { FontSizes, ITheme } from '@fluentui/react';

export const appStyles = (theme: ITheme) => {
return {
app: {
background: theme.semanticColors.bodyBackground,
color: theme.semanticColors.bodyText,
paddingTop: theme.spacing.s1,
height: '100%',
paddingRight: '15px',
paddingLeft: '4px',
paddingBottom: '5px',
marginLeft: 'auto',
marginRight: 'auto'
},
appRow: {
display: 'flex',
flexWrap: 'no-wrap',
alignItems: 'stretch'
},
tryItMessage: {
marginBottom: theme.spacing.s1
},
sidebar: {
background: theme.palette.neutralLighter,
paddingRight: 10,
paddingLeft: 10,
marginRight: 10,
marginBottom: 9
},
sidebarMini: {
background: theme.palette.neutralLighter,
maxWidth: '65px',
minWidth: '55px',
padding: 10,
marginBottom: 9
},
layoutExtra: {
minWidth: '95%',
maxWidth: '96%'
},
separator: {
borderBottom: '1px solid ' + theme.palette.neutralLight
},
sidebarToggle: {
marginBottom: theme.spacing.s1,
marginTop: theme.spacing.s1
},
previewButton: {
marginTop: theme.spacing.s1
},
graphExplorerLabel: {
fontSize: FontSizes.xLarge,
fontWeight: 600
},
graphExplorerLabelContainer: {
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
width: 500
},
versionLabel: {
color: theme.palette.neutralSecondary,
fontSize: '10px',
paddingLeft: 3,
paddingTop: 5
},
statusAreaMobileScreen: {
marginTop: 5
},
statusAreaFullScreen: {
marginTop: 6,
position: 'relative',
bottom: 0
},
vResizeHandle: {
zIndex: 1,
borderRight: '1px solid silver',
'&:hover': {
borderRight: '3px solid silver'
}
},
feedbackButtonFullScreenDisplay: {
position: 'relative',
top: '5px'
},
feedbackButtonMobileDisplay: {
position: 'absolute',
top: '13px',
right: '10px'
}
};
// return {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we still need to keep this since most of it is commented out?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nah, we don't need it. All commented out code is to be removed. On it.

// app: {
// background: theme.semanticColors.bodyBackground,
// color: theme.semanticColors.bodyText,
// paddingTop: theme.spacing.s1,
// height: '100%',
// paddingRight: '15px',
// paddingLeft: '4px',
// paddingBottom: '5px',
// marginLeft: 'auto',
// marginRight: 'auto'
// },
// appRow: {
// display: 'flex',
// flexWrap: 'no-wrap',
// alignItems: 'stretch'
// },
// tryItMessage: {
// marginBottom: theme.spacing.s1
// },
// sidebar: {
// background: theme.palette.neutralLighter,
// paddingRight: 10,
// paddingLeft: 10,
// marginRight: 10,
// marginBottom: 9
// },
// sidebarMini: {
// background: theme.palette.neutralLighter,
// maxWidth: '65px',
// minWidth: '55px',
// padding: 10,
// marginBottom: 9
// },
// layoutExtra: {
// minWidth: '95%',
// maxWidth: '96%'
// },
// separator: {
// borderBottom: '1px solid ' + theme.palette.neutralLight
// },
// sidebarToggle: {
// marginBottom: theme.spacing.s1,
// marginTop: theme.spacing.s1
// },
// previewButton: {
// marginTop: theme.spacing.s1
// },
// graphExplorerLabel: {
// fontSize: FontSizes.xLarge,
// fontWeight: 600
// },
// graphExplorerLabelContainer: {
// display: 'flex',
// alignItems: 'center',
// justifyContent: 'space-between',
// width: 500
// },
// versionLabel: {
// color: theme.palette.neutralSecondary,
// fontSize: '10px',
// paddingLeft: 3,
// paddingTop: 5
// },
// statusAreaMobileScreen: {
// marginTop: 5
// },
// statusAreaFullScreen: {
// marginTop: 6,
// position: 'relative',
// bottom: 0
// },
// vResizeHandle: {
// zIndex: 1,
// borderRight: '1px solid silver',
// '&:hover': {
// borderRight: '3px solid silver'
// }
// },
// feedbackButtonFullScreenDisplay: {
// position: 'relative',
// top: '5px'
// },
// feedbackButtonMobileDisplay: {
// position: 'absolute',
// top: '13px',
// right: '10px'
// }
// };
return {}
};
Loading
Loading