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

Add CSS for language col in WC products page #831

Merged
merged 1 commit into from
May 23, 2020

Conversation

pjrobertson
Copy link
Contributor

Fixes #804

I'm not sure if this is the best way - adding custom CSS files to each module - but it seems like the most extensible going forwards. I see that the acf module also does this.

@@ -0,0 +1,3 @@
.fixed .column-language {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Where does CSS column-language come from?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, it's the WooCommerce products page, apologies for the incorrect title

@herrvigg herrvigg changed the title Add CSS for language col in WC orders page Add CSS for language col in WC products page May 3, 2020
@herrvigg
Copy link
Collaborator

herrvigg commented May 3, 2020

OK got it, it's about the products not the orders :)

@herrvigg
Copy link
Collaborator

herrvigg commented May 3, 2020

This fixed layout CSS in the wp-list-table is really bad. As soon as the table is reduced the column is messed up again. Not flexible or responsive at all 😒 But this doesn't come from qtranslate.
We need a better solution than the relative width (%). It's already the case for cols name, SKU, product category, product tag. I think they should remove this in WC. But we should not add a new % here.

@herrvigg
Copy link
Collaborator

herrvigg commented May 3, 2020

I'm not a web designer but this doesn't look good. Imo an issue should be opened on WooCommerce to remove these % because they don't live well with the table-layout: fixed. Such col sizes with % would be computed relatively to the current size of the table but then if you resize the page it's a mess. Said differently it's not even that it's non-responsive design, it's anti-responsive, making it worse.

I think even that the fixed layout itself is a bad practice, it's only meant to make the computations faster maybe for mobile. But in 2020 i don't think i makes much sense. This comes from WP so it's certainly even harder to change. But it can be done independently i believe. The first thing is certainly to ask WC to switch to really-fixed size such as px.

For qTranslate we should do something similar, avoid % and used a fixed size instead.

@pjrobertson
Copy link
Contributor Author

This fixed layout CSS in the wp-list-table is really bad. As soon as the table is reduced the column is messed up again. Not flexible or responsive at all 😒 But this doesn't come from qtranslate.
We need a better solution than the relative width (%). It's already the case for cols name, SKU, product category, product tag. I think they should remove this in WC. But we should not add a new % here.

I'm not having this issue. Have you checked resizing the table on a live install? Even with this change, the table is responsive and works for me. Below 783px, the table goes into 'compact' mode. The width:10% CSS was using the convention that's already in use in WooCommerce (see the column-date element). I agree, it's not ideal, but there's not much point us changing the CSS to something better here if the rest of the WC table doesn't follow the same trend.

This is a fix to an already existing, big problem. My goal here is to just get things working so they are actually usable.

Before:

Screenshot 2020-05-06 at 16 18 29

After:

Screenshot 2020-05-06 at 16 18 48

@herrvigg
Copy link
Collaborator

All right, i'm not super happy with the non-responsive layout but it is indeed depending on WC and they would have to improve it for the whole table. At least we are consistent with them and if they change it we can adapt later.
Thanks for the PR!

@herrvigg herrvigg merged commit c6df46b into qtranslate:master May 23, 2020
@herrvigg
Copy link
Collaborator

There was a wrong path for the new CSS stylesheet. Fixed in #894.

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.

Woocommerce - Backend product list "language" column css to be fixed
3 participants