onOffice-Web-Org / oo-wp-plugin

onOffice for WP-Websites
https://wp-plugin.onoffice.com
GNU General Public License v3.0
9 stars 9 forks source link

Proper Handling of Image Type Selection in Property List Settings #851

Open fredericalpers opened 6 days ago

fredericalpers commented 6 days ago

Proper Handling of Image Type Selection in Property List Settings

User Story

As an admin user of the onOffice WordPress plugin, I want the backend to accurately reflect when all image types are deselected in the property list settings, so that it is clear no images will be displayed on the frontend.

Currently, in the settings for the property list, admins can choose different types of images to display. If all image types are deselected, the frontend correctly shows no images. However, in the backend, the selection still shows as "Title Image (TITELBILD)" This causes confusion, as the backend should also indicate that no images are selected when all options are deselected.

By implementing this fix, admin users will have a clearer and more accurate understanding of the image display settings in the property lists, leading to a better user experience and fewer misunderstandings.

Tasks / Requirements

dai-eastgate commented 3 days ago

@fredericalpers To be able to continue performing this task, I confirm the following:

  1. Please check again because I see that the admin estate list currently has a default image type of "TITELBILD" => To fix this bug, we need to remove the default image type. Are you sure to do this? Please check again to make sure fixing this bug does not affect your business

I want the backend to accurately reflect when all image types are deselected in the property list settings, so that it is clear no images will be displayed on the frontend.

  1. For request "clear no images will be displayed on the frontend." =>Do you want to generate no img html tag or create an img tag with src as a placeholder image?

Note: Currently, I see that the admin Detail View and admin Similar Estates pages are also encountering this error. Do you want to fix the Estate Details View and Similar Estate as well?

fredericalpers commented 3 days ago

The checkbox for the image type "TITELBILD" is checked by default in the backend of the plugin. However, when I deselect this checkbox and save the settings, it appears as still being checked in the backend. Despite this, no "TITELBILD" image is displayed on the frontend, the whole "oo-listimage" will be removed from the code.

There seems to be an issue in the code causing this inconsistency: the checkbox remains checked by default in the backend but does not display the "TITELBILD" image on the frontend when it is deselected. See screenshots below. The TITELBILD should stay the default selected image type for the property lists, only when actively deselected the checkbox needs to stay deselected.

titelbild-yes

titelbild-no