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

Remove shop links from plugin details modal #22154

Merged
merged 10 commits into from
Apr 29, 2024
Merged

Remove shop links from plugin details modal #22154

merged 10 commits into from
Apr 29, 2024

Conversation

mneudert
Copy link
Member

Description:

Removes the CTA buttons leading to the webshop from the plugin detail modals.

The case fallback for {% if plugin.shop.variations|length %} was also removed for consistency with the CTA display behaviour. To my knowledge it should not happen that a premium plugin has no variations, and the links are still available in the description part of the modal.

Whitespace above the description has been adjusted to be a general "4 br height if not cta visible", though yet to be checked if it will be adjusted to a slightly lower amount.

Refs DEV-18004

Review

@mneudert mneudert added c: Marketplace For issues that affect the Matomo Plugin Marketplace where you can download plugins. Needs Review PRs that need a code review labels Apr 23, 2024
@mneudert mneudert added this to the 5.1.0 milestone Apr 23, 2024
@mneudert mneudert requested a review from a team April 23, 2024 18:20
@michalkleiner
Copy link
Contributor

The space above the metadata looks weird without the CTA, I've tried to mock a quick tweak that would make it look slightly better — add the below CSS to .metadata and remove the artificial line breaks creating the space.

div.metadata {
    border-left: 1px solid silver;
    padding-left: 10px;
    margin-left: 10px;
}

With the above CSS and with line breaks on the left, with a CTA that stays on the right — what do you think?
Screenshot 2024-04-24 at 6 26 39 PM

Without the CSS the alignment of the metadata column is just weird (even though it's what it was before horizontally).
Screenshot 2024-04-24 at 6 33 12 PM

@mneudert
Copy link
Member Author

mneudert commented Apr 24, 2024

The margin/padding is more or less already taken care of in #22055 with the removal of .pluginDetails > .row > .col there. If we change that here it should be the same change to have it change only once.

The .row > .col removal somewhat messes up the alignment of everything else. Keeping your suggested .metadata change with the only modification of using 0.75rem to match the values removed by .row > .col. Should result in 12 instead of 10 pixels.

Displaying a silver border looks somewhat odd to me if it does not match the whole height, so i am inclined to skip that part 🤔

Pushed a matching change so we can see what it looks like after CI has generated the screenshot diffs: https://builds-artifacts.matomo.org/matomo-org/matomo/dev-18004/8813350044/

@michalkleiner
Copy link
Contributor

We could put the border (silver or light gray) on the content, so it would be the whole height.
The generated UI screenshots seem to make the gap quite big, perhaps make it a bit smaller? Also we may need to add right padding as now the content is touching the border of the modal.

I'd say whichever way is the easiest as long as we keep the metadata at the top and it's somewhat visually separated from the content.

@mneudert
Copy link
Member Author

I will add one or two changes so we (or probably you) can check with Javi on Monday which screenshot set we should keep.

To me that sounds like a reasonable way to invest the time, instead of doing everything without prior UI approval 🙈

@michalkleiner
Copy link
Contributor

Good call 👍

@mneudert
Copy link
Member Author

@michalkleiner created 4 sets of screenshots we could get checked:

The full height border will only be visible for actual modals, the UI tests don't have enough content for it to show. And it should only be checked with a plugin that displays images in the description, as those images may touch or even overlap the border.

Metadata content can currently overflow outside of the modal. If a link is displayed that contains no characters where a browser would break the line it will flow out of the metadata block. .Piwik_Popover already provides padding so the metadata content could be set to overflow: hidden to avoid that part.

@michalkleiner michalkleiner self-assigned this Apr 28, 2024
@michalkleiner
Copy link
Contributor

Spoke about this with the design team today and the preference is full height silver line, no space above the metadata (there's still an empty paragraph from somewhere) and if possible, a bit of padding so that the images don't touch the vertical line (which can be achieved by removing flex 1 and making them 48% wide).

@michalkleiner michalkleiner removed their assignment Apr 29, 2024
@michalkleiner
Copy link
Contributor

michalkleiner commented Apr 29, 2024

@mneudert pushed two commits based on the discussion with design, could you check it looks ok from your perspective and update the test screenshots, please? Then it's ok to merge if all is good.

@michalkleiner
Copy link
Contributor

When I woke up today I had the same idea to remove the empty paragraph and add the margin-bottom to the action div after I saw the UI test screenshots, but I ran out of time on that, so well done you've done the same! :)

@mneudert mneudert merged commit f3ffa54 into 5.x-dev Apr 29, 2024
21 of 25 checks passed
@mneudert mneudert deleted the dev-18004 branch April 29, 2024 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Marketplace For issues that affect the Matomo Plugin Marketplace where you can download plugins. Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants