Skip to content
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

feat/217-drep-directory-on-drawer #294

Closed

Conversation

jdyczka
Copy link
Contributor

@jdyczka jdyczka commented Feb 26, 2024

List of changes

  • add DRep directory page
  • add DRep directory link to dashboard drawer.

Checklist

  • related issue
  • My changes generate no new warnings
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the changelog
  • I have added tests that prove my fix is effective or that my feature works

@jdyczka jdyczka marked this pull request as draft February 26, 2024 09:13
@jdyczka jdyczka force-pushed the feat/217-drep-directory-on-drawer branch from 7ae6457 to 2642c22 Compare February 26, 2024 11:50
@jdyczka jdyczka marked this pull request as ready for review February 26, 2024 11:59
@MSzalowski
Copy link
Contributor

Please follow the PR template 💪

imageSRC?: string;
imageWidth?: number;
imageHeight?: number;
title: string;
isDrawer?: boolean;
sx?: BoxProps["sx"];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

material UI has SxProps

pb={3}
display="flex"
flexDirection="column"
height={"100%"}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you delete {} if unnecessary

@@ -0,0 +1,161 @@
import { useEffect, useRef, useState } from "react";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NewTopNav is unified top nav ?, if yes, can we replace everywhere ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, I wanted both TopNav and DashboardTopNav to be sticky, so that we don't have to add top margin/padding equal to navbar height to content. A the same time I didn't want to make changes to all pages at the moment in order not to introduce regressions, so I only used it on the newly created pages. But the consequence is that the scroll is not on window any more, but on the parent div, so adding bg color and filter to NavBar stopped working. NewTopNav is mainly copied from TopNav but adjusted for being sticky

I should have added a comment explaining this

import { NewTopNav } from "./NewTopNav";
import { theme } from "@/theme";

export type DashboardLayoutProps = PropsWithChildren
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is good idea to make that combo in this props ? :D

Copy link
Contributor

@MSzalowski MSzalowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please:

  1. Apply this change into CHANGELOG.md.
  2. Follow the PR template

💪

/>
<img src={ICONS.appLogoIcon} height={25} />
<IconButton
data-testid={"close-drawer-button"}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Every string prop should be passed without curly braces

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need an eslint rule for that. Or even better add eslint-plugin-react

<Link
{...navItem}
isConnectWallet={isConnectButton}
onClick={() => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not pass conditional executions inside arrow function. Let's keep render tree clean 💪

@MSzalowski MSzalowski marked this pull request as draft February 29, 2024 07:11
@MSzalowski MSzalowski force-pushed the feat/217-drep-directory-on-drawer branch from 2642c22 to db03b82 Compare March 1, 2024 09:51
@MSzalowski MSzalowski changed the base branch from feat/99-drep-directory to feat/m23-drep-explorer-displays-dreps March 1, 2024 09:55
@MSzalowski MSzalowski changed the title #217 add DRepDirectory page and nav items [#217] add DRep directory page and nav items to dashboard Mar 1, 2024
@MSzalowski MSzalowski force-pushed the feat/217-drep-directory-on-drawer branch from a4082ad to 5acb86d Compare March 1, 2024 10:56
@MSzalowski MSzalowski changed the base branch from feat/m23-drep-explorer-displays-dreps to feat/99-drep-directory March 1, 2024 10:57
@jdyczka jdyczka changed the title [#217] add DRep directory page and nav items to dashboard feat/217-drep-directory-on-drawer Mar 6, 2024
@jdyczka jdyczka closed this Mar 6, 2024
@jdyczka jdyczka deleted the feat/217-drep-directory-on-drawer branch March 6, 2024 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants