Skip to content

Conversation

@tzi
Copy link
Contributor

@tzi tzi commented Oct 31, 2025

Description:

Fix margins of controls for insight data table in widgets:

before after
Screenshot 2025-10-31 at 18 04 25 Screenshot 2025-11-05 at 08 38 39

Review

@tzi tzi added Bug For errors / faults / flaws / inconsistencies etc. Pull Request WIP Indicates the current pull request is still work in progress and not ready yet for a review. c: Design / UI For issues that impact Matomo's user interface or the design overall. labels Oct 31, 2025
Comment on lines +12 to +15
.widget & {
padding: 12px 12px 0;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ Add margins when the insight table is inside a widget

{% if period == 'day' %}
<div class="row">
<div class="col s12 m6 l4 input-field">
<div class="col s12 m12 l12 input-field">
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ No need to keep a free space, so this input will take all the available space.

@tzi tzi added Needs Review PRs that need a code review and removed Pull Request WIP Indicates the current pull request is still work in progress and not ready yet for a review. labels Nov 1, 2025
@tzi tzi requested a review from a team November 1, 2025 00:03
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this makes it less usable, can we keep the previous width on larger screens?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You’re right. We could do better. I’ll add a max-width to fix this 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better like this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies, it still doesn't sit 100% with me. Not sure we should be relying on content width as the minimal width and adding max width to things that have column layout applied instead of relying on the grid behaviour.

I'll ask for other opinion here since I don't want to hold it up. @sgiehl what's your view here? If you're happy with the change, feel free to approve.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first issue you raised was that the form was unusable when it was too wide.
We cannot solve this problem with the grid system, because the page could take up the entire width of the screen. Two-thirds of an infinite element could still be too wide to be usable.
That's why I think a “max-width” property seems complementary to the grid system in this case.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, I think we should keep UI controls consistent, not always grow in the remaining space. In wider views, it's basically 3 columns layout with 2 columns used. We can go to 2 columns when the content of the dropdowns would get cut off.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the columns are set in HTML, we cannot really do what we want here.
In the previous screenshot, it was already too large to be comfortable in large screens, so I changed to propose something that I found a bit better.
What do you think?

@tzi tzi requested a review from michalkleiner November 3, 2025 08:55
@tzi tzi force-pushed the ux-328 branch 2 times, most recently from c7f9028 to e6d974d Compare November 4, 2025 09:05

<div class="row">
<div class="col s12 m4 l4 input-field">
<div class="col s12 m6 l6 input-field">
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ Took all available space too.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies, it still doesn't sit 100% with me. Not sure we should be relying on content width as the minimal width and adding max width to things that have column layout applied instead of relying on the grid behaviour.

I'll ask for other opinion here since I don't want to hold it up. @sgiehl what's your view here? If you're happy with the change, feel free to approve.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug For errors / faults / flaws / inconsistencies etc. c: Design / UI For issues that impact Matomo's user interface or the design overall. Needs Review PRs that need a code review

Development

Successfully merging this pull request may close these issues.

3 participants