-
Notifications
You must be signed in to change notification settings - Fork 0
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
Leo/feature/103 update main page to have an intro component #138
Merged
leolabdev
merged 16 commits into
dev
from
leo/feature/103-update-main-page-to-have-an-intro-component
Oct 4, 2024
Merged
Leo/feature/103 update main page to have an intro component #138
leolabdev
merged 16 commits into
dev
from
leo/feature/103-update-main-page-to-have-an-intro-component
Oct 4, 2024
Conversation
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
Introduced an Intro component to the homepage, including a button for smooth scrolling to the main content. Implemented logic to hide the scrollbar while in the intro section and added styles for a seamless user experience.
Reorganized scroll handling logic by separating concerns into distinct functions. Introduced a `scrollToIntro` function to improve readability and maintainability, and encapsulated scroll direction detection within this function. This change aims to make the code more modular and easier to understand.
Updated multiple layout files to remove the 'overlaid' prop from Navbar components for consistency and simpler styling. Changed 'fixed' position to 'sticky' in NavbarDesktopV2 styles for better scrolling behavior.
Removed the `overlayed` class and the `overlaid` prop from `NavbarDesktopV2` component. Changed the position of the `navbar` to `relative` and cleaned up unnecessary comments. This improves code readability and ensures the component uses only necessary styles and props.
Comment out the overlaid class handling and change the fixed positioning to sticky. Additionally, update responsive styles for better alignment and ensure consistent imports on the TypeScript side.
This commit removes an obsolete commented-out `position: absolute;` from the NavbarMobileV2 SCSS file. Cleaning up commented-out code helps to maintain a more readable and maintainable codebase.
Renamed `hideScrollbar` to `isScrollbarHidden` for clarity and consistency. Removed commented-out CSS rules and unused JSX code to clean up the layout component.
Moved scroll-related logic from `HomeLayout` component to a dedicated custom hook `useScrollHandler`. This enhances code modularity and readability, making the component less cluttered and easier to maintain.
Refactored scroll function to handle both upward and downward scrolling more intuitively. Removed old code and replaced it with a more unified approach that smooth scrolls to relevant content based on scroll direction. This ensures a smoother user experience in navigating between intro and main content sections.
Refactor the code to add functions that disable and enable user interaction during scroll animations, ensuring smoother transitions. This prevents the user from interacting with the page while the scroll operation is in progress.
Moved Intro component and related files to a new "_intro" directory for better organization. This change involved updating import paths and renaming associated stylesheet files, ensuring the application structure is cleaner and more maintainable.
Refactor the Intro component to use a Props type for defining prop types, improving the readability and maintainability of the code. Additionally, set the displayName for easier debugging in development tools.
Consolidate styles into Intro.module.scss and replace inline styles. Migrate default button to a styled Button component with a Graffiti theme, simplifying the Intro.tsx code.
Refactored the useScrollHandler function and its import statements to adhere to a new naming convention, adding an underscore prefix. This change ensures consistency across the codebase and aids in better organization.
This change refactors the `Intro` component to use `forwardRef` for better handling of references. The classNames utility is also removed from the home layout file. The code is now more concise and easier to read.
The 'overlaid' prop has been eliminated from multiple Navbar components, including NavbarDesktopV2, NavbarMainOld, and NavbarMain. This simplifies the component interfaces and removes unnecessary prop handling and related logic.
MikhailDeriabin
approved these changes
Oct 4, 2024
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.
Looks great
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
add a template for the intro functional, requires to be update when figma will be done