Skip to content

Conversation

tsl143
Copy link
Contributor

@tsl143 tsl143 commented May 26, 2017

margin: 0;
padding: 0;
text-decoration: none;
width: calc(100% - 40px);
Copy link
Contributor

Choose a reason for hiding this comment

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

To aid us in the future can you add comments for what the calc is based on in both cases?

Copy link
Contributor Author

@tsl143 tsl143 May 31, 2017

Choose a reason for hiding this comment

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

For addon listing
Calc(100% - 40px) - 38 px is fixed width .SearchResult-icon hence (100%-40px) for .SearchResult-heading

For theme listing
Calc(100% - 85px) - 85 px is fixed width .SearchResult-rating hence (100%-85px) for .SearchResult-heading

Copy link
Contributor

Choose a reason for hiding this comment

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

@tsl143 thanks, could you add those details to the CSS as comments please.

@muffinresearch
Copy link
Contributor

@tsl143 thanks for the patch. Please can you add before and after screenshots to the pr?

@tsl143
Copy link
Contributor Author

tsl143 commented May 31, 2017

@muffinresearch Screenshots

FOR ADDONS LISTING

Before
before

After
after

FOR THEMES LISTING

Before
before

After
after

@muffinresearch
Copy link
Contributor

Is there a way to do this with flexbox instead of all the floats and calc?

I appreciate the floats were there before but I think this might be cleaner with flexbox directly.

@muffinresearch
Copy link
Contributor

There could do with being more whitespace between the text + ratings, so I'd allow for at least 10px gutter between them so things don't look too cramped.

@tsl143
Copy link
Contributor Author

tsl143 commented May 31, 2017

We can for sure use flexbox (always like them )
Right now I am on vacation for a week, will that be fine if i work on it once I am back?

@muffinresearch
Copy link
Contributor

We can for sure use flexbox (always like them )
Right now I am on vacation for a week, will that be fine if i work on it once I am back?

Yep that should be fine.

@muffinresearch
Copy link
Contributor

@tsl143 hi, hope you had a good vacation. Let me know if you have any updates to review.

@tsl143
Copy link
Contributor Author

tsl143 commented Jun 15, 2017

Thanks, yes indeed I had a really good one :)
I started working on the bug, after pull, when I run yarn dev:amo it serves API from localhost:3000 instead of amo dev server.
I didnt setup addons-server repo, I want to use APIs from dev server as before.

@muffinresearch
Copy link
Contributor

muffinresearch commented Jun 15, 2017

@tsl143 you can configure the api host with a local config see https://github.com/mozilla/addons-frontend#configuring-for-local-development for details.

This example should work for -dev:

// config/local-development.js
module.exports = { 
  apiHost: 'https://addons-dev.allizom.org',
  amoCDN: 'https://addons-dev-cdn.allizom.org',
};

@tsl143
Copy link
Contributor Author

tsl143 commented Jun 16, 2017

This is what I was looking for, thanks :)
I will raise PR asap.

@muffinresearch
Copy link
Contributor

@tsl143 feel free to just update this PR.

@tsl143
Copy link
Contributor Author

tsl143 commented Jun 16, 2017

Screenshot after

after_flex

width: 38px;

[dir=rtl] & {
margin: 0 5px 0 0;
Copy link
Contributor

@tofumatt tofumatt Jun 16, 2017

Choose a reason for hiding this comment

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

We have a mixin for this in core/css/inc/mixins: @include margin-start(5px);

Copy link
Contributor

Choose a reason for hiding this comment

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

(It would go in the main selector though, where margin-left is.

font-size: $font-size-default;
font-weight: bold;
margin: 0;
min-width: 1%;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The flex-item is overflowing so to control that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@tsl143
Copy link
Contributor Author

tsl143 commented Jun 26, 2017

ping @tofumatt , @muffinresearch

@tsl143
Copy link
Contributor Author

tsl143 commented Jun 30, 2017

The issue has already been fixed by layout change, hence closing

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.

Add-on with long name is causing layout issues
3 participants