Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display name for Entity Reference shows loader when empty #2162

Open
Tshepiso-R opened this issue Sep 17, 2024 · 0 comments
Open

Display name for Entity Reference shows loader when empty #2162

Tshepiso-R opened this issue Sep 17, 2024 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@Tshepiso-R
Copy link

Tshepiso-R commented Sep 17, 2024

Description:
When an entity reference is configured to display a name (e.g., addressLine1 for an address entity), the system misleadingly displays a loader if the display name is empty, even though the entity reference has a value. This confuses users as it suggests that the system is still loading data, when, in fact, the display name is simply missing. Additionally, the Quickview incorrectly displays the error message "Quickview not configured properly" even when it is configured properly, but the display name for that entity type is null. This issue occurs when using the components autocomplete with "Use Quickview" enabled and an entity reference.

Steps to Reproduce:

  1. Navigate to Member Table.
  2. The table is sorted by address in ascending order to show loaders on the first page.
  3. Observe the loader displayed in place of the display name in the address column.
  4. Hover over the loader and notice that the data exists, but addressLine1 is empty, and take note of the "Quickview not configured properly" error message.

Expected Behavior:

  • If the display name for the entity is empty but the entity reference exists, the system should display a default/fallback message (e.g., "Unnamed Entity" or "No Display Name").
  • A loader should only appear if data is genuinely being fetched or processed.

Actual Behavior:

  • A loader is displayed even though the entity reference has a value, misleading users to believe that data is still being retrieved.
  • The Quickview incorrectly displays an error message even though it is properly configured.

Suggested Fix:

  1. Fallback Value Display:

    • Implement logic to show a fallback value such as "Unnamed Entity" or "No Display Name" when the display name is null or empty.
  2. Tooltip/Info Icon:

    • Add a tooltip or info icon next to the reference, explaining that the entity exists but the display name is missing. This provides additional context to users.
  3. Placeholder Text or Highlighting:

    • Display placeholder text like "Display Name Missing" or highlight the entity reference in a distinct style (e.g., greyed out) to indicate the incomplete display name.
  4. Conditional Loader:

    • Show the loader only if the entity reference is genuinely being fetched (e.g., the API request is pending). If the reference exists but the display name is empty, display the fallback text instead of the loader.
  5. Error Message Correction:

    • Ensure the "Quickview not configured properly" message only appears when the Quickview is truly misconfigured, not when the issue is with the entity’s display name being null.

Attachments:
Image showing loader issue

@Tshepiso-R Tshepiso-R changed the title Draft Display name for Entity Reference shows loader when empty Display name for Entity Reference shows loader when empty Sep 17, 2024
@Tshepiso-R Tshepiso-R added the bug Something isn't working label Sep 17, 2024
@Tshepiso-R Tshepiso-R added this to the Backlog milestone Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant