Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Select/Dropdown for country on the block checkout not displaying an arrow indicator. #8855

Closed
5 tasks done
stuartduff opened this issue Mar 25, 2023 · 1 comment
Closed
5 tasks done

Comments

@stuartduff
Copy link
Member

Prerequisites

  • I have carried out troubleshooting steps and I believe I have found a bug.
  • I have searched for similar bugs in both open and closed issues and cannot find a duplicate.

Describe the bug

In previous versions of the block checkout within the country field, there seems to have been a dropdown indicator arrow which was displayed. However, it seems like that no longer displays.

Expected behavior

Usually, within a select or dropdown field, we'd see an indicator on the field. This screenshot below is from a developer blog post from 2020.

https://developer.woocommerce.com/2020/05/27/available-for-testing-a-block-based-woocommerce-cart-and-checkout/

Screen Shot 2023-03-25 at 16 37 03

Actual behavior

Currently, there is no select indicator within the latest version of the WooCommerce block checkout.

Screen Shot 2023-03-25 at 16 35 44

I'm not sure if this was an intentional change at any point in time. It was, however, highlighted by a forum user whom we've opened this report for.

https://wordpress.org/support/topic/the-down-arrow-is-not-showing-for-countries-regions-field-in-wcs-block/

Steps to reproduce

  1. Add a product to cart.
  2. Visit a page wit the block checkout located on it

WordPress Environment

WordPress v6.1.1 & WooCommerce v7.5.1

Isolating the problem

  • I have deactivated other plugins and confirmed this bug occurs when only WooCommerce plugin is active.
  • This bug happens with a default WordPress theme active, or Storefront.
  • I can reproduce this bug consistently using the steps above.
@psealock psealock transferred this issue from woocommerce/woocommerce Mar 26, 2023
@opr
Copy link
Contributor

opr commented Mar 29, 2023

Hi @stuartduff - thanks for opening this report.

Actually it looks like this was removed in August 2021 (version 5.7.0) because of #4369

The combobox we use instead comes from Gutenberg and does not have an arrow.

As for a solution to re-add it, it might be possible with CSS, however the element is an input so if you'd try to render the arrow in a before or after pseudo-element it wouldn't work as input can't have these.

You'd need to add it to the combobox container, like so (feel free to modify colours and sizes to suit):

.wc-block-components-country-input .components-base-control:after {
    height: 0.5em;
    width: 0.5em;
    content: '';
    position: absolute;
    right: 1em;
    top: 50%;
    border-left: 1px solid grey;
    border-bottom: 1px solid grey;
    transform: translateY(-50%) rotate(-45deg);
}

Please note this is a workaround and we won't be able to provide ongoing support for this solution.

@opr opr closed this as completed Mar 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants