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

Component fixing #12

Closed
wants to merge 6 commits into from
Closed

Component fixing #12

wants to merge 6 commits into from

Conversation

ScreenTechnicals
Copy link
Member

Description and Related Issue(s)

Blank Rasa Card component size fixed in the transaction page along with some gaping added b/w the graph and the blank rasa cared component in the home page.

Checklist for PR author

  • I have tested these changes locally.
  • I added tests to cover any new functionality, following this guide
  • Whenever I fix a bug, I include a regression test to ensure that the bug does not reappear silently.
  • If I have added, changed, renamed, or removed an environment variable, I have updated the list of environment variables in the documentation and made the necessary changes to the validator script according to the guide

Copy link

vercel bot commented Feb 5, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
blockscout-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 5, 2024 11:07am
blockscout-frontend-testnet ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 5, 2024 11:07am

@meness meness changed the base branch from main to canto-v1.10.0 February 5, 2024 11:52
@meness meness self-assigned this Feb 5, 2024
@meness meness self-requested a review February 5, 2024 11:52
Copy link
Collaborator

@meness meness left a comment

Choose a reason for hiding this comment

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

@ScreenTechnicals I reviewed the first component you created, but all reviews apply to the second one too.

@@ -0,0 +1,26 @@
/* eslint-disable max-len */
Copy link
Collaborator

Choose a reason for hiding this comment

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

@ScreenTechnicals Don't disable ESLint rules

import React from 'react';

const BlankRasa1 = () => {
const { colorMode } = useColorMode();
Copy link
Collaborator

Choose a reason for hiding this comment

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

@ScreenTechnicals Use useColorModeValue('light-color', 'dark-color'); to handle colors between light/dark theme

const { colorMode } = useColorMode();

return (
<div className={ colorMode === 'light' ? 'w-full md:w-[40%] bg-white shadow-md rounded-xl p-5 mt-7 shadow-[#eeeeee] border border-[#fcfcfc] text-black' : 'w-full md:w-[40%] bg-[#171717] shadow-lg rounded-xl p-5 mt-7 shadow-[#0e2119] border border-none text-white' }>
Copy link
Collaborator

Choose a reason for hiding this comment

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

@ScreenTechnicals You should use the same tech stack. In this case, @chakra-ui/react provides Box, Text, and Link components. Could you make sure you use the right one? This project uses @chakra-ui/react instead of Tailwind.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@ScreenTechnicals Use the props @chakra-ui/react provides instead of className and `styles props unless they're needed

Copy link
Collaborator

Choose a reason for hiding this comment

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

@ScreenTechnicals Follow the same project structure. Move the components into the /ui/[dir] directory based on what it does.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@ScreenTechnicals Use a better name for the components based on what they do

@@ -4,7 +4,7 @@
"private": false,
"homepage": "https://github.com/blockscout/frontend#readme",
"engines": {
"node": "18",
"node": ">=18",
Copy link
Collaborator

Choose a reason for hiding this comment

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

@ScreenTechnicals Don't change project's configurations

Copy link
Collaborator

Choose a reason for hiding this comment

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

@ScreenTechnicals Use a better name for this file based on what it is.

Comment on lines +44 to +49
<div className="md:flex w-full gap-8">
<div className="w-full">
<ChainIndicators/>
</div>
<BlankRasa1/>
</div>
Copy link
Collaborator

Choose a reason for hiding this comment

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

@ScreenTechnicals Use the components ChakraUI provides (Flex or Grid based on your needs) here

@@ -84,7 +84,7 @@ const Transactions = () => {
const pagination = router.query.tab === 'watchlist' ? txsWatchlistQuery.pagination : txsQuery.pagination;

return (
<>
<div>
Copy link
Collaborator

Choose a reason for hiding this comment

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

@ScreenTechnicals Why did you wrap this page?

maxW={{ base: 'calc(100vw - 32px)', lg: '500px' }}
closeOnScroll={ isMobile ? true : false }
isDisabled={ !isTextTruncated }
<div className="p-0 m-0">
Copy link
Collaborator

Choose a reason for hiding this comment

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

@ScreenTechnicals Use ChakraUI components here

Comment on lines +10 to +14
<div className="bg-">
<Box pt={{ base: 0, lg: '20px' }} as="main">
{ children }
</Box>
</div>
Copy link
Collaborator

Choose a reason for hiding this comment

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

@ScreenTechnicals bg- doesn't work. Anyway, why did you wrap this component?

@meness meness closed this Feb 6, 2024
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.

2 participants