-
Notifications
You must be signed in to change notification settings - Fork 69
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
Issue855. Make Main Landing Page Responsive and Add Hamburger Menu for Mobile View . #949
base: dev
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for dapper-ganache-45a60b ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@@ -1,27 +1,6 @@ | |||
{"k":"0000000080","o":"0000002870","v":"001"} |
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.
Why are large deletions in pre existing themes?
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.
@AradhyaDixit18 I'm guessing that you probably committed all changed files in the repo and didn't mean to commit this file? The code/src/data/themes file should only be committed if we are changing one of the default design systems that we ship with the project. Which doesn't seem to be the case with this PR.
|
||
|
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 you review these extra lines. Just good code-quality
// Utility function to determine the text color based on the brightness of the background color | ||
const getTextColor = (hex: string): string => { | ||
hex = hex.replace('#', ''); | ||
const r = parseInt(hex.substring(0, 2), 16); |
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'm not so sure but hex to substring is really slow and inefficient. The mathematical conversions applied are available via package. Also, the rounding up will make the maths inaccurate by 1-2
numbers (although I don't think it make have any effect). Have you tried the color
package?
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've tried . It works good
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.
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, please make sure that PRs that you make are against finos:dev, not finos:main. All changes go into the dev branch first. Thanks!
@@ -1,8 +1,8 @@ | |||
/* | |||
/* |
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.
not sure why this space, but it makes license comment not line up. Please correct.
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.
fixed it sir
* Copyright (c) 2023 Discover Financial Services | ||
* Licensed under Apache-2.0 License. See License.txt in the project root for license information | ||
*/ | ||
import React, { useEffect, useState } 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.
Not sure why the copyright header is being removed. If we need to address changing the copyright headers, we should do that under a separate issue.
// Utility function to determine the text color based on the brightness of the background color | ||
const getTextColor = (hex: string): string => { | ||
hex = hex.replace('#', ''); | ||
const r = parseInt(hex.substring(0, 2), 16); |
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.
</ExampleSection> | ||
</div> | ||
); | ||
}; |
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'm seeing a lot of changes here but not sure why. Are these all spacing changes? It is really hard to tell what has been changed on purpose and what is just spacing. Please make sure that the only changes showing here are changes that you intentionally made to fix the root issue or changes that you specifically mention in the PR. I don't think the changes here apply to either scenario.
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'm not sure why this was resolved, I still see changes here that are largely spacing related. It is difficult to tell what is specific to implementing new code for this PR and what isn't.
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, please make sure that PRs that you make are against finos:dev, not finos:main. All changes go into the dev branch first. Thanks!
✅ Deploy Preview for glistening-gecko-6b417a ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
@aaronreed708 fixed all the required changes please have a look at this
@@ -1,8 +1,8 @@ | |||
/* | |||
/* |
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.
fixed it sir
@@ -105,7 +105,7 @@ const DesignSystemPage: React.FC<Props> = ({user, storage, themeName, setThemeNa | |||
|
|||
// listen for changes in selected accessibility layers so that appropriate | |||
// styles can be set | |||
const layerChangeListener = function (event: EventValueChange<Boolean>) { | |||
const layerChangeListener = function (event: EventValueChange<Boolean>) { |
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.
Why is this space added? Now beginning of line and ending bracket won't line up.
window.addEventListener("resize", handleResize); | ||
return () => window.removeEventListener("resize", handleResize); | ||
}, []); | ||
|
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.
why this second setting of a resize even handler? Why wouldn't you put both pieces of logic in the same event listener if both pieces of logic need to happen on each resize?
@@ -75,7 +75,7 @@ export const DesignSystemTitleBar: React.FC<Props> = ({ designSystemNames, desig | |||
|
|||
return ( | |||
<> | |||
<div className="titleBarDiv" data-background="colored"> | |||
<div className="titleBarDiv " data-background="colored"> | |||
<div className="left-titlebar"> |
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.
why was this space added?
</ExampleSection> | ||
</div> | ||
); | ||
}; |
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'm not sure why this was resolved, I still see changes here that are largely spacing related. It is difficult to tell what is specific to implementing new code for this PR and what isn't.
@AradhyaDixit18 . What @aaronreed708 is requesting is for you to apply prettier formatting once so that there isn't much confusion while reading the code. Sudden Spaces and jumps make the code look a bit confusing due to code quality issues :) |
This pull request enhances the responsiveness of the main landing page by introducing a hamburger menu for mobile devices. The following changes have been implemented:
Added Hamburger Menu:
Introduced a hamburger menu icon that appears on screens with a width of 768px or less.
The hamburger menu provides easy navigation on mobile devices by collapsing the side navigation into a drawer.
CSS Media Queries:
Utilized CSS media queries to ensure the hamburger menu icon is only displayed on mobile devices.
Adjusted styles for various elements to improve their layout and presentation on smaller screens.
Conditional Rendering in React:
Updated the React component to conditionally render the hamburger menu based on the screen size.
Added state management to handle the opening and closing of the hamburger menu drawer.
Styling Adjustments:
Ensured that the header remains sticky and spans the full width of the page.
Centered the main content on the page and provided adequate padding for a better user experience on all devices.
Now it looks like this :