Skip to content

Minicart height not calculated correctly under certain circumstances #29859

Closed
@gwharton

Description

Preconditions (*)

  1. 2.4.0

Steps to reproduce (*)

  1. Create 3 test products, all with 0 stock, all with backorders enabled with notify
  2. Go to frontend and add 5 of each to your basket

Expected result (*)

  1. Minicart should be sized appropriately

image

Actual result (*)

  1. There is a large margin at the bottom of the minicart. It grows the more items there are in the cart.

image

Investigation

The problem is happening because in the sidebar.js function calculateHeight, as the height of the minicart area is 0 (height hasnt been caluculated yet) the scroll bar is enabled. This reduces the width of the minicart by a small amount. However it is just enough to cause the backorder messages to go onto 3 lines. This means that the height that gets calculated is too large. When the minicart is ready to be displayed, the scroll bar disappears and the minicart drawable area becomes slightly wider and the backorder messages only take up 2 lines. The minicart height is set to the correct height for the slightly narrower minicart draw area including scrollbar, thus there ends up being a big whitespace area at the base.


Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Labels

Component: CatalogIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentPriority: P3May be fixed according to the position in the backlog.Progress: doneReported on 2.4.0Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchstale issue

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions