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

[5.x]: Addresses are truncated in Order Details page #15338

Closed
martyspain opened this issue Jul 11, 2024 · 3 comments
Closed

[5.x]: Addresses are truncated in Order Details page #15338

martyspain opened this issue Jul 11, 2024 · 3 comments
Labels

Comments

@martyspain
Copy link

What happened?

Description

In Commerce 4, billing and shipping addresses were fully visible in the Order Details page . This made it simple for staff checking orders to confirm the address and book shipping for orders etc.

In Commerce 5, only the first two lines of an address are visible. This is caused by a CSS rule on line 3387 of _main.scss:

.card .card-content .card-body>* {
    --max-lines: 2;
    margin: 0;
    max-height: calc(var(--lh)* var(--max-lines));
    overflow: hidden;
    text-wrap: pretty;
}

This CSS rule causes the remaining lines of the address to be hidden from view, and they cannot be made visible without hacking the CSS via the browser devtools. This isn't a viable solution for staff members wanting to input order addresses into third-party shipping systems.

Truncating the address in this way would be OK as a preview of the address when displayed elsewhere, but I would expect the order details page to show billing/shipping addresses in full as per the Commerce 4 behaviour.

Steps to reproduce

  1. In a Craft 5 site running Commerce 5, click Commerce > Orders;
  2. Click on an order to view the order details

Expected behavior

The order address should be shown in full.

Actual behavior

The order address is restricted to two lines only.

Craft CMS version

5.2.5

Craft Commerce version

5.0.11.1

PHP version

8.2

Operating system and version

All

Database type and version

MySQL 8.0.32

Image driver and version

No response

Installed plugins and versions

No response

@martyspain martyspain added the bug label Jul 11, 2024
Copy link

linear bot commented Jul 11, 2024

@martyspain martyspain changed the title [5.x]: Address cards have max-height in Order Details page [5.x]: Addresses are truncated in Order Details page Jul 11, 2024
@nfourtythree nfourtythree transferred this issue from craftcms/commerce Jul 12, 2024
@nfourtythree
Copy link
Contributor

Thank you for reporting @martyspain, we have managed to replicate this issue and will look into fix.

Thanks!

@brandonkelly
Copy link
Member

Craft 5.2.7 is out with a fix for this. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants