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: Implemented Fresh Landing Page Structure with Separate Sections and Guidance. #145

Merged
merged 12 commits into from
Jul 22, 2023

Conversation

ArthurEmma2
Copy link
Contributor

This PR replaces the default route /new-deployment with a customizable landing page at /landing. The landing page's content is now driven by a metadata.

This PR solves #100

@ArthurEmma2
Copy link
Contributor Author

@jtary check this out

@anilmurty anilmurty requested a review from jtary July 17, 2023 20:59
@ArthurEmma2 ArthurEmma2 changed the title feat: added new landing page with separate sections and guidelines. Feat: Implemented Fresh Landing Page Structure with Separate Sections and Guidance. Jul 20, 2023
});
} catch (error: unknown) {
// TODO: Implement appropriate error handling
// Here we need to check it error.message is "Request rejected" which mean user clicked reject button
// or it could also happen that user didn't change anything and error is "Query failed with (6): rpc error: code..."
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did you remove these todos?

} = metadata.sdlGuideTiles;

return (
<div className="tile_card_top-wrapper" style={{ marginTop: '-50px' }}>
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be using the MUI components: (Box, Flex, etc.) instead of the native HTML components.

For the things like marginTop, use the props for Box (mt) instead of the style or sx props.

@@ -41,13 +45,14 @@ const ReDeploy: React.FC<any> = () => {
mxCreateDeployment({ sdl: values.sdl });
};

const handleSave = (sdl: SDLSpec) => {
mxCreateDeployment({ sdl }); // Trigger the deployment mutation
Copy link
Contributor

Choose a reason for hiding this comment

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

There should be some sort of start/ending effects here to indicate to the user something is happening.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you have any idea how I can implement this any example ?

Copy link
Contributor Author

@ArthurEmma2 ArthurEmma2 Jul 21, 2023

Choose a reason for hiding this comment

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

There should be some sort of start/ending effects here to indicate to the user something is happening.

const handleSave = (sdl: SDLSpec) => { mxCreateDeployment({ sdl }); setCardMessage('Saving SDL'); // Trigger the deployment mutation }

Copy link
Contributor

Choose a reason for hiding this comment

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

The general convention is to avoid using CSS files. For styling components, the order of preference is:

  1. Use the native MUI props inside the JSX for the component
  2. Use tailwind-css classes
  3. Using styled to add custom CSS in the component file

I know the repo is pretty inconsistent with this right now, but that is the direction we are moving towards.

Copy link
Contributor

@jtary jtary left a comment

Choose a reason for hiding this comment

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

For the new components for the landing page, please move the styling out of the CSS file and into the components themselves using the MUI native props. For handling the responsive styles, in MUI you can pass arrays of values to the props which represent different scales:

marginTop={[2, 4, 6]} -> this means the top margin will be size(2), size(4) or size(6) depending on the screen size based on the globally defined breakpoints.

@jtary jtary merged commit 179f7f2 into akash-network:main Jul 22, 2023
2 checks passed
github-actions bot pushed a commit that referenced this pull request Jul 22, 2023
… and Guidance. (#145)

* Feat: import SDL functionality on landing page added
* Feat: Review SDL button error fixed
* Feat: SDL guide lines section added
* Feat: medium screen errors fixed on sdl guideline section
* Feat: workded on responsiveness for each section
* Style: Tile and SDL guidelines cards  centered
* Feat: refactored code to make it readable
* Style: space added between "create deployment and review sdl button"
* Update App.tsx
* Feat: Converted the styles from vanilla css to Tailwind
* Update TileCard.tsx 0.1.293
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