Minicart height not calculated correctly under certain circumstances #29859
Description
Preconditions (*)
- 2.4.0
Steps to reproduce (*)
- Create 3 test products, all with 0 stock, all with backorders enabled with notify
- Go to frontend and add 5 of each to your basket
Expected result (*)
- Minicart should be sized appropriately
Actual result (*)
- There is a large margin at the bottom of the minicart. It grows the more items there are in the cart.
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
Assignees
Labels
Type
Projects
Status
Done