forked from smartcontractkit/documentation
-
Notifications
You must be signed in to change notification settings - Fork 0
Update lane side panel #174
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
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
a5bf88a
update the panel width
markshenouda 35a2338
change the colors of the headers and heros to the new color
markshenouda ac3771e
fix layout on lane panel hero
markshenouda cb9300f
update the lane details hero with the correct items
markshenouda ffa0c32
update lane table header
markshenouda 0e7423e
add unavailable and tooltip instead of N/A in lane table
markshenouda 1d73874
add support for wide drawer layout in CCIP components
markshenouda ed98094
update lane drawer to display 'TBC' for unavailable FTF rate limit data
markshenouda c13f1f1
remove unnecessary blank line in LaneDetailsHero component
markshenouda 795ac5f
conditionally render DetailItem components for onRamp, offRamp, sourc…
markshenouda 5080efb
refactor: adjust padding for table header and cells in CCIP table
markshenouda 2ec04de
fix: reduce endLength for onRamp and offRamp addresses in LaneDetails…
markshenouda 0993c33
fix: adjust flex direction for lane details in LaneDetailsHero component
markshenouda 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 hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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 |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| import { useStore } from "@nanostores/react" | ||
| import "./Drawer.css" | ||
| import { drawerContentStore } from "./drawerStore.ts" | ||
| import { drawerContentStore, drawerWidthStore, DrawerWidth } from "./drawerStore.ts" | ||
| import { useRef, useEffect, useState } from "react" | ||
| import { clsx } from "~/lib/clsx/clsx.ts" | ||
| import type { ReactNode } from "react" | ||
|
|
@@ -9,6 +9,7 @@ function Drawer() { | |
| const drawerRef = useRef<HTMLDivElement>(null) | ||
| const drawerContentRef = useRef<HTMLDivElement>(null) | ||
| const $drawerContent = useStore(drawerContentStore) as (() => ReactNode) | ReactNode | null | ||
| const $drawerWidth = useStore(drawerWidthStore) | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. because we have now 2 widths for the drawers |
||
| const [isOpened, setIsOpened] = useState(false) | ||
|
|
||
| // exit when press esc | ||
|
|
@@ -47,6 +48,7 @@ function Drawer() { | |
| // Use transitionend event instead of setTimeout for better performance | ||
| const handleTransitionEnd = () => { | ||
| drawerContentStore.set(null) | ||
| drawerWidthStore.set(DrawerWidth.Default) | ||
| drawerRef.current?.removeEventListener("transitionend", handleTransitionEnd) | ||
| } | ||
|
|
||
|
|
@@ -62,7 +64,12 @@ function Drawer() { | |
| ref={drawerRef} | ||
| onClick={handleClickOutside} | ||
| > | ||
| <div className="drawer__container" ref={drawerContentRef}> | ||
| <div | ||
| className={clsx("drawer__container", { | ||
| "drawer__container--wide": $drawerWidth === DrawerWidth.Wide, | ||
| })} | ||
| ref={drawerContentRef} | ||
| > | ||
| <div className="drawer__close"> | ||
| <button id="drawer-exit" onClick={handleClose} aria-label="Close drawer"> | ||
| <svg width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||
|
|
||
Oops, something went wrong.
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.
Color from Figma