-
Notifications
You must be signed in to change notification settings - Fork 103
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
jamelachahbar
wants to merge
22
commits into
features/ux
Choose a base branch
from
jachahbar/ux
base: features/ux
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+11,267
β1,655
Open
PR for [UX] Migrate existing markdown content to TSX pages #1056 Turn UX Design to Implementation #1077
Changes from 10 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
406c63d
added scaffolding for homepage and tools + test for homepage
jamelachahbar 85730ba
[UX] Adapted name of LandingPage + improved Testing of HomePage - UX β¦
jamelachahbar de8b722
removed unnecessary imports
jamelachahbar b840c97
add page
jamelachahbar 9d44c77
adapt code to have the same style as the other pages
jamelachahbar 9dac236
Merge branch 'jachahbar/ux' of https://github.com/microsoft/finops-toβ¦
jamelachahbar dae2910
convert all pages and App.tsx to use a regular function component insβ¦
jamelachahbar 5056164
changed order of pages and linknames
jamelachahbar e6f83fd
removed trailing comma
jamelachahbar 9ee7490
Topmenubar, sidebar and samplepage rendered based on ux design + testβ¦
jamelachahbar e3dc28b
fluent provider added
jamelachahbar eb5038f
Updated test to work with samplepage and included test for finopshubsβ¦
jamelachahbar d1c001c
Add SideBar component
jamelachahbar 39ce5cb
Adapted casing of SideBar
jamelachahbar bd7e200
refactored to only use fluent v2
jamelachahbar 583e573
removed react icons package
jamelachahbar b5a9719
removed spaces
jamelachahbar 4a62a9b
ui enhancements using fluentui components and makeStyles
jamelachahbar 7aa0478
improve sidebar ui
jamelachahbar d0bd651
Revert "ui enhancements using fluentui components and makeStyles"
jamelachahbar 91beff6
removed fluentui provider as it is already present in App.tsx
jamelachahbar 93b5b3d
updated test suite and added aria label to button component to ensureβ¦
jamelachahbar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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` | ||
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)'], | ||
}; | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like putting CSS in TSX is an antipattern. What do others think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what I started with when converting to CSS. These are styled components. I will convert to fluent ui if we get the same look and feel as a result. Then, we need to check if we can create global styles for components and call them out. I'm more than happy to change this and get input from others
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fluent uses Griffel and the makestyles is something I am using now for the finops home page. It is not here in this first pr, but we can have a working session to go through this and then I can adapt accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New commit contains only fluent v2 with makeStyles