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

Add second set of data table action icons below the report title #22827

Open
wants to merge 44 commits into
base: 5.x-dev
Choose a base branch
from

Conversation

michalkleiner
Copy link
Contributor

Description:

Ref. DEV-13900

Review

@michalkleiner
Copy link
Contributor Author

So far found a weird behaviour where the top actions don't display the settings icon when the report doesn't show data, need to dig into that.

Comment on lines -1490 to +1522
delete self.param.totalRows;
delete self.param.totalRows;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This actually fixes the alignment in IDE

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Transitions are not within the data table wrapper, so they don't get the top controls.

@michalkleiner
Copy link
Contributor Author

So far found a weird behaviour where the top actions don't display the settings icon when the report doesn't show data, need to dig into that.

This should be resolved.

@michalkleiner michalkleiner added Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. c: Design / UI For issues that impact Matomo's user interface or the design overall. labels Dec 10, 2024
@michalkleiner michalkleiner added this to the 5.3.0 milestone Dec 10, 2024
@michalkleiner
Copy link
Contributor Author

See internal Jira card for more details on the context of the change.

@michalkleiner michalkleiner marked this pull request as ready for review December 10, 2024 11:01
@michalkleiner michalkleiner added the Needs Review PRs that need a code review label Dec 10, 2024
@michalkleiner michalkleiner requested a review from a team December 10, 2024 11:02
@michalkleiner michalkleiner changed the title Add second set of data table action icons below report title Add second set of data table action icons below the report title Dec 10, 2024
@michalkleiner
Copy link
Contributor Author

Remaining failing UI tests come from submodules.

@caddoo
Copy link
Contributor

caddoo commented Dec 11, 2024

I've been reviewing the screenshots and found a few that don't look right.

All the ActionsDataTable_* have the icons bleed out over the top border.

This also applies to the GoalsTable_* as well and a lot more. I won't spend the time listing them all.

image

Looking at Goals_action_goals_visualization_page_urls, Goals_action_goals_visualization_page_urls, Goals_goals_by_entry_page_titles, Goals_goals_by_entry_pages it looks as though there where no controls before and now they are there, is that expected?

image

I'll stop reviewing now until those are corrected, as i think fixing them once will fix a lot of the screenshots.

@michalkleiner
Copy link
Contributor Author

Thanks for the feedback @caddoo.

I've been reviewing the screenshots and found a few that don't look right.

All the ActionsDataTable_* have the icons bleed out over the top border.

This also applies to the GoalsTable_* as well and a lot more. I won't spend the time listing them all.

image

They actually don't spill over, they are at the very edge with 0 pixels gap. My understanding is that is due to how the report screenshot is taken, not that there would be anything missing. However we do use -10px top margin to lower the gap between the actions and the title, so I can look into updating the styles to only do that when the card title is a sibling element. That should address that.

Looking at Goals_action_goals_visualization_page_urls, Goals_action_goals_visualization_page_urls, Goals_goals_by_entry_page_titles, Goals_goals_by_entry_pages it looks as though there where no controls before and now they are there, is that expected?

image

Again, this is due to how the screenshots are taken and where the mouse is during that event since the bottom actions were visible on hover. If the mouse is moved outside of the report or the report is not being interacted with, the hover effect is not there and the bottom action are not visible. The change makes both bottom and top controls visible at all times, which is why it is newly visible both at the bottom and at the top. Does that answer your question?

@sgiehl
Copy link
Member

sgiehl commented Dec 11, 2024

@michalkleiner there are still a couple of inconsistencies. For example if you search for something and the table then has no results:

report_search.mp4

And another problem I've spotted is, that the datatable setting do not always have the same options:

report_settings.mp4

@michalkleiner
Copy link
Contributor Author

Thanks for your testing @sgiehl. The inconsistency around the top controls being hidden came from it being hidden when there's no data initially, but it didn't occur to me that it would also apply when searching, so I guess I'll need to check if we can differentiate those two scenarios - initial table empty and empty search results.

For the latter, I have no idea why that would be happening, unless someone was adding the options via JS. I'll investigate, but any hints would be appreciated.

@mneudert
Copy link
Member

The flattening option is not added, it is removed from the table:

