-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
base: 5.x-dev
Are you sure you want to change the base?
Conversation
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. |
91d09e8
to
80ee0a8
Compare
delete self.param.totalRows; | ||
delete self.param.totalRows; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
606f240
to
a8e4e9a
Compare
This should be resolved. |
See internal Jira card for more details on the context of the change. |
Remaining failing UI tests come from submodules. |
I've been reviewing the screenshots and found a few that don't look right. All the This also applies to the Looking at I'll stop reviewing now until those are corrected, as i think fixing them once will fix a lot of the screenshots. |
Thanks for the feedback @caddoo.
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
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? |
@michalkleiner there are still a couple of inconsistencies. For example if you search for something and the table then has no results: report_search.mp4And another problem I've spotted is, that the datatable setting do not always have the same options: report_settings.mp4 |
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. |
The flattening option is not added, it is removed from the table: matomo/plugins/CoreHome/javascripts/dataTable.js Lines 1262 to 1270 in 0973713
So the top action row is correct, and the bottom one is not, because there is no loop over both |
8867894
to
6a7fcfc
Compare
@sgiehl I've addressed both issues you raised, we now can identify if there are no data in the report based on search, or whether it's an empty report without search. With search, we display the top controls if they were visible before. For the settings option, thanks to @mneudert's suggestion this is also fixed and the flattening option is correctly removed from both controls. @caddoo I've checked reports without titles to see if the action icons bunched up against the top border of the screenshot is an issue and in the UI itself I couldn't find anywhere where this would be a problem, so I think it comes down to how the screenshots are taken. |
I've rebased the branch on latest 5.x-dev to prevent UI screenshots braking on there being a new version of Matomo available. |
# Conflicts: # plugins/CustomDimensions/tests/UI/expected-screenshots/CustomDimensions_report_actions_segmented_visitorlog.png # plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_dashboard3.png # plugins/Live/tests/UI/expected-screenshots/Live_visitor_log.png # plugins/Live/tests/UI/expected-screenshots/Live_visitor_log_page_next.png # plugins/Referrers/tests/UI/expected-screenshots/ReferrersPages_search_engines_keywords.png # tests/UI/expected-screenshots/Comparison_normal_table.png # tests/UI/expected-screenshots/Comparison_normal_table_no_periods.png # tests/UI/expected-screenshots/Comparison_normal_table_no_segments.png # tests/UI/expected-screenshots/Comparison_row_evolution.png # tests/UI/expected-screenshots/Comparison_segmented_visitorlog.png # tests/UI/expected-screenshots/Comparison_subtables_loaded.png # tests/UI/expected-screenshots/Comparison_subtables_paginate.png # tests/UI/expected-screenshots/JSTracker_visitor_log.png # tests/UI/expected-screenshots/UIIntegrationTest_actions_outlinks_vlog.png # tests/UI/expected-screenshots/UIIntegrationTest_ecommerce_log_segmented.png # tests/UI/expected-screenshots/UIIntegrationTest_segmented_visitorlog.png # tests/UI/expected-screenshots/UIIntegrationTest_visitors_devices.png # tests/UI/expected-screenshots/UIIntegrationTest_visitors_software.png # tests/UI/expected-screenshots/UIIntegrationTest_widgetize_ecommercelog.png # tests/UI/expected-screenshots/UIIntegrationTest_widgetize_visitor_log.png # tests/UI/expected-screenshots/ViewDataTableTest_11_flattened.png # tests/UI/expected-screenshots/ViewDataTableTest_12_aggregate_shown.png # tests/UI/expected-screenshots/ViewDataTableTest_dimension_columns.png # tests/UI/expected-screenshots/ViewDataTableTest_dimension_search.png # tests/UI/expected-screenshots/ViewDataTableTest_flatten_search.png # tests/UI/expected-screenshots/ViewDataTableTest_related_report_click.png # tests/UI/expected-screenshots/ViewDataTableTest_subtables_loaded.png
There is a few other UI screenshots updated as a leftover from the icons update. |
@@ -197,7 +197,7 @@ describe("EvolutionGraph", function () { | |||
}); | |||
await page.reload(); | |||
await showDataTableFooter(); | |||
await page.click('.activatePeriodsSelection'); | |||
await page.click('.activatePeriodsSelection:last'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
await page.click('.activatePeriodsSelection:last'); | |
await (await page.jQuery('.activatePeriodsSelection:last')).click(); |
(or something like that)
Otherwise the UI tests will keep failing:
Evaluation failed: DOMException: Failed to execute 'querySelector' on 'Document': '.activatePeriodsSelection:last' is not a valid selector.
Or we could treat those "single module widget iframes" like the dashboard widgets and hide the duplicate controls. Adding and not isWidget
to the showTableActionsInHeader
template variable should do that well enough, and we can use the old selector again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went with the and is not isWidget
approach, let's see how that behaves.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, that didn't make any difference.
of moving the table actions to the top of the report for all reports, at which point the config for the report | ||
can be renamed to show_header and show_header_icons | ||
#} | ||
{% set showTableActionsInHeader = properties.show_footer and properties.show_footer_icons %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{% set showTableActionsInHeader = properties.show_footer and properties.show_footer_icons %} | |
{% set showTableActionsInHeader = properties.show_footer and properties.show_footer_icons and not isWidget %} |
I have not fully checked what more side effects this would have (other than the mentioned single widgets in EvolutionGraph_spec
), but this would remove the slight layout change in the Dashboard_spec
caused by some other CSS:
matomo/plugins/Live/stylesheets/live.less
Lines 419 to 421 in eed6ea9
&:first-child { | |
padding-top:0; | |
} |
@@ -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"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Live_spec
tests have some selectors that get tripped by this new element:
matomo/plugins/Live/tests/UI/Live_spec.js
Line 34 in 9a3ef94
var report = await page.$('.dataTableVizVisitorLog .card.row:first-child'); |
This would now need to be something like this:
var report = await page.jQuery('.dataTableVizVisitorLog .card.row:eq(1)');
And there are probably more selectors in that spec that need to be updated accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't trip on this, as the Visits Log does not have a card on the top level, so the first row for the table controls is not within a card.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the selectors
Plugin PRs created |
Description:
Ref. DEV-13900
Review