Skip to content

Orders tab: update empty state action button Auto Layout constraints to remove warnings #6988

Open
@jaclync

Description

@jaclync

Describe the bug

In the empty state view EmptyStateViewController, the action button currently has a fixed width constraint to 228px. This constraint can't be met when the screen width is narrow, and an Auto Layout warning is reproducible with an empty order list. Let's update the Auto Layout constraints of the action button to perhaps use leading/trailing constraints instead of a width constraint.

To Reproduce
Steps to reproduce the behavior:

  • Launch the app in iPhone 11 simulator or device (or iPad 4th gen in split view mode)
  • Go to the orders tab
  • Tap "Filter" and select criteria that result in an empty result --> when the empty state UI is shown, there is an Auto Layout warning like Will attempt to recover by breaking constraint <NSLayoutConstraint:0x600002d13390 UIButton:0x13c5ec510'Clear Filters'.width == 228 (active)>

Screenshots

Expected behavior
There should not be a warning whenever the empty state UI is shown.

Isolating the problem (mark completed items with an [x]):

  • 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.

Mobile Environment
Please include:

  • Device: iPhone 11 / iPad 4th gen simulator
  • iOS version: iOS 15.5
  • WooCommerce iOS version: any

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature: order listRelated to the order list.good first issueThe issue is a good candidate for a community contribution or for a newcomer to the team.type: technical debtRepresents or solves tech debt of the project.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions