pegros / PEG_LIST

Set of configurable/actionable LWC list components for Salesforce Lightning UX
MIT License
20 stars 9 forks source link

[bug] sfpegCardCmp - FIeld labels not displayed correctly #42

Closed ysaib closed 1 year ago

ysaib commented 1 year ago

Describe the bug The fields label are not displayed correctly when the user display density is set to compact. However when set to comfy, the display is okay.

To Reproduce Steps to reproduce the behavior:

  1. Load sfpegCardCmp on a lightning page
  2. Click on the user icon on the top right
  3. Set display density to compact

Expected behavior The fields label displayed correctly when display density is set to compact or comfy.

Screenshots Compact: image

Comfy: image

pegros commented 1 year ago

In the sfpegRecordDisplayCmp, problem solved with build a630bd1

added automatic truncation of the labels to avoid breaking the layout, while keeping the full label content upon hovering via the title properties.

Alternatively, people could still opt for "stacked" instead of "auto" mode display to enforce vertical stacked display of labels at all times.

pegros commented 1 year ago

The sfpegCardCmp component relies on the standard lightning-input-field and lightning-output-field Lightning base components to display/edit the fields.

Unfortunately, there are no styling hooks defined on these base components to implement the same solution as for the sfpegRecordDisplayCmp component (i.e. add the slds-truncate CSS class to the label part).

Therefore, the only option for the time being is to enforce stacked display mode at all time when there are too many fields on each row. Please specify "density":"comfy" in your metadata configuration.