-
Notifications
You must be signed in to change notification settings - Fork 106
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
base: features/ux
Are you sure you want to change the base?
Conversation
@flanakin, I forget to sync with latest from ux branch. There are conflicts that need to be resolved. |
Thanks, I forgot it. I'll commit it
β¦On Sun, 27 Oct 2024 at 23:25, Orthodoxos Kipouridis < ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In src/web/pages/App.tsx
<#1077 (comment)>
:
> @@ -1,27 +1,41 @@
-import './App.css';
+import { BrowserRouter as Router, Route, Routes } from 'react-router-dom';
+import HomePage from './HomePage';
+import FinOpsHubsPage from './FinOpsHubsPage';
+import FinOpsWorkbooksPage from './FinOpsWorkbooksPage';
+import GovernanceWorkbookPage from './GovernanceWorkbookPage';
+import AzureOptimizationEnginePage from './AzureOptimizationEnginePage';
+import PowerShellModulePage from './PowerShellModulePage';
+import BicepRegistryModulesPage from './BicepRegistryModulesPage';
+import OpenDataPage from './OpenDataPage';
+import {PowerBIReportsPage} from './PowerBIReportsPage';
+import CostOptimizationWorkbookPage from './CostOptimizationWorkbookPage';
+import {SamplePage} from './SamplePage';
+import FluentUIProvider from '../components/FluentUIProvider'; // Use your FluentUIProvider
Can it be that the FluentUIProvider in the components folder was not
committed? Its not in this path
β
Reply to this email directly, view it on GitHub
<#1077 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A6QJFYCJ4GI4KTGWUHUYJZTZ5VK3LAVCNFSM6AAAAABQWD2W6SVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDGOJXGYZTSNRUGE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
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.
Tested deployment locally
This reverts commit 4a62a9b. Using fluent icons24 and improve sidebar design
β¦ test is successful
@microsoft-github-policy-service[bot] @jamelachahbar already contributed before to code |
import { FluentProvider, webLightTheme } from '@fluentui/react-components'; | ||
|
||
interface Props { | ||
children: React.ReactNode; |
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.
Import ReactNode directly
import React from 'react'; | ||
import { FluentProvider, webLightTheme } from '@fluentui/react-components'; | ||
|
||
interface Props { |
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.
Add JSDOC
children: React.ReactNode; | ||
} | ||
|
||
function FluentUIProvider({ children }: Props) { |
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.
Lets use arrow functions for functional components
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.
Also, Add JSDOC
People24Filled, | ||
PanelLeftExpandRegular, | ||
PanelLeftContractRegular, | ||
} from "@fluentui/react-icons"; |
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.
Single quotes for TS code
PanelLeftContractRegular, | ||
} from "@fluentui/react-icons"; | ||
|
||
// Styles for the sidebar using Fluent UI's `makeStyles` |
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.
No need for this comment
} from "@fluentui/react-icons"; | ||
|
||
// Styles for the sidebar using Fluent UI's `makeStyles` | ||
const useStyles = makeStyles({ |
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.
Lets move styling to a separate CSS file, that way it will not have to be compiled.
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.
It will also be easier to write since we will have IntelliSense
// Styles for the sidebar using Fluent UI's `makeStyles` | ||
const useStyles = makeStyles({ | ||
sidebar: { | ||
minHeight: '100vh', |
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.
use dvh
const useStyles = makeStyles({ | ||
sidebar: { | ||
minHeight: '100vh', | ||
backgroundColor: '#f4f6f8', |
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.
How does this affect dark/light theme?
position: 'relative', | ||
transition: 'width 0.2s ease', | ||
paddingTop: '40px', | ||
paddingRight: '18px', |
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.
Can we use constants for these?
|
||
// Styles for the sidebar using Fluent UI's `makeStyles` | ||
const useStyles = makeStyles({ | ||
sidebar: { |
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.
Can we follow a naming for the classNames? that way they dont collide with Fluent's. Something like ftk-componentName-sidebar
@@ -0,0 +1,16 @@ | |||
import React from 'react'; |
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.
Do we really need this component? could we add this provider in a root component?
position: 'relative', | ||
transition: 'background-color 0.2s ease, color 0.2s ease', | ||
'&:hover': { | ||
backgroundColor: '#E6E6E6', // Updated neutral grey background on hover |
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.
Lets not add comments for CSS, most are self explanitory, also colors should be variables. Also lets think of theming early
|
||
const menuItems = [ | ||
{ name: 'Home', icon: <Home24Regular />, filledIcon: <Home24Filled />, route: '/' }, | ||
{ name: 'FinOps Hubs', icon: <DataUsage24Regular />, filledIcon: <DataUsage24Filled />, route: '/hubs' }, |
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.
Can we move the routes to an enum?
{ name: 'Contributors', icon: <People24Regular />, filledIcon: <People24Filled />, route: '/contributors' }, | ||
]; | ||
|
||
function SideBar() { |
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.
Arrow function and JSDOC
icon={isCollapsed ? <PanelLeftExpandRegular /> : <PanelLeftContractRegular />} | ||
className={classes.toggleButton} | ||
onClick={toggleSidebar} | ||
aria-label={isCollapsed ? 'Expand Sidebar' : 'Collapse Sidebar'} |
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.
Can we start early extracting all strings to a json file when we start thinking of our localization story?
@@ -0,0 +1,69 @@ | |||
import { Text, makeStyles, Image, Divider } from '@fluentui/react-components'; | |||
|
|||
const useStyles = makeStyles({ |
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.
Same comments as above
import OpenDataPage from './OpenDataPage'; | ||
import {PowerBIReportsPage} from './PowerBIReportsPage'; | ||
import CostOptimizationWorkbookPage from './CostOptimizationWorkbookPage'; | ||
import {SamplePage} from './SamplePage'; |
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.
{ SamplePage }
import {PowerBIReportsPage} from './PowerBIReportsPage'; | ||
import CostOptimizationWorkbookPage from './CostOptimizationWorkbookPage'; | ||
import {SamplePage} from './SamplePage'; | ||
import FluentUIProvider from '../components/FluentUIProvider'; // Use your FluentUIProvider |
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.
remove comment
|
||
/** |
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.
use JSDOC style for comments
function OptimizationEnginePage() { | ||
return ( | ||
<div> | ||
<h1>Azure Optimization Engine</h1> |
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.
Can we start extracting all strings to a json file so we can later be able to handle localization?
π οΈ Description
#1056
PR for turning figma design into implementation.
Top Menu Bar, Sidebar + Sample Page created.
Tests created
π· Screenshots
Jest test results
π Checklist
π¬ How did you test this change?
πββοΈ Do any of the following that apply?
π Did you update
docs/changelog.md
?π Did you update documentation?