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

footer refactor #2

Merged
merged 2 commits into from
Nov 15, 2023
Merged

footer refactor #2

merged 2 commits into from
Nov 15, 2023

Conversation

Pilu84
Copy link
Contributor

@Pilu84 Pilu84 commented Nov 10, 2023

No description provided.

Copy link
Contributor

@laszlocph laszlocph left a comment

Choose a reason for hiding this comment

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

tldr: Really appreciate your proposal. If you make some changes I will be glad to merge it.


There are some issues in the change, I believe you choose a defensive style to introduce your changes, but it makes it impossible to merge the change as is.

I really appreciate the React considerations, some techniques I never used and it is good to see how others do stuff. I will learn about those techniques thanks to you.

The project does not have a linter today, I think some things in this PR (4 spaces) should have been caught by the linter. If you want to add a linter in a separate PR, that would be super valuable.

web/src/App.js Outdated
@@ -6,6 +6,7 @@ import { rootReducer } from './redux';
import Footer from "./Footer";
import Service from "./Service";
import FilterBar from "./FilterBar";
import { Footer2 } from "./Footer2";
Copy link
Contributor

Choose a reason for hiding this comment

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

Call it Footer. We either merge your PR or not. This defensive approach just makes the change messy.

web/src/App.js Outdated
@@ -18,57 +19,58 @@ function App() {

return (
<>
<APIBackend capacitorClient={capacitorClient} store={store}/>
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems like a format change. The things inside <> are moved one to the right.

Please remove this so the PR clearly shows what the material changes inside.

You can file a formatting PR separately.

return (
<div aria-labelledby="slide-over-title" role="dialog" aria-modal="true" className={`fixed inset-x-0 bottom-0 bg-neutral-200 border-t border-neutral-300 ${expanded ? 'h-2/5' : 'h-16'}`}>
<div className={`flex justify-between w-full ${expanded ? '' : 'h-full'}`}>
<div className='h-auto w-full cursor-pointer'
Copy link
Contributor

Choose a reason for hiding this comment

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

You use 4 spaces, the codebase uses 2 I think. Please adjust the PR.
(Also if you stick to the Footer component it is easier to follow the changes.)




export const SideBar = memo(function SideBar(props) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Good idea to move the Sidebar into its own file. But please remove the original Sidebar as well in this change.

@@ -0,0 +1,39 @@
import React, { memo } 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.

Too many new lines.

</ul>
</nav>
);
});
Copy link
Contributor

Choose a reason for hiding this comment

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

Add a new line at the end of each file.

@laszlocph
Copy link
Contributor

This is top notch!

Thank you for your contribution!

@laszlocph laszlocph merged commit e486bdb into gimlet-io:main Nov 15, 2023
1 check passed
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