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

PR for [UX] Migrate existing markdown content to TSX pages #1056 Turn UX Design to Implementation #1077

Open
wants to merge 24 commits into
base: features/ux
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
406c63d
added scaffolding for homepage and tools + test for homepage
jamelachahbar Oct 13, 2024
85730ba
[UX] Adapted name of LandingPage + improved Testing of HomePage - UX …
jamelachahbar Oct 13, 2024
de8b722
removed unnecessary imports
jamelachahbar Oct 13, 2024
b840c97
add page
jamelachahbar Oct 13, 2024
9d44c77
adapt code to have the same style as the other pages
jamelachahbar Oct 13, 2024
9dac236
Merge branch 'jachahbar/ux' of https://github.com/microsoft/finops-to…
jamelachahbar Oct 13, 2024
dae2910
convert all pages and App.tsx to use a regular function component ins…
jamelachahbar Oct 14, 2024
5056164
changed order of pages and linknames
jamelachahbar Oct 19, 2024
e6f83fd
removed trailing comma
jamelachahbar Oct 19, 2024
9ee7490
Topmenubar, sidebar and samplepage rendered based on ux design + test…
jamelachahbar Oct 27, 2024
e3dc28b
fluent provider added
jamelachahbar Oct 27, 2024
eb5038f
Updated test to work with samplepage and included test for finopshubs…
jamelachahbar Oct 28, 2024
d1c001c
Add SideBar component
jamelachahbar Oct 28, 2024
39ce5cb
Adapted casing of SideBar
jamelachahbar Oct 28, 2024
bd7e200
refactored to only use fluent v2
jamelachahbar Oct 30, 2024
583e573
removed react icons package
jamelachahbar Oct 30, 2024
b5a9719
removed spaces
jamelachahbar Oct 30, 2024
4a62a9b
ui enhancements using fluentui components and makeStyles
jamelachahbar Nov 1, 2024
7aa0478
improve sidebar ui
jamelachahbar Nov 1, 2024
d0bd651
Revert "ui enhancements using fluentui components and makeStyles"
jamelachahbar Nov 1, 2024
91beff6
removed fluentui provider as it is already present in App.tsx
jamelachahbar Nov 1, 2024
93b5b3d
updated test suite and added aria label to button component to ensure…
jamelachahbar Nov 1, 2024
895323a
resolving conflict
jamelachahbar Nov 6, 2024
91a49cb
removing additional styling and top and sidebarmenu
jamelachahbar Nov 6, 2024
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
78 changes: 78 additions & 0 deletions src/web/components/TopMenuBar.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
import { Text } from '@fluentui/react-components';
import styled from 'styled-components';

function TopMenuBar() {


// Return the top menu bar with the FinOps toolkit logo

return (
<FullWidthContainer>
<StyledCommandBar>
<LogoTextContainer>
<Logo src="logo-windows.png" alt="Microsoft Logo" />
<TextContainer>
<Text size={300} weight="medium">FinOps toolkit</Text>
</TextContainer>
</LogoTextContainer>

</StyledCommandBar>
</FullWidthContainer>
);
}


// Styled components for layout and customization
const StyledCommandBar = styled.div`
jamelachahbar marked this conversation as resolved.
Show resolved Hide resolved
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
background-color: #f4f6f8;
overflow-x: hidden;

/* Media Query for responsiveness */
@media (max-width: 768px) {
flex-direction: column;
align-items: center; /* Center align all items */
}
`;

const LogoTextContainer = styled.div`
display: flex;
align-items: center;
margin: 8px;

@media (max-width: 768px) {
display: flex;
flex-direction: row;
align-items: center;

margin: 8px;
}
`;

const Logo = styled.img`
width: 24px;
height: 24px;
margin-right: 8px;
`;

const TextContainer = styled.div`
font-size: 12px;
color: #333;

@media (max-width: 768px) {
text-align: center;
}
`;

// Ensure the top menu bar takes the full viewport width
const FullWidthContainer = styled.div`
width: 100vw;
margin: 0;
padding: 0;
height: 40px;
`;

export default TopMenuBar;
10 changes: 10 additions & 0 deletions src/web/jest.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = {
setupFilesAfterEnv: ['<rootDir>/setupTests.ts'],
testEnvironment: 'jest-environment-jsdom', // Correct the environment here
moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx'],
transform: {
'^.+\\.tsx?$': 'ts-jest',
},
testMatch: ['**/__tests__/**/*.test.ts?(x)'],
};

Loading