if ((typeof self.numberOfSubtables == 'undefined' || self.numberOfSubtables == 0)
&& (typeof self.param.flat == 'undefined' || self.param.flat != 1)
) {
// if there are no subtables, remove the flatten action
const dataTableActionsVueApp = $('[vue-entry="CoreHome.DataTableActions"]', domElem).data('vueAppInstance');
if (dataTableActionsVueApp) {
dataTableActionsVueApp.showFlattenTable_ = false;
}
}

So the top action row is correct, and the bottom one is not, because there is no loop over both $('[vue-entry="CoreHome.DataTableActions"]', domElem).

@michalkleiner michalkleiner requested review from mneudert and a team December 18, 2024 10:35
@michalkleiner
Copy link
Contributor Author

There is a few other UI screenshots updated as a leftover from the icons update.

tests/UI/specs/EvolutionGraph_spec.js Outdated Show resolved Hide resolved
tests/UI/specs/EvolutionGraph_spec.js Outdated Show resolved Hide resolved
plugins/CoreHome/templates/_dataTable.twig Show resolved Hide resolved
plugins/CoreHome/templates/_dataTable.twig Show resolved Hide resolved
@michalkleiner
Copy link
Contributor Author

Plugin PRs created

@michalkleiner michalkleiner requested review from mneudert and a team December 20, 2024 15:38
Copy link
Contributor

This issue is in "needs review" but there has been no activity for 7 days. ping @matomo-org/core-reviewers

@github-actions github-actions bot added the Stale The label used by the Close Stale Issues action label Dec 28, 2024
@michalkleiner michalkleiner removed the Stale The label used by the Close Stale Issues action label Jan 4, 2025
# Conflicts:
#	tests/UI/expected-screenshots/Comparison_multi_row_evolution.png
#	tests/UI/expected-screenshots/IncompletePeriodVisualisation_visitors_overview.png
@michalkleiner
Copy link
Contributor Author

@matomo-org/core-reviewers please have another look, the merge conflict was resolved, there are no errors in UI tests, the failing ones are from submodules that have their respective PRs prepared to be merged after this.

@@ -50,6 +57,14 @@
{% if error is defined %}
<div vue-entry="CoreHome.Alert" severity="danger">{{ error.message }}</div>
{% else %}
{% if showTableActionsInHeader %}
<div class="row dataTableHeaderControls">
Copy link
Member

Choose a reason for hiding this comment

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

There is one relevant test failures broken by the .row selector changes:

https://github.com/matomo-org/matomo/actions/runs/12666720833/job/35298662515#step:3:1054

await page.hover('.dataTableVizVisitorLog .row:nth-child(2) .actionList li.action');

The test selector probably needs to be :nth-child(3) now, or we switch to jQuery and .card:eq(2) 🤔

@@ -111,7 +111,7 @@ describe("PagePerformance", function () {
await page.goto("?module=Widgetize&action=iframe&disableLink=0&widget=1&moduleToWidgetize=Actions&actionToWidgetize=getPageUrls&" + generalParams);

// hover visualization selection
const icon = await page.jQuery('.activateVisualizationSelection');
const icon = await page.jQuery('.activateVisualizationSelection:last');
Copy link
Member

Choose a reason for hiding this comment

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

There is one more selector causing issues in this suite:

https://github.com/matomo-org/matomo/actions/runs/12666720833/job/35298664217#step:3:1126

const icon = await page.jQuery('.dropdown-content .icon-page-performance');

Changing that to .dropdown-content .icon-page-performance:last could already solve the issue.

@@ -218,7 +204,7 @@ describe("EvolutionGraph", function () {
testEnvironment.save();

await page.goto(url);
await showDataTableFooter();
await page.waitForNetworkIdle();
Copy link
Member

Choose a reason for hiding this comment

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

Adding this here only to have a resolvable thread.

There are two weird reported screenshot errors:

If I download the screenshots from the artifact host they tell me there is no difference, but CI has an issue somehow. Maybe it solves itself in the next CI run 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I noticed those as well and was hoping for them to resolve, but at the same time I can just update them and see if it fixes itself afterwards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Design / UI For issues that impact Matomo's user interface or the design overall. Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants