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

[Feature] Popup: move related child in corresponding popup_lizmap_dd_relation div #4768

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mind84
Copy link
Contributor

@mind84 mind84 commented Sep 18, 2024

When a Popup is displayed with the QGIS Drag and Drop configuration, for each relations configured in the layout a container HTML element (div.popup_lizmap_dd_relation) is added to the Popup (see 3liz/qgis-lizmap-server-plugin@6a42400)

This PR moves the related child (or children) popup in corresponding popup_lizmap_dd_relation div. The feature covers both 1:n and n:m relations

Ticket : fix #4407

Backport to 3.8

Funded by Faunalia

@github-actions github-actions bot added this to the 3.9.0 milestone Sep 18, 2024
@mind84
Copy link
Contributor Author

mind84 commented Sep 18, 2024

As side effect, the background-color for the children popups is inherited from this rule:

https://github.com/3liz/qgis-lizmap-server-plugin/blob/b17cd00abbdf7b2274c2aea3fafb2c817588553a/lizmap_server/tooltip.py#L447

image

The display effect is to much "heavy" IMHO and could be better.

I guess there are two options here:

  1. change CSS rule in lizmap-server-plugin
  2. let users add custom css.

Since class popup_lizmap_dd_relation is never get involved until now, I think that option 1 is the best because there is little chance that adding some specific rules for this class will break the UI of someone

What do you think about it?

@rldhont rldhont added popup sponsored development This development has been funded backport release_3_8 run end2end If the PR must run end2end tests or not labels Sep 18, 2024
@rldhont
Copy link
Collaborator

rldhont commented Sep 18, 2024

@Gustry any advice about the CSS ?

@Gustry
Copy link
Member

Gustry commented Sep 24, 2024

@Gustry any advice about the CSS ?

You mean about the styling side ?
About the technical side, we can return different CSS. I think we can add a flag to see if we are inside a previous container, to remove the transparency.

@mind84
Copy link
Contributor Author

mind84 commented Sep 24, 2024

@Gustry,

just for trying, I've added a couple of css rules in tooltip.py, only for the relations case (groupbox is good with dark background IMHO):

div.popup_lizmap_dd div.tab-content div.tab-pane div.popup_lizmap_dd_relation div, 
div.popup_lizmap_dd div.tab-content div.tab-pane div.popup_lizmap_dd_relation 
{
    border: 0px;
    border-radius: 0px;
    background-color:white;
}

result is:

image

What do you think about it?

Thanks

@mdouchin
Copy link
Collaborator

Thanks for your contribution. I would really like to spend some time to make this automatic popup look like the editing form, with labels aside the values, and a more compact UX. We should modify LWC PHP code but also the Python plugin (I think) to improve the automatic "form-like" view of the popup

@mind84
Copy link
Contributor Author

mind84 commented Sep 26, 2024

@mdouchin,

I agree, I'm thinking about it too but there's probably a lot work to do and, with the new feature component coming, I'm wondering if it's better to focus effort on that.

Anyway, basically with this PR nothing changes :), just put things in the right place (or at least, try to)

Thanks

@mdouchin
Copy link
Collaborator

Ok for me. I will spend some time when implementing the lizmap-features-table component.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport release_3_8 popup run end2end If the PR must run end2end tests or not sponsored development This development has been funded
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: popup relation - div popup_lizmap_dd_relation empty in parent
4 participants