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

Improve[UI]: Responsive footer, overlapping of footer and div in contribute page and buttons spacing on collection page for better UI #597

Closed
wants to merge 15 commits into from

Conversation

trishnakalita660
Copy link

Problem

Improve[UI]: Responsive footer, fixed overlapping of footer and div in contribute page and added left margin to buttons on collection page for better UI
WhatsApp Image 2021-04-05 at 8 11 54 PM
WhatsApp Image 2021-04-06 at 2 04 05 PM

Solution

Fixed the size and bootstrap col configurations in the footer and Added margins for the buttons on collection page.
WhatsApp Image 2021-04-06 at 2 05 01 PM

Areas of Impact

-> bookbrainz-site\src\client\components\pages\collection.js
-> bookbrainz-site\src\client\components\footer.js
-> bookbrainz-site\src\client\components\pages\contribute.js

@welcome
Copy link

welcome bot commented Apr 6, 2021

Thanks for opening your first pull request for BookBrainz, and welcome to our community! 🎉

If you haven't yet, please check out our contributing guidelines.

Someone will be reviewing your PR soon; just hang in there !
In the meantime, if you're wondering what to do next, you can have a look at our issue tracker

@trishnakalita660 trishnakalita660 changed the title Trishna Improve[UI]: Responsive footer, fixed overlapping of footer and div in contribute page and buttons spacing on collection page for better UI Apr 6, 2021
@trishnakalita660 trishnakalita660 changed the title Improve[UI]: Responsive footer, fixed overlapping of footer and div in contribute page and buttons spacing on collection page for better UI Improve[UI]: Responsive footer, overlapping of footer and div in contribute page and buttons spacing on collection page for better UI Apr 6, 2021
@coveralls
Copy link

coveralls commented Apr 6, 2021

Coverage Status

Coverage decreased (-0.04%) to 60.9% when pulling 0b3dddb on trishnakalita660:trishna into c908c21 on bookbrainz:master.

Copy link
Contributor

@MonkeyDo MonkeyDo left a comment

Choose a reason for hiding this comment

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

Thanks for opening a pull request @trishnakalita660 !

I've made some suggestions below, mainly to use existing CSS classes for margins instead of the style attribute.
This allows for a bit more control in CSS, since the rules applied in an element's style take precedence over the css defined in stylesheets:
From https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity:

Inline styles added to an element (e.g., style="font-weight: bold;") always overwrite any styles in external stylesheets, and thus can be thought of as having the highest specificity.

There are also a couple of files which shouldn't have been commited: latest.sql and package-lock.json

@@ -34,7 +34,7 @@ function ContributePage() {
'en/latest/style/introduction/';

return (
<div>
<div styles={{marginBottom: '1rem'}}>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<div styles={{marginBottom: '1rem'}}>
<div className="margin-bottom-1">

@@ -311,6 +317,7 @@ class CollectionPage extends React.Component {
bsSize="small"
bsStyle="danger"
className="margin-bottom-d5"
style={{marginBottom: '1rem', marginRight: '0.5rem'}}
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's remove the inline styles and change the className="margin-bottom-d5" above to `className="margin-bottom-1 margin-right-d5"

src/client/components/pages/collection.js Show resolved Hide resolved
src/client/components/pages/collection.js Show resolved Hide resolved
{
this.props.isCollaborator || this.props.isOwner ?
<Button
bsSize="small"
bsStyle="success"
className="margin-bottom-d5"
style={{marginRight: '0.5rem'}}
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's remove this and add margin-right-d5 to the className above

Comment on lines 268 to 269
className="margin-top-1 text-left"
style={{marginBottom: '1rem'}}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
className="margin-top-1 text-left"
style={{marginBottom: '1rem'}}
className="margin-top-1 margin-bottom-1 text-left"

src/client/components/footer.js Show resolved Hide resolved
.gitignore Outdated Show resolved Hide resolved
.gitignore Outdated Show resolved Hide resolved
Copy link
Contributor

@MonkeyDo MonkeyDo left a comment

Choose a reason for hiding this comment

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

Sorry it took a while to get to reviewing again!
We're nearly there, I've got a couple more suggestions, and we need to remove the changes to .gitignore and package-lock.json that don't need to be in there.

You can run this command in a terminal, from the bookbrainz-site directory:
git checkout origin/master -- .gitignore package-lock.json
What that does is revert these two files to the content of the master branch.

You can then commit the changes to these two files, and that should do it to remove them from the PR.
Let me know if you run into issues or need some help!

href={`/collection/${this.props.collection.id}/edit`}
style={{marginRight: '0.5rem'}}
Copy link
Contributor

Choose a reason for hiding this comment

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

The style can be removed, since we're using the class margin-right-d5 instead.

disabled={!this.state.selectedEntities.length}
style={{marginRight: '0.5rem'}}
Copy link
Contributor

Choose a reason for hiding this comment

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

The style can be removed, since we're using the class margin-right-d5 instead.

@@ -283,8 +284,9 @@ class CollectionPage extends React.Component {
<Button
bsSize="small"
bsStyle="danger"
className="margin-bottom-d5"
className="margin-right-d5"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
className="margin-right-d5"
className="margin-bottom-d5 margin-right-d5"

@@ -298,8 +300,9 @@ class CollectionPage extends React.Component {
<Button
bsSize="small"
bsStyle="warning"
className="margin-bottom-d5"
className="margin-right-d5"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
className="margin-right-d5"
className="margin-bottom-d5 margin-right-d5"

@MonkeyDo
Copy link
Contributor

Closed in favor of #739, as we are harmonizing the footers between all MetaBrainz projects

@MonkeyDo MonkeyDo closed this Feb 17, 2022
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.

5 participants